Remove GMX_NOCHARGEGROUPS
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 8 Sep 2015 12:32:32 +0000 (14:32 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 16 Sep 2015 12:21:36 +0000 (14:21 +0200)
Berk introduced this in e82d62ed0. It won't have a purpose in the
Verlet scheme, because no charge groups exist. Even if it does still
have a purpose, tpxio.c is not the place to do the transformation.

Change-Id: I1a2d79d004f64b6fdb772f712ac16616516741c3

docs/user-guide/environment-variables.rst
src/gromacs/fileio/tpxio.cpp
src/gromacs/topology/mtop_util.cpp
src/gromacs/topology/mtop_util.h

index f84247a75192fa2c03e5f4fbf89543c9fe4fb8ac..c24f2b86c28cc65eda45c8d923dc7fc0113f30c7 100644 (file)
@@ -277,10 +277,6 @@ Performance and Run Control
 ``GMX_NO_PULLVIR``
         when set, do not add virial contribution to COM pull forces.
 
-``GMX_NOCHARGEGROUPS``
-        disables multi-atom charge groups, i.e. each atom
-        in all non-solvent molecules is assigned its own charge group.
-
 ``GMX_NOPREDICT``
         shell positions are not predicted.
 
index 272e8000b7b6ef0426ad246341e5b6240201c455..6158f17f8cdc7f0bb2bde37a9ec37ef2197cdda6 100644 (file)
@@ -3453,27 +3453,6 @@ static int do_tpx(t_fileio *fio, gmx_bool bRead,
         {
             gmx_mtop_finalize(mtop);
         }
-
-        if (file_version >= 57)
-        {
-            char *env;
-            int   ienv;
-            env = getenv("GMX_NOCHARGEGROUPS");
-            if (env != NULL)
-            {
-                sscanf(env, "%d", &ienv);
-                fprintf(stderr, "\nFound env.var. GMX_NOCHARGEGROUPS = %d\n",
-                        ienv);
-                if (ienv > 0)
-                {
-                    fprintf(stderr,
-                            "Will make single atomic charge groups in non-solvent%s\n",
-                            ienv > 1 ? " and solvent" : "");
-                    gmx_mtop_make_atomic_charge_groups(mtop, ienv == 1);
-                }
-                fprintf(stderr, "\n");
-            }
-        }
     }
 
     return ePBC;
index f6be25d91ebe515f4286cd756c741b5ca0ef4380..a975a3db9a868dbcd10c26b82f9489aedd4dc2aa 100644 (file)
@@ -860,28 +860,6 @@ t_atoms gmx_mtop_global_atoms(const gmx_mtop_t *mtop)
     return atoms;
 }
 
-void gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop,
-                                        gmx_bool    bKeepSingleMolCG)
-{
-    int      mb, cg;
-    t_block *cgs_mol;
-
-    for (mb = 0; mb < mtop->nmolblock; mb++)
-    {
-        cgs_mol = &mtop->moltype[mtop->molblock[mb].type].cgs;
-        if (!(bKeepSingleMolCG && cgs_mol->nr == 1))
-        {
-            cgs_mol->nr           = mtop->molblock[mb].natoms_mol;
-            cgs_mol->nalloc_index = cgs_mol->nr + 1;
-            srenew(cgs_mol->index, cgs_mol->nalloc_index);
-            for (cg = 0; cg < cgs_mol->nr+1; cg++)
-            {
-                cgs_mol->index[cg] = cg;
-            }
-        }
-    }
-}
-
 /*
  * The cat routines below are old code from src/kernel/topcat.c
  */
index e5ec0c205380cb3f4154b07a4cd916084b25093b..2ca0ef91a4528a2f236a98e36b62bfbff9559d2c 100644 (file)
@@ -259,14 +259,6 @@ struct t_atoms
 gmx_mtop_global_atoms(const struct gmx_mtop_t *mtop);
 
 
-/* Make all charge groups the size of one atom.
- * When bKeepSingleMolCG==TRUE keep charge groups for molecules
- * that consist of a single charge group.
- */
-void
-gmx_mtop_make_atomic_charge_groups(struct gmx_mtop_t *mtop, gmx_bool bKeepSingleMolCG);
-
-
 /* Generate a 'local' topology for the whole system.
  * When ir!=NULL the free energy interactions will be sorted to the end.
  */