Changes between Version 16 and Version 17 of StartersTutorial


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

Adding additional example: graphene block

Legend:

Unmodified
Added
Removed
Modified
  • StartersTutorial

    v16 v17  
    141141
    142142
     143== Creating a graphene block with several sheets ==
     144
     145This part will assume that you already have a file graphene.xyz with a single graphene sheet, all atoms labeled as carbon (C). (You may produce this file by using the vmd molecular viewer extension "Nanotube builder") Furthermore we assume that you wish to create a five-layered graphene block. Each of the sheets will be made of carbon, but distinguished by an index (C1, C2, ...) In order to separate intra- and interlayer interactions.
     146
     147First convert the xyz file to a tremolo data file:
     148
     149??? /opt/bin/molecuilder --parse-tremolo-potentials elec.potentials -i graphene_layer.data -o xyz
     150
     151
     152Then create 5 copies of the created data file:
     153for i in 1 2 3 4 5; do cp graphene.data graphene_C${i}.data; done
     154
     155
     156Within each file rename the carbon atoms to C1, C2, C3, ...
     157for i in 1 2 3 4 5; do sed -i -e "s#\(\tC\)\t#\1${i}\t#g" graphene_C${i}.data; done
     158
     159
     160Get the boundaries of the current sheet by using this script:
     161~/local/bin/GetBoxBounds.pl --file graphene_C1.data --offset 3
     162The 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.
     163
     164
     165Finally combine all 5 files into the final data file.
     166for 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
     167This 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).
     168
     169Now the file graphene_layere.data has been created and can be used in Tremolo-X Simulations.
     170
     171
    143172This ends this tutorial. I hope you have got an idea of how molecuilder is put into action and what can be done.