Converted topology to C++.
authorRossen Apostolov <rossen@kth.se>
Fri, 4 Sep 2015 16:17:04 +0000 (18:17 +0200)
committerTeemu Murtola <teemu.murtola@gmail.com>
Wed, 9 Sep 2015 11:23:10 +0000 (13:23 +0200)
Removed a few unused variables.

Change-Id: I6185999027137c4c8a29da23b0a24c1447790765

src/gromacs/topology/CMakeLists.txt
src/gromacs/topology/invblock.cpp [moved from src/gromacs/topology/invblock.c with 97% similarity]
src/gromacs/topology/mtop_util.cpp [moved from src/gromacs/topology/mtop_util.c with 99% similarity]
src/gromacs/topology/topsort.cpp [moved from src/gromacs/topology/topsort.c with 98% similarity]

index fc8b5463b9f1045d28f191d21c8315c14dd4ee9c..e84a9da319e85f1922f8eb07ce20085477eb1dcb 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2014, by the GROMACS development team, led by
+# Copyright (c) 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.
@@ -32,7 +32,7 @@
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
-file(GLOB TOPOLOGY_SOURCES *.cpp *.c)
+file(GLOB TOPOLOGY_SOURCES *.cpp)
 set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TOPOLOGY_SOURCES} PARENT_SCOPE)
 
 gmx_install_headers(
similarity index 97%
rename from src/gromacs/topology/invblock.c
rename to src/gromacs/topology/invblock.cpp
index 48107b2c5f82b2b7116f38add9b08e9d4a18f10c..64c982f00a696df0ca8827d0df662fe5ae381379 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) 2010,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,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.
similarity index 99%
rename from src/gromacs/topology/mtop_util.c
rename to src/gromacs/topology/mtop_util.cpp
index 771ccd68ad0a90f28903ece5e7fec249cf42fef7..f6be25d91ebe515f4286cd756c741b5ca0ef4380 100644 (file)
@@ -395,7 +395,6 @@ void gmx_mtop_atominfo_global(const gmx_mtop_t *mtop, int atnr_global,
                               char **atomname, int *resnr, char **resname)
 {
     int             mb, a_start, a_end, maxresnr, at_loc;
-    gmx_molblock_t *molb;
     t_atoms        *atoms = NULL;
 
     if (atnr_global < 0 || atnr_global >= mtop->natoms)
@@ -677,7 +676,6 @@ static void gmx_mtop_ilistloop_all_destroy(gmx_mtop_ilistloop_all_t iloop)
 gmx_bool gmx_mtop_ilistloop_all_next(gmx_mtop_ilistloop_all_t iloop,
                                      t_ilist **ilist_mol, int *atnr_offset)
 {
-    gmx_molblock_t *molb;
 
     if (iloop == NULL)
     {
@@ -750,7 +748,6 @@ t_block gmx_mtop_global_cgs(const gmx_mtop_t *mtop)
     t_block         cgs_gl, *cgs_mol;
     int             mb, mol, cg;
     gmx_molblock_t *molb;
-    t_atoms        *atoms;
 
     /* In most cases this is too much, but we realloc at the end */
     snew(cgs_gl.index, mtop->natoms+1);
@@ -1051,7 +1048,7 @@ static void gen_local_top(const gmx_mtop_t *mtop, const t_inputrec *ir,
                           gmx_bool bMergeConstr,
                           gmx_localtop_t *top)
 {
-    int                     mb, srcnr, destnr, ftype, ftype_dest, mt, natoms, mol, nposre_old, nfbposre_old;
+    int                     mb, srcnr, destnr, ftype, natoms, mol, nposre_old, nfbposre_old;
     gmx_molblock_t         *molb;
     gmx_moltype_t          *molt;
     const gmx_ffparams_t   *ffp;
similarity index 98%
rename from src/gromacs/topology/topsort.c
rename to src/gromacs/topology/topsort.cpp
index 1f8749916616d201eb55eb5b309eda5f7fe0ee80..9921a83152aed64e9f47515a61253d98e61ffc63 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,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.
@@ -132,13 +132,13 @@ static gmx_bool ip_pert(int ftype, const t_iparams *ip)
         case F_RESTRANGLES:
         case F_RESTRDIHS:
         case F_CBTDIHS:
-            bPert = FALSE;
             gmx_fatal(FARGS, "Function type %s does not support currentely free energy calculations",
                       interaction_function[ftype].longname);
+            break;
         default:
-            bPert = FALSE;
             gmx_fatal(FARGS, "Function type %s not implemented in ip_pert",
                       interaction_function[ftype].longname);
+            break;
     }
 
     return bPert;
@@ -206,7 +206,6 @@ void gmx_sort_ilist_fe(t_idef *idef, const real *qA, const real *qB)
     t_iparams *iparams;
     t_ilist   *ilist;
     t_iatom   *iatoms;
-    gmx_bool   bPert;
     t_iatom   *iabuf;
     int        iabuf_nalloc;