-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChapter8.txt
325 lines (283 loc) · 10.2 KB
/
Chapter8.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
#!/bin/bash
for ((i=0;i<=10;i++));
do
j=$((10*$i))
qsub EtOHMix$j.pbs
echo "The counter is now EtOH""$j"
qsub MeOHMix$j.pbs
echo "The counter is now MeOH""$j"
qsub 2POHMix$j.pbs
echo "The counter is now POH""$j"
done
#!/bin/sh
>for i in PP18 PP15 PP12 PP9 PP6 PE24 PE18 PE14 PE12 PE8 PE6 PE5 PE4
>do
>cp /nfs/05/cwr0408/BuildGro/PP_24C/em.pbs /nfs/05/cwr0408/BuildGro/PP_18C/em.pbs
>sed -i 's/PP24/$i/g' /nfs/05/cwr0408/BuildGro/PP_18C/em.pbs
>sed -i 's/PP_24/PP_18/g' /nfs/05/cwr0408/BuildGro/PP_18C/em.pbs
>cp /nfs/05/cwr0408/BuildGro/PP_24C/firstmd.pbs /nfs/05/cwr0408/BuildGro/PP_18C/firstmd.pbs
>sed -i 's/PP24/$i/g' /nfs/05/cwr0408/BuildGro/PP_18C/firstmd.pbs
>sed -i 's/PP_24/PP_18/g' /nfs/05/cwr0408/BuildGro/PP_18C/firstmd.pbs
>cp /nfs/05/cwr0408/BuildGro/PP_24C/secondmd.pbs /nfs/05/cwr0408/BuildGro/PP_18C/secondmd.pbs
>sed -i 's/PP24/$i/g' /nfs/05/cwr0408/BuildGro/PP_18C/secondmd.pbs
>sed -i 's/PP_24/PP_18/g' /nfs/05/cwr0408/BuildGro/PP_18C/secondmd.pbs
>cp /nfs/05/cwr0408/BuildGro/PP_24C/thirdmd.pbs /nfs/05/cwr0408/BuildGro/PP_18C/thirdmd.pbs
>sed -i 's/PP24/$i/g' /nfs/05/cwr0408/BuildGro/PP_18C/thirdmd.pbs
>sed -i 's/PP_24/PP_18/g' /nfs/05/cwr0408/BuildGro/PP_18C/thirdmd.pbs
>cp /nfs/05/cwr0408/BuildGro/PP_24C/sequentialMDRuns2.sh /nfs/05/cwr0408/BuildGro/PP_18C/sequentialMDRuns2.pbs
>sed -i 's/PP24/$i/g' /nfs/05/cwr0408/BuildGro/PP_18C/sequentialMDRuns2.sh
>sed -i 's/PP_24/PP_18/g' /nfs/05/cwr0408/BuildGro/PP_18C/sequentialMDRuns2.sh
>done
#running each of the scripts
>for i in
>do
>sh /nfs/05/cwr0408/BuildGro/8.8.2013/$i/sequentialMDRuns2.sh
>sh /nfs/05/cwr0408/BuildGro/8.8.2013/$i/sequentialMDRuns2.sh
>sh /nfs/05/cwr0408/BuildGro/8.8.2013/$i/sequentialMDRuns2.sh
>sh /nfs/05/cwr0408/BuildGro/8.8.2013/$i/sequentialMDRuns2.sh
>sh /nfs/05/cwr0408/BuildGro/8.8.2013/$i/sequentialMDRuns2.sh
>sh /nfs/05/cwr0408/BuildGro/8.8.2013/$i/sequentialMDRuns2.sh
>done
>packmol ./file1.inp
>packmol ./file2.inp
>packmol ./file3.inp
#PBS -N GROMACS $file
#PBS -j oe
#PBS -l walltime=12:00:00
#PBS -l nodes=1:ppn=12
#PBS -S /bin/bash
>set -vx
>module load fftw3
>module load GROMACS/4.6.3
>cd $PBS_O_WORKDIR
>pbsdcp $file.tpr $TMPDIR
>cd $TMPDIR
>mpiexec mdrun_mpi -rdd 2.0 -s $file.tpr -o $file.trr -c $file\MDout.gro -e $file.edr -g $file.log
>pbsdcp -g $file.trr $file.pdb $file.edr $file.log $PBS_O_WORKDIR
>for file in *.tpr
>do
>qsub -V magic.pbs
>done
This content can by copied into a text file and then sh’ed. Such as:
>sh ./magic.sh
>for file in *.pdb NOT water.pdb
>do
>grompp_mpi -f grompp.mdp -c $file.pdb -p $file.top -o $file.tpr -maxwarn 7000
>done
>for i in 1 2 3
>do
>print 5*i
>done
>for i in 1 2 3
>do
>for j in a b c
>do
>print $i\_$j
>done
>done
#PBS -N copying
#PBS -j oe
#PBS -m e
#PBS -M [email protected]
#PBS -l walltime=24:00:00
#PBS -l nodes=1:ppn=12
#PBS -S /bin/bash
set -vx
#for copying an entire subdirectory tree
>mkdir [new directory name]
>cp -r /fs/lustre/cwr0408/9.5.2013/* /fs/lustre/cwr0408/2.10.2014/
The following code is for copying a file into each of the polymer folders in a specific date folder an alternative is:
>echo PP6 PP24 PP18 PP15 PP12 PIB36 PIB24 PIB12 PE8 PE5 PE24 PE18 PE14 PE12 PE10 PE6 PP9 | xargs -n 1 cp ./EtOHMix100.pdb
>cd /fs/lustre/cwr0408/
>for l in EtOHMix50 EtOHMix00 EtOHMix70 EtOHMix100 EtOHMix80
>do
>cd /fs/lustre/cwr0408/$l
>for dir in */
>do
>cd /fs/lustre/cwr0408/$l/$dir
>echo $l
>echo $dir
>echo $l/$dir
>echo $l\_${dir%?}\_density_${dir%?}\.xvg
>echo $l\_${dir%?}\_density_EtOH.xvg
>echo $l\_${dir%?}\_density_HOH.xvg
>echo $l\_${dir%?}\_density_Sys.xvg
>echo ${dir%/}
>done
>done
>TITLE LIG topology, generated by Topolgen in water
>REMARK THIS IS A SIMULATION BOX
>CRYST1 60.000 60.000 150.000 90.00 90.00 90.00 P 1 1
>MODEL 1
>HEADER
>TITLE Built with Packmol
>REMARK Packmol generated PDB file
>REMARK Home-Page: http://www.ime.unicamp.br/~martinez/packmol
>REMARK
>sed '1s/*/TITLE Built with Packmol Edited In Bash/g' [].PDB
>sed '2s/*/REMARK THIS IS A SIMULATION BOX/g' [].PDB
>sed '3s/*/CRYST1 60.000 60.000 150.000 90.00 90.00 90.00 P 1 1
/g' [].PDB
>sed '4s/*/MODEL 1/g' [].PDB
>perl -p -i -e "s/$1/$2/g" $3
#!/bin/bash
>for ((i=0;i<=10;i++));
>do
> j=$((10*$i))
> cp ethanol.top ethanol$j.top
>done
>cd /path/to/dirs/
>for dir in */
>do
>cp /$dir/ /new/path/
>done
#PBS -N copying
#PBS -j oe
#PBS -m e
#PBS -M [email protected]
#PBS -l walltime=24:00:00
#PBS -l nodes=1:ppn=12
#PBS -S /bin/bash
>set -vx
#Making a new directory.
>mkdir [New directory name]
#For copying an entire subdirectory tree recursively, that includes subfolders.
>cp -r /fs/lustre/cwr0408/9.5.2013/* /fs/lustre/cwr0408/2.10.2014/
#For copying a file into each of the polymer folders in a specific date folder an alternative is:
#echo PP6 PP24 PP18 PP15 PP12 PIB36 PIB24 PIB12 PE8 PE5 PE24 PE18 PE14 PE12 PE10 PE6 PP9 | xargs -n 1 cp ./EtOHMix100.pdb
>for i in PE12
>do
>for j in PE15
>do
>for k in firstmd.pbs secondmd.pbs thirdmd.pbs submitthe-mAll2.sh
do
>cp ./$k ./$k\_$j
>perl -p -i -e "s/$i/$j/g" $k
>cp ./$k /path to execution directory
>done
>done
>done
>MassPercent[Alpha] = ([Alpha]*x)/([Alpha]*x + (N-[Alpha])*y)
>x=[molecular weight of species A]
>y=[molecular weight of species B]
>N=[total number of molecules]
>for i in methanol ethanol isopropanol acetone acetoin
>do
>sed -i 's/methanol/$i/g' input.inp
>sed -i 's/MeOH/$i/g' input.inp
>./packmol < input.inp
>sed -i 's/$i/methanol/g' input.inp
>done
>for file in *.PDB NOT water.pdb ...[other PDBs to ex-clude]
>do
>cd ..
>mkdir $file
>cp [path to TOP and MDP files] $PBS_O_WRKDIR
>sed -i 's/$file/methanol/g' input.inp
/path/tp/packmol/packmol $file.inp
>done
#!/bin/bash
>for ((i=0;i<=10;i++));
>do
> j=$((10*$i))
> ./packmol < EtOHMix$j.inp
> echo "The counter is now EtOH""$j"
> ./packmol < MeOHMix$j.inp
> echo "The counter is now MeOH""$j"
> ./packmol < 2POHMix$j.inp
> echo "The counter is now POH""$j"
>done
>qselect -u $USER -s R | xargs qdel
>qselect -u $USER -s R | xargs qdel
>qselect -u $USER -s R | xargs qdel
>qselect -u $USER | xargs qdel
>qdel -u netid
#!/bin/bash
>module load fftw3
>module load GROMACS-4.5.5
>for i in *.pdb
>do
> j=$((10*$i))
> grompp -f $i.mdp -c $i.pdb –p $i.top -o $i.tpr -maxwarn 10
>done
>for file in *.pdb NOT water.pdb
>do
>grompp_mpi -f grompp.mdp -c $file.pdb -p $file.top -o $file.tpr -maxwarn 7000
>done
>for inputpdb in ethanol methanol isopropanol
>do
>sed command
>[path to packmol]/packmol $inputpdb\.inp
>done
>find . -type f -name '*.tpr' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> tprfilesinpwd.txt
>find /$HOME/ -type f -name '*.tpr' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> tprfilesinhome.txt
>find /$HOME/ -type f -name '*.trr' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> trrfilesinpwd.txt
>find /$HOME/ -type f -name '*.sh' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> shfilesinhome.txt;
>find /$HOME/ -type f -name '*.inp' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> inpfilesinhome.txt;
>find /$HOME/ -type f -name '*.pbs' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> pbsfilesinhome.txt;
>find /$HOME/ -type f -name '*.gro' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> grofilesinhome.txt
>find /$HOME/ -type f -name '*.pdb#' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> shfilesinhome.txt
>find /$HOME/ -type f -name '*.o*' -printf '%TY-%Tm-%Td %TT %p\n' | sort &> Ooutfilesinhome.txt
>find ./pathtofiles/ -type f –size -1024k | xarge tar cfvz myArchive.tar
>find $HOME/ -name "*.tpr" -o -name "*.pbs;" | tar -cf my_archive -T
>tar -cf archive_title find ./pathtodir | grep '.tpr\|.pbs\|.sh'
>pull = umbrella
>pull_geometry = position
; simple distance increase
>pull_dim = N N Y
>pull_start = no ; define initial COM dis-tance > 0
>pull_ngroups = 1
;pull_group0 = SOL
>pull_group1 = PE10
;pull_rate1 = 0.01 ; 0.01 nm per ps = 10 nm per ns
>pull_k1 = 2.479 ; kJ mol^-1 nm^-2
>pull_init1 = 0 0 3
;pull_vec1 = 0 0 5
>pull-nstxout = 10
>DispCorr = EnerPres
;continuation = yes
#!/bin/sh
>for i in EtOHMix00 EtOHMix20 EtOHMix30 EtOHMix40 EtOHMix50 EtOHMix70 EtOHMix80 EtOHMix90 EtOHMix100
>do
>cd
>for j in /fs/lustre/cwr0408/EtOHMix00/*
>do
>k=2.479
#for mdp1.mdp
>cat md1.mdp | sed '$a/pull = umbrella' > md1.mdp
>cat md1.mdp | sed '$a/pull_geometry = position' > md1.mdp
>cat md1.mdp | sed '$a/pull_dim = N N Y' > md1.mdp
>cat md1.mdp | sed '$a/pull_start = no' > md1.mdp
>cat md1.mdp | sed '$a/pull_ngroups = 1' > md1.mdp
>cat md1.mdp | sed '$a/pull_group1 = $j' > md1.mdp
>cat md1.mdp | sed '$a/pull_k1 = $k' > md1.mdp
>cat md1.mdp | sed '$a/pull_init1 = 0 0 5.7' > md1.mdp
>cat md1.mdp | sed '$a/DispCorr = EnerPres' > md1.mdp
>cat md2.mdp | sed '$a/pull = umbrella' > md2.mdp
>cat md2.mdp | sed '$a/pull_geometry = position' > md2.mdp
>cat md2.mdp | sed '$a/pull_dim = N N Y' > md2.mdp
>cat md2.mdp | sed '$a/pull_start = no' > md2.mdp
>cat md2.mdp | sed '$a/pull_ngroups = 1' > md2.mdp
>cat md2.mdp | sed '$a/pull_group1 = $j' > md2.mdp
>cat md2.mdp | sed '$a/pull_k1 = $k' > md2.mdp
>cat md2.mdp | sed '$a/pull_init1 = 0 0 5.7' > md2.mdp
>cat md2.mdp | sed '$a/DispCorr = EnerPres' > md2.mdp
>cat md3.mdp | sed '$a/pull = umbrella' > md3.mdp
>cat md3.mdp | sed '$a/pull_geometry = position' > md3.mdp
>cat md3.mdp | sed '$a/pull_dim = N N Y' > md3.mdp
>cat md3.mdp | sed '$a/pull_start = no' > md3.mdp
>cat md3.mdp | sed '$a/pull_ngroups = 1' > md3.mdp
>cat md3.mdp | sed '$a/pull_group1 = $j' > md3.mdp
>cat md3.mdp | sed '$a/pull_k1 = $k' > md3.mdp
>cat md3.mdp | sed '$a/pull_init1 = 0 0 5.7' > md3.mdp
>cat md3.mdp | sed '$a/DispCorr = EnerPres' > md3.mdp
>done
>done
#!/bin/sh
>for l in EtOHMix00 EtOHMix50 EtOHMix70 EtOMix100
>do
>for k in PE6 PE8
>do
>cp /fs/lustre/cwr0408/ethanol3.top /fs/lustre/cwr0408/$l/$k/ethanol.top
>done
>done