Difference between revisions of "Creating movies (.mpg) of paths using OPTIM"

From CUC3
Jump to navigation Jump to search
import>Jmc49
import>Jmc49
Line 1: Line 1:
The aim is to take a discrete path and use OPTIM to fill in the gaps between the stationary points by writing extra frames of coordinates from the two approximate steepest-descent paths that set off from each transition state in the path. Otherwise, movies made from just the stationary points would be very jerky!
+
The aim is to take a discrete path -- just the sequence of stationary points -- and use OPTIM to fill in the gaps between the stationary points by writing extra frames of coordinates from the two approximate steepest-descent paths that set off from each transition state. Otherwise, movies made from just the stationary points would be very jerky!
   
 
What's described below works for charmm, and contains charmm-specific setup information. Don't rely on this necessarily working without modification for other systems...
 
What's described below works for charmm, and contains charmm-specific setup information. Don't rely on this necessarily working without modification for other systems...
Line 23: Line 23:
   
 
Interesting output: ''EofS'', which you can look at with gnuplot or similar, and ''path.xyz''.
 
Interesting output: ''EofS'', which you can look at with gnuplot or similar, and ''path.xyz''.
 
 
''path.xyz'' needs to be edited to give input appropriate for VMD or other protein-y viewer. The number of atoms and comment line at the top of each frame of coordinates need to be removed, as do the atom labels at the start of each line of coordinates (these can be replaced by spaces).
 
''path.xyz'' needs to be edited to give input appropriate for VMD or other protein-y viewer. The number of atoms and comment line at the top of each frame of coordinates need to be removed, as do the atom labels at the start of each line of coordinates (these can be replaced by spaces).
   
 
There are, of course, many ways of doing this, but here's my favourite :-)
 
There are, of course, many ways of doing this, but here's my favourite :-)
   
sed '/Energy/d' path.xyz > foo
+
sed -e '/Energy/d' -e '/ 160$/d' path.xyz > foo
sed '/ 160$/d' foo > bar
 
 
 
Note the number of atoms in the second command... it'd probably be best to replace this with an appropriate value for your system ;-)
+
Note the number of atoms in the second regular expression (after the space)... it'd probably be best to replace this with an appropriate value for your system ;-)
   
 
and, using vi in command mode, do a
 
and, using vi in command mode, do a
Line 37: Line 35:
 
:%s/^[A-Z]/ /g
 
:%s/^[A-Z]/ /g
   
on the opened file ''bar''. You'll need to edit this if your atom labels are 2+ characters long...
+
on the opened file ''foo''. You'll need to edit this if your atom labels are 2+ characters long...
   
 
Then, to convert this very bare format to pdb format, run
 
Then, to convert this very bare format to pdb format, run
 
 
python ~wales/bin/points2pdb_combined.py input.crd bar
+
python ~wales/bin/points2pdb_combined.py input.crd foo
   
 
where input.crd can be any old coordinate file for this system, in .crd format. It's just used as a template for the residue names and atom types.
 
where input.crd can be any old coordinate file for this system, in .crd format. It's just used as a template for the residue names and atom types.
   
Output from this is a file ''bar.pdb'': coordinate frames in PDB format, separated by the END line used in PDB files.
+
Output from this is a file ''foo.pdb'': coordinate frames in PDB format, separated by the END line used in PDB files.

Revision as of 22:22, 28 July 2008

The aim is to take a discrete path -- just the sequence of stationary points -- and use OPTIM to fill in the gaps between the stationary points by writing extra frames of coordinates from the two approximate steepest-descent paths that set off from each transition state. Otherwise, movies made from just the stationary points would be very jerky!

What's described below works for charmm, and contains charmm-specific setup information. Don't rely on this necessarily working without modification for other systems...

Set up an OPTIM NEWCONNECT job in the usual way. Make sure files odata, input.crd, finish and perm.allow (if applicable) are present. input.crd and finish must contain the start and end minima, in CHARMM's crd format.

Add the following lines to odata:

ALLPOINTS
REDOPATH

where ...

and make sure there's a PATH line like this one:

PATH 100 0.001

You also need the key ingredient to be present in the same directory: a file called redopoints, which contains just the coordinates of the stationary points (minima and TSs) on the path you're interested in, in bare xyz format (like points). redopoints contains the sequence of stationary points encountered along the path, starting from the end minimum and travelling backwards (!) redopoints* files are generated in Dijkstra and k-shortest-path rate constant calculations, for instance.

Ready to go... set off the OPTIM job.

Check the OPTIM main output file; sometimes different connected minima are found by stepping off a particular TS than you were expecting. If this happens, then try rerunning with a smaller value of PUSHOFF...

Interesting output: EofS, which you can look at with gnuplot or similar, and path.xyz. path.xyz needs to be edited to give input appropriate for VMD or other protein-y viewer. The number of atoms and comment line at the top of each frame of coordinates need to be removed, as do the atom labels at the start of each line of coordinates (these can be replaced by spaces).

There are, of course, many ways of doing this, but here's my favourite :-)

sed -e '/Energy/d' -e '/ 160$/d' path.xyz > foo

Note the number of atoms in the second regular expression (after the space)... it'd probably be best to replace this with an appropriate value for your system ;-)

and, using vi in command mode, do a

:%s/^[A-Z]/ /g

on the opened file foo. You'll need to edit this if your atom labels are 2+ characters long...

Then, to convert this very bare format to pdb format, run

python ~wales/bin/points2pdb_combined.py input.crd foo

where input.crd can be any old coordinate file for this system, in .crd format. It's just used as a template for the residue names and atom types.

Output from this is a file foo.pdb: coordinate frames in PDB format, separated by the END line used in PDB files.