Changes between Version 1 and Version 2 of AlkaneCreation
- Timestamp:
- Jun 17, 2011, 8:03:49 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AlkaneCreation
v1 v2 1 1 === Creating Arbitrary Alkanes === 2 2 3 This can also be used (in a somewhat unusual way) to generate alkanes of arbitrary length from a given one. Assume, we have a propane as given. We cut off the terminal hydrogens at either end and place them in files ''buildingblock_upper.xyz'' 3 This can also be used (in a somewhat unusual way) to generate alkanes of arbitrary length from a given one. Assume, we have a propane as given. We cut off the terminal hydrogens at either end and place them in files ''buildingblock_upper.xyz'' and ''buildingblock_lower.xyz''. 4 5 To correct for the displacement, we subtract the position of its carbon neighbor as if it were at "0,5,5". 4 6 {{{ 5 ./molecuilder -i buildingblock_upper.xyz --select-all-atoms -t "-8.3885,-1.5127,-0.89" 7 ./molecuilder -i buildingblock_upper.xyz --select-all-atoms -t "-8.3885,-1.5127,-0.89" -s buildingblock_upper.xyz --undo 6 8 }}} 7 where we translate the position such that its carbon bond partner would be at "0,5,5".8 9 9 10 In the same way we proceed with the hydrogen at the other end stored in ''buildingblock_lower.xyz''. 10 11 {{{ 11 ./molecuilder -i buildingblock_lower.xyz --select-all-atoms -t "-12.1362,- 0.6293,-0.89"12 ./molecuilder -i buildingblock_lower.xyz --select-all-atoms -t "-12.1362,-1.5127,-0.89" 12 13 }}} 13 where we again translate the position such that its carbon bond partner would be at "0,5,5".14 where we translate the position such that it's relative to the same carbon at "0,5,5" and additionally we have to compensate for the x distance which we set such that is bond partner would be at "x=0". 14 15 15 Furthermore, we cut out the first pair of carbon atoms along with the four hydrogens (not the terminal one) and store it in ''buildingblock_center.xyz''. Then we may proceed as follows to produce a decane. 16 Furthermore, we cut out the first pair of carbon atoms along with the four hydrogens (not the terminal one) and store it in ''buildingblock_center.xyz''. 17 {{{ 18 ./molecuilder -i buildingblock.xyz --select-atoms-inside-cuboid "2.5,5,5" --position "8.3,3,3" -s buildingblock_center.xyz 19 }}} 20 Sadly, we have to take a look here at the coordinates in the xyz file to know what to cut out. We pick a position slightly before the first carbon atom. Finally, we have to translate the section 21 {{{ 22 ./molecuilder -i buildingblock_center.xyz --select-all-atoms -t "-8.3885,-1.5127,-0.89" 23 }}} 24 such that the first carbon atom is at "0,5,5". 25 26 Then we may proceed as follows to produce a decane. 16 27 {{{ 17 28 ./molecuilder -i decane.xyz --change-box "2.4985,0,10,0,0,10" -l buildingblock_center.xyz --repeat-box "5,1,1" … … 25 36 * Finally, we call ''--repeat-box'' the create five copies from the given segment containing two carbons. 26 37 27 At last, we need to re-attach the terminal hydrogen atoms. First the lower part, which is easier38 At last, we need to re-attach the terminal hydrogen atoms. First the upper part, which is easier 28 39 {{{ 29 ./molecuilder -i decane.xyz -l buildingblock_ lower.xyz40 ./molecuilder -i decane.xyz -l buildingblock_upper.xyz 30 41 }}} 31 Then the upper part which has to be translated to its destination42 Then the lower part which has to be translated to its destination 32 43 {{{ 33 ./molecuilder -i decane.xyz -l buildingblock_ upper.xyz --select-molecule-by-order -1 --select-molecules-atoms -t "11.24325,0,0"44 ./molecuilder -i decane.xyz -l buildingblock_lower.xyz --select-molecule-by-order -1 --select-molecules-atoms -t "11.24325,0,0" 34 45 }}} 35 46 where the translation factor is 4.5 times the above periodicity in the x direction. 36 47 48 That is: 49 * first, we use ''-i'' to work on the file ''decane.xyz'' where the "truncated" decane is contained. 50 * Then, we load (''-l'') the hydrogen atom into this domain, it is automatically placed into a new molecule 51 * We select this (last) molecule (''--select-molecule-by-order'') where ''-1'' is the reverse order, 1 is first, -1 is last, -2 is second to last, ... (Note: we might as well have selected the molecule by its name buildingblock_left with ''--select-molecule-by-name''). 52 * We transform the molecule selection into an atomic selection (''--select-molecules-atoms'') for the subsequent translation working on atoms. 53 * Finally, we call ''-t'' to translate the selected hydrogen atom at its final position. 54 37 55 And finally, we have a complete decane molecule. 38 56 39 Now, one may ask: Why not do this in a text editor? Of course, the duplication along with the translation of the periodic section is nice. Moreover this approach can easily be placed in a script and arbitrary alkanes can be produced. 57 Now, one may ask: Why not do this in a text editor? Of course, the duplication along with the translation of the periodic section is nice. Moreover however this approach can easily be placed in a script file and arbitrary alkanes can be produced by calling this script. 58 59 60 ,,This has been done with version v1.1.3,,
