Vous êtes sur la page 1sur 7

Gromacs explained - Chembytes Page 1 of 7

Chembytes Create account or Sign in


Quick Links The Mac Corner
computational
Contacts
chemistry
Blog
in action
Forum Search this site Search

Carbon Nanotubes for Sale


Gromacs explained
carbon nanotubes - SWNTs: » Gromacs explained
raw, purified, water soluble
carbonsolution.com The easiest way to start using
Type B Aortic Repair
Gromacs
Learn About Aneurysm Finally the time to speak about
Causes, Signs, & Innovative GROMACS is come. I'm still
Treatment Options experimenting with GROMACS, so
www.ThoracicAorticDissection.com
when you read something… think
about it. I have not abandoned
TINKER, but I have reached its limit
(namely the I cannot compile it for
Tag Cloud the amount of atoms I need). Plus, I
will have to move towards coarse
grain models, and GROMACS is the
right way to go. I think I will work
with both the programs to try to get
the best from both.

This wiki will never replace the official GROMACS wiki


or the manual or the GROMACS mailing list (1, 2). As
for the page dedicated to TINKER, I will report here
my experience and how I do the things, hopefully in
the right way (if not, please tell me, I'm open to
discussion). My suggestion is to read this wiki with an
eye on the official documentation and support and
always be critical about what you read here. ;)

Google search Fold


Table of Contents
Obtaining GROMACS
Search License agreement and references
Custom Search Force Field parameter sets
Compile GROMACS (linux) in serial and parallel
(mpi/openmpi)
Submit GROMACS calculation on clusters using a
queuing system
Chembytes Troubleshooting, aka WTF?!
Resources pdb2gmx seems to be stuck and my cpu is
used at 99%
Tip and Tricks, aka How can I do this and that?
• Cheatsheets Cleanup Gromacs working dir: better safe
• References' collection than sorry
• Calendar gro file: format and unit cell
• Useful Software Modelling Carbon Nanotubes
• Links Organize your files with mdrun
Polymer chains: the Polyamide 6 test case
Comments

http://chembytes.wikidot.com/gromacs-wiki 2010/10/31
Gromacs explained - Chembytes Page 2 of 7

Obtaining GROMACS
Watchers
GROMACS is a versatile package to perform molecular
AndreaMinoia dynamics, i.e. simulate the Newtonian equations of
motion for systems with hundreds to millions of
Watch: site | category | particles.
page It is primarily designed for biochemical molecules like
proteins, lipids and nucleic acids that have a lot of
This site is complicated bonded interactions, but since GROMACS
is extremely fast at calculating the nonbonded
Coffeeware interactions (that usually dominate simulations) many
groups are also using it for research on non-biological
systems, e.g. polymers. (From GROMACS wiki)
Care to help maintaining
You can download GROMACS here.
Chembytes? send over a th
Today (December, 7 2009) version 4.0.7 was
buck or two or disable your
release. Gromacs
ads blocker for this site, if
you have one. Thank you. (top)

License agreement and


edit this panel
references
GROMACS is freeware and distributed under GNU
General Public License
Selected references for GROMACS:
Berendsen, et al. (1995) Comp. Phys. Comm. 91: 43-
56.
Lindahl, et al. (2001) J. Mol. Model. 7: 306-317.
van der Spoel, et al. (2005) J. Comput. Chem. 26:
1701-1718.
Hess, et al. (2008) J. Chem. Theory Comput. 4: 435-
447.

(top)

Force Field parameter sets


GROMACS is shipped with many customized force
field (FF) parameter sets for proteins, organic
molecules, inorganic systems and so on. Here the list
of the available FF (TINKER 4.2):

• AMBER
• CHARMM
• COARSE GRAINING FORCE FIELS
• GROMOS
• OPLS

A description for the FFs is here.

(top)

http://chembytes.wikidot.com/gromacs-wiki 2010/10/31
Gromacs explained - Chembytes Page 3 of 7

Compile GROMACS (linux) in


serial and parallel
(mpi/openmpi)
GROMACS can be (quite) easily installed on linux, at
least in a standard way:

./configure --prefix=/home/user/gmx
./make
./make install

The executables will then be created


in /home/user/gmx/bin. Much compete instructions
can be found here.

If you want to compile gromacs in parallel, you will


need mpi or openmpi installed. Actually, the only
executable you need to compile for mpi is mdrun. So,
install gromacs in the usual way and then execute

./configure --prefix=/home/user/gmx --program


./make mdrun
./make install-mdrun

In this way you will find the executable mdrun_mpi


for parallel use.
In order to submit openmpi parallel calculation on two
nodes on my Ubuntu desktop, I needed to start
lamboot and then execute mdrun_mpi as following:

mpiexec.openmpi -np 2 /home/user/gmx/bin/mdru

If you are too scared to compile your version of


GROMACS, you can try to see if a recent version is
available in the repositories of your linux distribution,
e.g. Ubuntu.

(top)

Submit GROMACS calculation on


clusters using a queuing system
Here some examples of scripts used to submit
GROMACS calculations on different clusters and
different queuing systems.

• If you are in my lab, the following two scripts


