AMBER Archive (2008)

Subject: RE: AMBER: big molecule numbers ( simulation with many formamide molecules )

From: Ross Walker (
Date: Sun Jul 27 2008 - 04:19:41 CDT

Hi Adrien,

>Thank you very much for your help and suggestions .
>But I don?t thing that I completely understood
>writing a quick shell script and the next steps that
>you explained. Could you please explain these jobs in
>details? How can I prepare a quick shell script and how should
>be the quick shell script?s content?

You might want to consider the magnitude of your questions here. What are
you are doing is asking very very busy people to effectively do your
research work for you. Please bear in mind that the help given on the amber
list is free and people are donating their time to help you. This of course
means that they expect the recipients to put in some effort of their own.
The 'solution consulting' you might be expecting here would typically cost
upwards of $250 an hour...

So, to answer your query I would suggest that you search for some good
tutorials on shell scripting in Linux. Searching on Google will turn up a
number of very useful hits that will get you started. Once you have mastered
shell scripting your ability to run complex simulations in support of your
research will be greatly improved. To be honest I think that for anyone
wanting to run simulations learning shell scripting should mandatory. It
might be overkill to learn it for this one off case you want to run but
ultimately you will need this knowledge in the end so why not start now...

As for tleap it will read a list of commands from disk using the -f option.
Hence you can simply create a file (foo.leaprc) say:

source leaprc.ff99SB
foo = loadpdb foo.pdb
bond foo.1.SG foo.10.SG
saveamberparm foo foo_vac1.prmtop foo_vac1.inpcrd
addions foo Na+ 6
solvatebox foo TIP3PBOX 10.0
saveamberparm foo foo_10.0.prmtop foo_10.0.inpcrd

Then you can run tleap with tleap -f foo.leaprc and it will perform all the
commands in the file automatically. You could place the generation of this
file, followed by the running of tleap in a loop that adjusted the value of
'10.0' in the solvatebox command and after each run of tleap grepped out the
number of water molecules and compared it against what you are looking for.

Alternatively you could just do a manual decimal search approach on the
solvatebox command yourself. Get a nice cup of coffee and then:

load tleap, leaprc's etc.

foo = loadpdb foo.pdb
addions foo Na+ 6 (or whatever you need)
foo1 = copy foo
solvatebox foo1 TIP3PBOX 10.0

Now check if the number of water molecules is more or less than you need. If
it is more reduce the 10.0 and try again, or vice versa. E.g.

foo2 = copy foo
solvatebox foo2 TIP3PBOX 9.0

If this were smaller than you need you would then do

foo3 = copy foo
solvatebox foo3 TIP3PBOX 9.5


foo4 = copy foo
solvatebox foo4 TIP3PBOX 9.55

etc etc.

All the best

The AMBER Mail Reflector
To post, send mail to
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)