[gmx-users] Converting pdb from CHARMM-GUI with pdb2gmx

Justin Lemkul jalemkul at vt.edu
Fri Mar 23 11:53:35 CET 2018

On 3/21/18 11:40 PM, Lewis Martin wrote:
> To answer my own question, the MacKerell website has the correct parameter
> files for GROMACS to use via pdb2gmx:
> http://mackerell.umaryland.edu/charmm_ff.shtml#gromacs , put this in the
> same directory.
> I'm now following instructions from various gromacs mailing list posts and
> tutorials. Specifically, to remove water and ions (since .itp files already
> exist for these) and then run pdb2gmx. Following this, add lines like this:
> #include "charmm36-jul2017.ff/tip3p.itp" for water and ions to your new
> topol.top, and lines like this:
> SOL             21930
> NA                 57
> CL                 63
> to the [ molecules ] section.
> Finally, grompp gives this error:
> gmx grompp -f mdout.mdp -c myfile.pdb -p topol.top
> number of coordinates in coordinate file (myfile.pdb, 114864) does not
> match topology (topol.top, 118925)
> How is grompp counting the number of coordinates in the topology file? It's

grompp reads the number of entries in the [molecules] directive of the 
.top and multiplies each by the number of atoms in the corresponding 

If you're doing manual hacking of a coordinate and/or topology file, you 
have to do your own bookkeeping, and do it carefully. This error is 
almost always due to simple mistakes in counting the number of species 


> suspiciously close to being right... But it doesn't add up to the number of
> ions, lipid, water, or protein atoms. Is it just number of molecules x
> number of atoms in .itp file? Should each POPC residue have a TER record
> after it since they're not linked in a chain?
> Thanks.
> On Wed, Mar 21, 2018 at 3:04 PM, Lewis J Martin <lewis.martin44 at gmail.com>
> wrote:
>> Hi all,
>> I'd like to run simulations using virtual site hydrogens to allow
>> increased timestep. I can't find a tool for generating HMR hydrogens
>> (common in Amber) so Im looking at vsites.
>> For convenience I'm using CHARMM-GUI. Is pdb2gmx the correct tool to
>> introduce vsites? Using it, I keep coming across:
>> 'Atom OT1 in residue VAL 364 was not found in rtp entry VAL with 16 atoms
>> while sorting atoms.'
>> This suggests a problem with the terminal patch, yet using the -ter flag
>> and choosing the terminal patch  results in the same issue. Inspection of
>> the file 'aminoacids.c.tdb' suggests that OT1 is indeed included in the
>> parameters.
>> So I turned to other tools like psf2top and ParmEd. psf2top works
>> beautifully, but can't include vsites. Can you add vsites directly to
>> .top/gro files without pdb2gmx?
>> Any info is appreciated.
>> Cheers
>> Lewis


Justin A. Lemkul, Ph.D.
Assistant Professor
Virginia Tech Department of Biochemistry

303 Engel Hall
340 West Campus Dr.
Blacksburg, VA 24061

jalemkul at vt.edu | (540) 231-3129


More information about the gromacs.org_gmx-users mailing list