Make sure masses are copied from termini databases
authorErik Lindahl <erik@kth.se>
Fri, 20 Jun 2014 20:50:52 +0000 (22:50 +0200)
committerErik Lindahl <erik@kth.se>
Sat, 21 Jun 2014 09:18:15 +0000 (11:18 +0200)
Masses should always be copied from termini databases,
where they are mandatory since they are specified before
the charge, rather than picking them from atomtypes.atp.
This patch also adjusts a few of the default CHARMM27
charges in atomtypes.atp that deviated in the 3rd decimal.

Fixes #1207.

Change-Id: I6f0c87989ae285ff435cd56c64432988c6634824

share/top/charmm27.ff/aminoacids.n.tdb
src/gromacs/gmxpreprocess/pdb2top.cpp

index 53fc89d5034a747aec39c5e01d28bb69f5841a8e..87d81835ac0eb11d262358ba0ba22fcbffd2dd54 100644 (file)
@@ -2,7 +2,7 @@
 
 [ GLY-NH3+ ]
 [ replace ]
- N     N       NH3             14.0027 -0.3
+ N     N       NH3             14.00 -0.3
  CA    CA      CT2             12.011  0.13
 [ Add ]
  3     4       H       N       CA      C
@@ -12,7 +12,7 @@
 
 [ NH3+ ]
 [ replace ]
- N       N     NH3             14.0027 -0.3
+ N       N     NH3             14.00 -0.3
  CA      CA    CT1             12.011  0.21
  HA      HA    HB              1.008    0.10
 [ Add ]
@@ -23,7 +23,7 @@
 
 [ PRO-NH2+ ]
 [ replace ]
- N       N     NP       14.0027 -0.07
+ N       N     NP       14.007 -0.07
  CA      CA    CP1      12.011  0.16
  CD      CD    CP3      12.011  0.16
 [ add ]
@@ -33,7 +33,7 @@
 ; 
 [ NH2 ]
 [ replace ]
- N             NH2             14.0067 -0.96
+ N             NH2             14.007 -0.96
  CA            CT1             12.011  0.19
  HA            HB              1.008   0.09
 [ add ]
@@ -46,7 +46,7 @@
 ; 
 [ GLY-NH2 ]
 [ replace ]
- N             NH2             14.0067 -0.96
+ N             NH2             14.007 -0.96
  CA            CT2             12.011  0.10
 [ add ]
  2     4       HT      N       CA      C
@@ -58,7 +58,7 @@
 ; 
 [ PRO-NH ]
 [ replace ]
- N             NP      14.0027 -0.40
+ N             NP      14.00 -0.40
  CA            CP1     12.011  -0.08
  CD            CP3     12.011  -0.10
 [ add ]
index 2110a4b32e5d7747649855e736db2a58223ebff3..befb6a6a7ff01f3a912d874a5893680b7dbbf242 100644 (file)
@@ -442,7 +442,7 @@ void choose_watermodel(const char *wmsel, const char *ffdir,
     sfree(model);
 }
 
-static int name2type(t_atoms *at, int **cgnr, gpp_atomtype_t atype,
+static int name2type(t_atoms *at, int **cgnr,
                      t_restp restp[], gmx_residuetype_t rt)
 {
     int         i, j, prevresind, resind, i0, prevcg, cg, curcg;
@@ -492,9 +492,8 @@ static int name2type(t_atoms *at, int **cgnr, gpp_atomtype_t atype,
             j                = search_jtype(&restp[resind], name, bNterm);
             at->atom[i].type = restp[resind].atom[j].type;
             at->atom[i].q    = restp[resind].atom[j].q;
-            at->atom[i].m    = get_atomtype_massA(restp[resind].atom[j].type,
-                                                  atype);
-            cg = restp[resind].cgnr[j];
+            at->atom[i].m    = restp[resind].atom[j].m;
+            cg               = restp[resind].cgnr[j];
             /* A charge group number -1 signals a separate charge group
              * for this atom.
              */
@@ -1562,7 +1561,7 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname,
                atoms, nssbonds, ssbonds,
                bAllowMissing);
 
-    nmissat = name2type(atoms, &cgnr, atype, restp, rt);
+    nmissat = name2type(atoms, &cgnr, restp, rt);
     if (nmissat)
     {
         if (bAllowMissing)