[gmx-developers] modify pdb2gmx and/or g_protonate in order to add specific hydrogen name

Mark Abraham mark.j.abraham at gmail.com
Sat Feb 2 22:24:56 CET 2013

On Fri, Feb 1, 2013 at 7:40 PM, Emanuel Peter <
Emanuel.Peter at chemie.uni-regensburg.de> wrote:

> I would try in the hdb entry
> H12A C13 N C12
> H13B C13 N C14
> H13C C13 N C15
> or
> H12A C13 C12 C14
> H13B C13 C12 C15
> H13C C13 N C16
> and then afterwards minimize.....
> Others might know a better way.
> This way was (for me) the easiest way.
> After minimization I got a reasonable protonation.

Even if you can abuse pdb2gmx to put three hydrogens in like this, you
still have to get lucky that EM can sort out the problems. If it's only a
naming problem, it's much more reliable to rename the atoms...

Best and good luck,
> Emanuel
> >>> Landry Charlier <landry.charlier at univ-montp1.fr> 02/01/13 12:51 AM >>>
> Hello,
> I have some problems in order to automatically add hydrogen to lipids
> with charmm36 force field. Indeed, when several hydrogen have to be
> added to the same atom, the command pdb2gmx -ignh or g_protonate add
> them with the same name but with the last number incremented by 1
> thanks to the .hdb file.
> Example : for charmm36, the hydrogens added to the CB atom of ARG are
> named HB1 & HB2 thanks to the line "2 6 HB CB CG CA" in the
> aminoacids.hdb file.
> For lipids, the hydrogen names differ by a letter. H13A, H13B H13C are
> linked to C13 in POPC in charmm36 for example.
> I would like to modify g_protonate or pdb2gmx in order to add hydrogen
> with a specific name like that:
> - If only 1 name is written in hdb file and several atoms have to be
> added, the hydrogen names have been incremented by 1 as it's by
> default (see the example of Arg above).
> - If there are as many names as the number of hydrogen to add, pdb2gmx
> and/or g_protonate will choose these names. The hdb file should be
> like this : 3 4 H13A,H13B,H13C C13 N C12
> But I check the g_protonate and pdb2gmx files in the source code and I
> am not enough good in programming for modify them.
> Could you help me please?

You've not been completely clear on why you need the atoms named
differently, so I'll assume you need some output file from pdb2gmx to have
atom names that match something else. If so, it is much easier to use sed
three times to do the necessary changes than to think about touching C
code. For example:
sed -e 's/H131/H13A' infile > outfile

Since you've got a script calling pdb2gmx anyway (hint, hint), you don't
even have to remember the magic words once you write them!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130202/91d26e5d/attachment.html>

More information about the gromacs.org_gmx-developers mailing list