Changes between Version 17 and Version 18 of StartersTutorial
- Timestamp:
- Mar 7, 2012, 1:25:02 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
StartersTutorial
v17 v18 151 151 152 152 Then create 5 copies of the created data file: 153 {{{ 153 154 for i in 1 2 3 4 5; do cp graphene.data graphene_C${i}.data; done 154 155 }}} 155 156 156 157 Within each file rename the carbon atoms to C1, C2, C3, ... 158 {{{ 157 159 for 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 }}} 159 161 160 162 Get the boundaries of the current sheet by using this script: 163 {{{ 161 164 ~/local/bin/GetBoxBounds.pl --file graphene_C1.data --offset 3 165 }}} 162 166 The 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 167 164 168 165 169 Finally combine all 5 files into the final data file. 170 {{{ 166 171 for 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 }}} 167 173 This 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 174