Relaxing existing minima with new potential and creating new database
Sometimes it may happen that you need to change potential. All minima that you found using previous potential can be relaxed in new potential and you do not need to start your job from the very beginning!
There is quite simple way to do it. First you need to extract coordinates of all minima from binary file points.min and minimize each structure using new potential, and then you have to create new points.min file.
Here is a step-by-step recipe:
0. update potential - in case of AMBER users it means new topology file
1. create subdirectory relax_min
mkdir relax_min
2. copy some necessary files to that subdirectory:
AMBER users:
cp points.min min.data odata.start perm.allow coords.prmtop coords.inpcrd min.in relax_min
CHARMM users:
cp points.min min.data odata.start perm.allow input.crd relax_min
3. change name of odata.start into odata (the same file is used in BHINTERP calculations, see here)
mv odata.start odata
4. AMBER users: create script relax as follows:
#!/bin/csh set count = 1 while ($count < 621) echo NATOMS 3002 > pathdata echo COPYFILES coords.prmtop coords.inpcrd min.in >> pathdata echo AMBER9 >> pathdata echo EXTRACTMIN $count >> pathdata /home/wales/bin/pathsample.2.1 >& pathsample.out mv extractedmin start (time /home/wales/bin/A9OPTIM.4.0) >& OPTIM.$count cp min.data.info min.data.info.$count head -1 min.data.info >> min.data.check @ count +=1 end
CHARMM users: create script relax as follows:
#!/bin/csh set count = 1 while ($count < 621) echo NATOMS 3002 > pathdata echo COPYFILES input.crd >> pathdata echo CHARMM >> pathdata echo EXTRACTMIN $count >> pathdata /home/wales/bin/pathsample.2.1 >& pathsample.out (time /home/wales/bin/COPTIM.4.0.31_64) >& OPTIM.$count cp min.data.info min.data.info.$count head -1 min.data.info >> min.data.check @ count +=1 end
NOTE: some values in this script are relevant to my system, like NATOMS=3002, so you need to change it according to atom number of your system. The number of count is equal to number of minima in your database + 1 (number of lines in min.data file, where is blank line on th end) therefore this value should be also changed according to your min.data file. Paths to executables should be also updated if necessary.
5. submit this script to queue on cluster:
#PBS -q s1 cd $PBS_O_WORKDIR ./relax
When finished you get a set of min.data.info.* files with coordinates that are optimized using new potential (if you didn't forget to update the force field :)).
6. next step: creation new binary file points.min; you will need new pathdata file:
READMIN min.data.info.all NATOMS 3002 TEMPERATURE 0.592 GEOMDIFFTOL 0.1 TRIPLES STARTTRIPLES ADDTRIPLES
AMBER users: add to pathdata file these three lines:
EXEC /home/wales/bin/A9OPTIM.4.0 COPYFILES perm.allow coords.inpcrd coords.prmtop min.in AMBER9
CHARMM users: add to pathdata file these three lines:
EXEC /home/wales/bin/OPTIM.4.0.31_64 COPYFILES perm.allow input.crd CHARMM
File min.data.info.all contains all min.data.info.* files and you can use cat command to make it easily (as is shown in next step).
7. remove old points.min and min.data files as well as min.A and min.B, and submit this script to the queue on cluster:
#PBS -q t1 cd $PBS_O_WORKDIR for i in `find . -name "min.data.info*" `; do cat $i>> min.data.info.all; done /home/wales/bin/pathsample.2.1 >& pathsample2.out
That's all! Now you have new min.data and points.min files. Flags -t -r ensure the same order of minima as in previous points.min file. It is useful because both endpoints should be placed again on the first and second positions and without these flags files can be sorted in a bit different order. Still it is worthy to check where in fact both endpoints are placed in new database. Minimize both endpoints in new potential to get their energies. If energies on first and second positions in new min.data file correspond to energies of minimized endpoints - it's OK! If not, you need to edit min.data and points.min files as is described here.