works for the ISCF cluster in Namur:

1. Serial version

#!/bin/bash
#$ -l virtual_free=4G

http://chembytes.wikidot.com/gromacs-wiki 2010/10/31
Gromacs explained - Chembytes Page 4 of 7

#$ -l h_cpu=00:10:00
#$ -N gromacs

module load gromacs

grompp -c b13824_steeped.gro -o b13824.top -


mdrun -s b13824_mdHP.tpr -deffnm b13824_equil

2. Parallel version

#!/bin/bash
#$ -l virtual_free=4G
#$ -l h_cpu=00:10:00
#$ -pe gromacs_smp 2
#$ -N gromacs

module load gromacs

grompp -c b13824_steeped.gro -o b13824.top -


mdrun -s b13824_mdHP.tpr -deffnm b13824_equil

• Here some working drafts for a gromacs


submitting scripts for the new cluster in the lab
(lucky and william):

1. Serial version

#!/bin/bash
#PBS -l nodes=1:ppn=1,walltime=50:00:00,mem=
#PBS -M your_mail_address
# Send me mail when job begins end and aborts
#PBS -m bea
#PBS -N jobname

# grompp is executed out the script


export tpr=md

cd /scratch

# create new dir with unique name nased on jo


export dirname=$PBS_JOBID
mkdir /scratch/$dirname

cd $PBS_O_WORKDIR

cp $tpr.tpr /scratch/$dirname
cd /scratch/$dirname

# execute mdrun
~/software/gmx4.0.7/bin/mdrun -s $tpr.tpr -de

#move back the data (entire directory)


mv /scratch/$dirname $PBS_O_WORKDIR

(top)

http://chembytes.wikidot.com/gromacs-wiki 2010/10/31
Gromacs explained - Chembytes Page 5 of 7

Troubleshooting, aka WTF?!


pdb2gmx seems to be stuck and my cpu
is used at 99%
Are you trying to create a gro file using custom .atp,
.rtp and .itp files? Yeah, I got myself in this situation
too and what I noticed was that I had an empty line
at the end of my .atp file. It seems pdb2gmx does
not handle this very well.

(top)

Tip and Tricks, aka How can I


do this and that?
Cleanup Gromacs working dir: better
safe than sorry
Gromacs writes a huge number of files in the working
dir: log files, restarting files and backup files… a lot of
backup files. Usually I "amuse" myself with

rm -f *# md* ener* traj*

in particular when I'm setting up the system and not


everything is working like a charm. And then, of
course, sometimes a typo slips in:

rm -rf * # md* ener* traj*

did you notice the devil space between * and #? eh…


So, here a small bash script, I called cg, to avoid the
problem:

#!/bin/bash
# This script is used to safately clean up th
# stored in a directory. If ' * ' is detected
# of files to remove, the script will die wit
# any file. This is convenient when working w
# directories and files.
# Author: Andrea Minoia
# Mail: minoiaa@gmail.com / http://chembytes.

#counts only files that can be actually remov


ref=`find . -maxdepth 1 -type f -print | wc
echo "Number of files you ask to delete: $#/$
echo ""
if [ "$#" -ge "$ref" ]
then
echo '===8o| you were about to delete all the
exit
fi

http://chembytes.wikidot.com/gromacs-wiki 2010/10/31
Gromacs explained - Chembytes Page 6 of 7

rm -f $@

The script works exactly as rm -f but it counts the


number of files you are asking to delete and compare
it with the number of files present in the directory. If
you are going to delete all the files, an error is
prompt and no file will be cancelled. Better Safe than
sorry ;)

gro file: format and unit cell


The gro file contains the atomic coordinates and the
size (and shape) of the unit cell. The file is fix format,
so if you need to write a gro file using your home
made script, here the right format: Read more...

Modelling Carbon Nanotubes


Online there are many documents about GROMACS
and Carbon Nanotube (CNTs) (1, 2, 3, ...). Even after
lots of reading I didn't find what I was looking for: a
clear and simple guide to model single- or multi-wall
carbon nanotubes (SWNT, MWNT), either periodic and
non-periodic.
It takes me a while to find this procedure that does
the things as I wanted. I needed a program to build a
periodic CNT and create the topology for GROMACS
using x2top. Read more...

Organize your files with mdrun


As told previously, gromacs writes a lot of files, in
particular mdrun. You can assign to all those file the
same name using the mdrun option -deffnm.

Polymer chains: the Polyamide 6 test


case
coming soon …

(top)

Comments
Add a New Comment

C++
C++ Experts are Ready to Help. Join Now for Free.
CFanatic.com/CPlusPlus-Programming

Page tags: gromacs

Powered by Help | Terms of Service | Privacy | Report a bug | Flag as objectionable


Wikidot.com

http://chembytes.wikidot.com/gromacs-wiki 2010/10/31
Gromacs explained - Chembytes Page 7 of 7

Unless otherwise stated, the content of this page is licensed under Creative Commons
Attribution-ShareAlike 3.0 License

http://chembytes.wikidot.com/gromacs-wiki 2010/10/31

Vous aimerez peut-être aussi