marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
84 stars 37 forks source link

Amber mapping ignores hydrogen in BB #498

Closed fgrunewald closed 1 year ago

fgrunewald commented 1 year ago

The Bug

It seems the amber mapping files do not produce the expected mapped coordinates. The difference is typically very small (i.e. sub Angstrom), which is probably why it wasn't noticed. However, this might cause problems later down the line especially when using the martinized PDB file as reference for the EN other other things.

Files to reproduce the bug

Simple ALA input PDB.

TITLE     PSI
REMARK    THIS IS A SIMULATION BOX
CRYST1  101.000  101.000  101.000  90.00  90.00  90.00 P 1           1
MODEL        1
ATOM      1  N    ALA  652      15.180   2.910   2.110  1.00  0.00           N
ATOM      2  H    ALA  652      15.030   3.680   2.730  1.00  0.00           H
ATOM      3  CA   ALA  652      14.680   1.590   2.480  1.00  0.00           C
ATOM      4  HA   ALA  652      15.450   0.960   2.340  1.00  0.00           H
ATOM      5  CB   ALA  652      14.270   1.570   3.950  1.00  0.00           C
ATOM      6  HB1  ALA  652      13.930   0.670   4.190  1.00  0.00           H
ATOM      7  HB2  ALA  652      15.050   1.800   4.520  1.00  0.00           H
ATOM      8  HB3  ALA  652      13.540   2.250   4.090  1.00  0.00           H
ATOM      9  C    ALA  652      13.520   1.160   1.590  1.00  0.00           C
ATOM     10  O    ALA  652      13.690   0.380   0.660  1.00  0.00           O
TER
ENDMDL

This should map to:

ATOM      1  SC1 ALA X   1      14.198   1.572   4.188  1.00  0.00              
ATOM      2  BB  ASP X   2       11.397   1.038   1.498  1.00  0.00              

But it actually maps to:

ATOM      1 BB   ALA     1      14.259   1.478   1.647  1.00  0.00              
ATOM      2 SC1  ALA     1      14.270   1.570   3.950  1.00  0.00              

The relevant command is:

martinize2 -f ALA.pdb -ff martini3001 -x cg_ala.pdb -from amber

Solution

Remove the '!' from the mapping files. However, this seems to be in contradiction to what their actual purpose was (i.e. indicate optional hydrogen atoms to map). As I understand it optional means use them if present. @pckroon did I understand the mapping file syntax incorrectly.

pckroon commented 1 year ago

No. The "!" means give these 0 weight. There is no such thing as optional in the mappings. And it doesn't have to be, since the graph is always complete.

fgrunewald commented 1 year ago

@pckroon ok! Still not correct and thus a bug. So we have to remove the !