AMBER Archive (2006)Subject: Re: AMBER: leap usage
From: Mark Williamson (Mark.Williamson_at_imperial.ac.uk)
Date: Thu Nov 02 2006 - 09:26:42 CST
Stefano Federico Massimiliano Pieraccini (Stefano.Pieraccini) wrote:
> Dear Amber Users,
>
> We would like to create a series of .top files from pdb files having one
> mutation each. Is it possible to use leap in a non interactive way, so that it
Hi,
Yes it is. One can use tleap and pass it a script of predefined
commands. For example, one creates "leap.bat" containing all the
instructions you want leap to carry out:
[]$ cat leap.bat
source leaprc.gaff
source leaprc.rna.ff99
loadamberprep myprep.prepi
...rest of commands etc.....
saveamberparm mymol mytop.prmtop mycrd.inpcrd
quit
and then actually carry out these commands:
[]$ $AMBERHOME/exe/tleap -f leap.bat
More specific to the needs outlined in your question; one can extend
this much further with a bit of bash scripting:
[]$ chmod +x go
[]$ cat go
#!/bin/bash
wget http://www.rcsb.org/pdb/files/1q8n.pdb.gz
gunzip 1q8n.pdb.gz
#take out only one instance of the system
cat 1q8n.pdb| head -n 1407 > 1q8n_only_one_mgr.pdb
#grep out mg coordinates only
grep MGR 1q8n_only_one_mgr.pdb | grep HETATM > mgr.pdb
export AMBERHOME=/opt/amber-9.17
#ANTECHAMBER stuff
$AMBERHOME/exe/antechamber -i mgr.pdb -fi pdb -o mgr.prepi -fo prepi -c
bcc -s 2 -nc 1
$AMBERHOME/exe/parmchk -i mgr.prepi -f prepi -o mgr.frcmod
#LEAP Stuff
cat > leap.bat << EOF
source leaprc.gaff
source leaprc.rna.ff99
loadamberprep mgr.prepi
loadamberparams mgr.frcmod
addPdbAtomMap {
{ "H2*" "H2'1" }
}
mymol = loadpdb 1q8n_only_one_mgr.pdb
saveamberparm mymol mgrcomplex.prmtop mgrcomplex.inpcrd
quit
EOF
rm leap.log
$AMBERHOME/exe/tleap -f leap.bat
This script will download a PDB from the rcsb database which contains a
section of RNA wrapped around a small organic molecule. The script will
tidy up some internals in the PDB since it contains multiple structures.
It then extracts out the organic molecule, which is a non standard
residue, and passes it to antechamber for parameterization. Next it
loads the molecule and RNA into leap along with the prep and frcmod
which antechamber has created. Finally it saves the complete structure
in prmtop format with an associated coordinate file.
This example is just that, an example. Do not infer any scientific
results from it; just focus on the protocol I have shown. You could
perhaps functionalise this to say automatically get a specific PDB file
from a four code parameter, solvate it and carry out some MD on it. Of
course this could be done using any other scripting language, but I tend
to use the one that is most high level as long as speed is not an issue.
Have a look at these notes on BASH scripting here:
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
Scripting one's work in this manner is, IMHO, a very good idea, since
you can come back to your work years later and be certain of repeating a
exact set of steps if you want to carry them out again.
regards,
Mark
http://dumb.ch.ic.ac.uk/~mjw99/
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu
|