Changes between Version 11 and Version 12 of StartersTutorial


Ignore:
Timestamp:
Aug 13, 2010, 2:35:17 PM (15 years ago)
Author:
FrederikHeber
Comment:

Changed first paragraph as negative value is admonished being outside the box

Legend:

Unmodified
Added
Removed
Modified
  • StartersTutorial

    v11 v12  
    2626As 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.
    2727
     28However, you will have noticed that the second command fails with the following error:
     29
     30  '''ERROR: Vector (0.758602,0,-0.504284) would be outside of box domain.'''
     31
     32This is because the default simulation domain is defined by the 3x3 matrix (20,0,0,0,20,0,0,0,20). Our given position is negative in the z component, is outside of the box and thus justly admonished. Let's shift the system by 5 angstroem and try again:
     33{{{
     34./src/molecuilder -i test.xyz --select-all-atoms -t "0., 0., 5."
     35./src/molecuilder -i test.xyz -a 1 --position "0.758602, 0., 4.495716"
     36}}}
     37
     38You notice that we had to ''select-all-atoms'' to tell molecuilder which atoms to translate. You can specify very selectively by id, by element, ... and also molecules as you'll see lateron.
     39
    2840Let's briefly fix atom 0's element, i.e. convert it from carbon to oxygen.
    2941{{{
     
    3143}}}
    3244
    33 Note that we first have to select the desired atom, then specify the action on it. This will change the element of atom with index 0 to 8, i.e. make it an oxygen.
     45Here, we have again first selected the desired atom by its id, then specified the action on it. This will change the element of atom with index 0 to oxygen(8), i.e. make it an oxygen.
     46
     47Let's assume we would like to change it back to carbon, but actually we don't ... let's undo :)
     48{{{
     49./src/molecuilder -i test.xyz  --select-atom-by-id 0 -E 6 --undo
     50}}}
     51
     52Here, we change the atom with index 0 to element carbon(6) but undo this action right afterwards. (Almost) every action has an Undo and a Redo (if you twist your decision once more).
    3453
    3554== Changing the simulation domain ==
    3655
    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:
     56The simulation domain has been mentioned before. It is not encoded in the ''xyz'' format. In order to add atoms beyond components values of the interval [0,20), we would have the specify a new box in front of every command. Hence, we rather switch to ''pcp'' that stores the simulation domain.
     57
     58There are two possibilities to do this switching, either we parse the file ''test.xyz'' in or we specify an additional output format (''-o pcp''). We pick the former here:
    3859{{{
    39 ./src/molecuilder -i test.conf -o pcp -p test.xyz
     60./src/molecuilder -i test.xyz -o pcp
    4061}}}
    4162
    42 Note that we will always add the ''-o xyz'' switch such that ''test.xyz'' is updated, too. Now, we have created a ''pcp'' config file called ''test.conf'' (''.conf'' is the suffix of the pcp format), containing all information of ''test.xyz'' along with information specific to this type of quantum mechanical solver (plane wave).
     63Note that from now on we will always add the ''-o xyz'' switch such that ''test.xyz'' is updated, too. Now, we have created a ''pcp'' config file called ''test.conf'' (''.conf'' is the suffix of the pcp format), containing all information of ''test.xyz'' along with information specific to this type of quantum mechanical solver (plane wave).
    4364
    4465Let's continue and define the simulation box:
     
    4768}}}
    4869
    49 Note that the '''!BoxLength''' entry in ''test.conf'' has changed. Note also that the sequence of the atoms has changed. In ''pcp'' they are always written sorted by element. This sorting has then also been used in the ''xyz'' file. So, our oxygen atom that had an index of 0 above, has now an index of 2.
     70Note that the '''!BoxLength''' entry in ''test.conf'' has changed. Note also that the sequence of the atoms has changed. This is because we parse in a ''pcp'' file and the sequence of atoms according to the one therein, not according to the ''xyz'' structure. In ''pcp'' they are always written sorted by element. This sorting has then also been used in storing of the ''xyz'' file. So, our oxygen atom that had an index of 0 above, has now an index of 2.
    5071
    5172Regarding 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
    5273
    5374{{{
    54 ./src/molecuilder -i test.conf -o xyz --select-molecule-by-id 0 -t "-5, 5, 5" --periodic 1
     75./src/molecuilder -i test.conf -o xyz --select-molecule-by-id 0 -t "-5, 5, 0" --periodic 1
    5576}}}
    5677