Changes between Version 11 and Version 12 of StartersTutorial
- Timestamp:
- Aug 13, 2010, 2:35:17 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
StartersTutorial
v11 v12 26 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 27 28 However, 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 32 This 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 38 You 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 28 40 Let's briefly fix atom 0's element, i.e. convert it from carbon to oxygen. 29 41 {{{ … … 31 43 }}} 32 44 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. 45 Here, 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 47 Let'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 52 Here, 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). 34 53 35 54 == Changing the simulation domain == 36 55 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: 56 The 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 58 There 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: 38 59 {{{ 39 ./src/molecuilder -i test. conf -o pcp -p test.xyz60 ./src/molecuilder -i test.xyz -o pcp 40 61 }}} 41 62 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).63 Note 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). 43 64 44 65 Let's continue and define the simulation box: … … 47 68 }}} 48 69 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 inthe ''xyz'' file. So, our oxygen atom that had an index of 0 above, has now an index of 2.70 Note 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. 50 71 51 72 Regarding 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 52 73 53 74 {{{ 54 ./src/molecuilder -i test.conf -o xyz --select-molecule-by-id 0 -t "-5, 5, 5" --periodic 175 ./src/molecuilder -i test.conf -o xyz --select-molecule-by-id 0 -t "-5, 5, 0" --periodic 1 55 76 }}} 56 77
