Changes between Version 17 and Version 18 of StartersTutorial


Ignore:
Timestamp:
Mar 7, 2012, 1:25:02 PM (13 years ago)
Author:
neuen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • StartersTutorial

    v17 v18  
    151151
    152152Then create 5 copies of the created data file:
     153{{{
    153154for i in 1 2 3 4 5; do cp graphene.data graphene_C${i}.data; done
    154 
     155}}}
    155156
    156157Within each file rename the carbon atoms to C1, C2, C3, ...
     158{{{
    157159for i in 1 2 3 4 5; do sed -i -e "s#\(\tC\)\t#\1${i}\t#g" graphene_C${i}.data; done
    158 
     160}}}
    159161
    160162Get the boundaries of the current sheet by using this script:
     163{{{
    161164~/local/bin/GetBoxBounds.pl --file graphene_C1.data --offset 3
     165}}}
    162166The offset is the index of the first column containing coordinate values. Remember that the script extracts the extreme positions of the particles, so it is a good idea to add some margin for bonds between the periodic images.
    163167
    164168
    165169Finally combine all 5 files into the final data file.
     170{{{
    166171for i in 1 2 3 4 5; do dist=`units "3.4 * $i" | awk -F": " {'print $2'}`; distx=`units "1.22 * $i" | awk -F": " {'print $2'}`;/opt/bin/molecuilder --parse-tremolo-potentials elec.potentials -i graphene_layer.data -o tremolo xyz -B "61.393,0,63.612,0,0,20" -l graphene_C${i}.data --select-molecule-by-order -1 --select-molecules-atoms --translate-atoms "$distx,0,$dist" --periodic 1; done
     172}}}
    167173This little script performs two computations, a shift in x and in z direction, e.g. computing the variable dist: dist=`units "3.4 * $i" | awk -F": " {'print $2'}`, which later can be accessed by $dist. Furthermore, since C1, C2, etc are not known as elements, a tremolo.potentials file is needed to map those shorthands to elements for internal use in molecuilder. Outputs will be created in tremolo and xyz format (-o), periodic shifts (--periodic 1) are computed with correct boxsize (-B), data is read from input files (-i), and molecules from additional loaded files (-l), the last one is selected as one molecule (-select-molecule-by-order -1), all atoms in the molcule are selected --select-molecules-atoms, they are translated x,y,z and output into (-i).
    168174