Changes between Version 3 and Version 4 of StartersTutorial


Ignore:
Timestamp:
Jul 7, 2010, 12:44:55 PM (14 years ago)
Author:
FrederikHeber
Comment:

split off forst section and made it work on xyz type only

Legend:

Unmodified
Added
Removed
Modified
  • StartersTutorial

    v3 v4  
    1111Execute:
    1212{{{
    13 ./src/molecuilder -i test.conf -o pcp xyz -a 6 --position "0, 0, 0"
     13./src/molecuilder -i test.xyz -o xyz -a 6 --position "0, 0, 0"
    1414}}}
    1515
    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.
     16This 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.
    1917
    2018Instead of ''-a'' we could have written ''--add-atom'' as well. Almost all actions have this kind of short-form, options such as ''--position'' however never have a short-form. This makes them distinguishable from the actions.
     19
     20We 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
     26As 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
     28Let'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
     33This will change the element of atom with index 0 to 8, i.e. make it an oxygen.
     34
     35== Changing the simulation domain ==
     36
     37The 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
     42Note that we will always add the ''-o xyz'' switch such that ''test.xyz'' is updated, too.
    2143
    2244Let's continue and define the simulation box:
     
    2648
    2749Note that the '''!BoxLength''' entry in ''test.conf'' has changed, while the file ''test.conf.xyz'' has not changed at all.
    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.
    4350
    4451Regarding the positions and our domain box, we have set the water molecule a bit right on the corner. Let's shift the molecule a bit