From: Alexey Shvetsov Date: Wed, 6 May 2015 22:10:58 +0000 (+0300) Subject: Make bond-atomtypes case sensitive X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=132da9fb91c821ddd1d29c457a596d276d2726fc;p=alexxy%2Fgromacs.git Make bond-atomtypes case sensitive 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 --- diff --git a/share/top/charmm27.ff/ffnabonded.itp b/share/top/charmm27.ff/ffnabonded.itp index 605788ff73..997f5aa97f 100644 --- a/share/top/charmm27.ff/ffnabonded.itp +++ b/share/top/charmm27.ff/ffnabonded.itp @@ -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 diff --git a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.c b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.c index 6a39e71f88..7fd0a82932 100644 --- a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.c +++ b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.c @@ -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 + #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; }