16 | | This will add an "oxygen" atom (atomic number is actually 8 but we correct the error further below) at (0,0,0). Note that we have called the input file ''test'', which will also be the root of all output files (besides the suffix). We create pcp and xyz output files. The former can store information about the domain, too, the latter is a very common format with many molecule viewers such as listed exemplarily above. Furtheron, we don't have to specify ''pcp'' anymore, as ''test.conf'' that we parse and add stuff on top is of ''pcp'' format and will get updated automatically. |
17 | | |
18 | | Note that two files have been created: ''test.conf'' and ''test.conf.xyz''. Both contain information about the added atom, the former a lot of other information, too. |
| 16 | This will add an "oxygen" atom (atomic number is actually 8 but we correct the error further below) at (0,0,0). Note that we have called the input file ''test'', which will also be the root of all output files (besides the suffix). We create a xyz output file. It is a very common format with many molecule viewers such as listed exemplarily above. Furtheron, we don't have to specify ''xyz'' anymore, as ''test.xyz'' that we parse and add stuff on top is of ''xyz'' format and will get updated automatically. |
| 19 | |
| 20 | We add the two remaining hydrogen atoms: |
| 21 | {{{ |
| 22 | ./src/molecuilder -i test.xyz -a 1 --position "0.758602, 0., 0.504284" |
| 23 | ./src/molecuilder -i test.xyz -a 1 --position "0.758602, 0., -0.504284" |
| 24 | }}} |
| 25 | |
| 26 | As of now, "equal" actions cannot be stacked but this will come very soon. Different actions can however be sequenced on the command line. This is also the reason, why ''-o'' has to be placed in front of ''-a'' as otherwise the output files will be present but empty. |
| 27 | |
| 28 | Let's briefly fix atom 0's element, i.e. convert it from carbon to oxygen. |
| 29 | {{{ |
| 30 | ./src/molecuilder -i test.xyz -E 8 --atom-by-id 0 |
| 31 | }}} |
| 32 | |
| 33 | This will change the element of atom with index 0 to 8, i.e. make it an oxygen. |
| 34 | |
| 35 | == Changing the simulation domain == |
| 36 | |
| 37 | The simulation domain is not encoded in the ''xyz'' format. Hence, we switch to ''pcp'': There are two possibilities, either we parse the file ''test.xyz'' in or we specify an additional output format (''-o pcp''). We pick the former here: |
| 38 | {{{ |
| 39 | ./src/molecuilder -i test.conf -o pcp -p test.xyz |
| 40 | }}} |
| 41 | |
| 42 | Note that we will always add the ''-o xyz'' switch such that ''test.xyz'' is updated, too. |
28 | | |
29 | | We add the two remaining hydrogen atoms: |
30 | | {{{ |
31 | | ./src/molecuilder -i test.conf -o xyz -a 1 --position "0.758602, 0., 0.504284" |
32 | | ./src/molecuilder -i test.conf -o xyz -a 1 --position "0.758602, 0., -0.504284" |
33 | | }}} |
34 | | |
35 | | As of now, "equal" actions cannot be stacked but this will come very soon. Different actions can however be sequenced on the command line. This is also the reason, why ''-o'' has to be placed in front of ''-a'' as otherwise the output files will be present but empty. |
36 | | |
37 | | Let's briefly fix atom 0's element, i.e. convert it from carbon to oxygen. |
38 | | {{{ |
39 | | ./src/molecuilder -i test.conf -o xyz -e 8 --atom-by-id 0 |
40 | | }}} |
41 | | |
42 | | This will change the element of atom with index 0 to 8, i.e. make it an oxygen. |