Make bond-atomtypes case sensitive
authorAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Wed, 6 May 2015 22:10:58 +0000 (01:10 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 16 May 2015 11:17:34 +0000 (13:17 +0200)
This change is needed for e.g. the glycam force field to work.
This change makes the bond-atomtype handling consistent with the
normal atom type handling, which was already made case sensitive.
Note that this only requires case matching internally within the
force field files, this does not affect handling of user input.

Changed the (inconsistent) bond-atomtypes to uppercase for two
dihedrals parameter lines in charmm27.

Change-Id: I27a37543393e503ab836377c992e5e0c6c57e852

share/top/charmm27.ff/ffnabonded.itp
src/gromacs/gmxpreprocess/gpp_bond_atomtype.c

index 605788ff73566d12ef8e477b1db13eedabd96674..997f5aa97f3f3d1ea7ef673c40962c1196c9b18d 100644 (file)
@@ -519,8 +519,8 @@ P   ON2     CN7B    HN7     9       0.0     0.0     3
 P      ON2     CN8B    HN8     9       0.0     0.0     3
 P      ON2     CN8     HN8     9       0.0     0.0     3
 P      ON2     CN9     HN9     9       0.0     0.0     3
-cn9    cn8     cn8     cn9     9       0.0     0.6276  1
-cn9    cn8     cn8     cn8     9       0.0     0.6276  1
+CN9    CN8     CN8     CN9     9       0.0     0.6276  1
+CN9    CN8     CN8     CN8     9       0.0     0.6276  1
 NN2B   CN1T    NN2U    CN1     9       180.0   6.276   2
 CN1T   NN2U    CN1     CN3     9       180.0   6.276   2
 NN2U   CN1     CN3     CN3     9       180.0   6.276   2
index 6a39e71f88de1d02f7979549a9bac577772bb61e..7fd0a829322b57c4cec14caf7125b33ff05649f4 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2014, by the GROMACS development team, led by
+ * Copyright (c) 2011,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,6 +38,8 @@
 
 #include "gpp_bond_atomtype.h"
 
+#include <string.h>
+
 #include "gromacs/legacyheaders/macros.h"
 #include "gromacs/topology/symtab.h"
 #include "gromacs/utility/cstringutil.h"
@@ -56,7 +58,8 @@ int get_bond_atomtype_type(char *str, t_bond_atomtype at)
 
     for (i = 0; (i < ga->nr); i++)
     {
-        if (gmx_strcasecmp(str, *(ga->atomname[i])) == 0)
+        /* Atom types are always case sensitive */
+        if (strcmp(str, *(ga->atomname[i])) == 0)
         {
             return i;
         }