Remove some unnecessary declarations
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 8 Mar 2014 11:27:59 +0000 (13:27 +0200)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sat, 8 Mar 2014 11:54:47 +0000 (13:54 +0200)
- topexcl.h was an outdated copy of gpp_nextnb.h, and wasn't used
  anywhere.  Rename the source file to gpp_nextnb.c to match the header.
- Remove one declaration from gpp_nextnb.h, which wasn't used outside
  the source file.  Make it static in the source file.
- Remove duplicate declarations of (init|done)_top().
- Remove unused create_visibility() from src/programs/view/.

Change-Id: I87982e5581aff8caca3dc753492e01ee457ab694

src/gromacs/gmxlib/typedefs.c
src/gromacs/gmxpreprocess/gpp_nextnb.c [moved from src/gromacs/gmxpreprocess/topexcl.c with 98% similarity]
src/gromacs/gmxpreprocess/gpp_nextnb.h
src/gromacs/gmxpreprocess/topexcl.h [deleted file]
src/gromacs/gmxpreprocess/toputil.h
src/gromacs/legacyheaders/typedefs.h
src/programs/view/manager.h
src/programs/view/molps.cpp
src/programs/view/nmol.cpp
src/programs/view/nmol.h

index 460b5a3b4ecd8aaf3de69e61b65071b7b03f5ece..ad7a93dca3cff962b50d9f498fffdfa7035fc1fa 100644 (file)
@@ -179,7 +179,7 @@ void init_mtop(gmx_mtop_t *mtop)
     open_symtab(&mtop->symtab);
 }
 
-void init_top (t_topology *top)
+void init_top(t_topology *top)
 {
     int i;
 
similarity index 98%
rename from src/gromacs/gmxpreprocess/topexcl.c
rename to src/gromacs/gmxpreprocess/gpp_nextnb.c
index df88e84ee6efeec65be283b6978de491309b5f1f..3fc2cddb37c54a25858b59531ade267f07934448 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, by the GROMACS development team, led by
+ * Copyright (c) 2011,2014, 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.
@@ -170,7 +170,7 @@ void __print_nnb(t_nextnb *nnb, char *s)
 }
 #endif
 
-void nnb2excl (t_nextnb *nnb, t_blocka *excl)
+static void nnb2excl(t_nextnb *nnb, t_blocka *excl)
 {
     int       i, j, j_index;
     int       nre, nrx, nrs, nr_of_sortables;
index 326763123431a32212b72eb7cb01c3d4ae8c5c62..e06a3824171e72b1c8e882013f5ee93432765213 100644 (file)
@@ -75,9 +75,6 @@ void gen_nnb(t_nextnb *nnb, t_params plist[]);
  * initiated using init_nnb.
  */
 
-void nnb2excl (t_nextnb *nnb, t_blocka *excl);
-/* generate exclusions from nnb */
-
 void generate_excl (int nrexcl, int nratoms,
                     t_params plist[], t_nextnb *nnb, t_blocka *excl);
 /* Generate an exclusion block from bonds and constraints in
diff --git a/src/gromacs/gmxpreprocess/topexcl.h b/src/gromacs/gmxpreprocess/topexcl.h
deleted file mode 100644 (file)
index 827c26b..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * 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
- * 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.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-
-#ifndef GMX_GMXPREPROCESS_TOPEXCL_H
-#define GMX_GMXPREPROCESS_TOPEXCL_H
-
-#include "topio.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
-    int nr;     /* nr atoms (0 <= i < nr) (atoms->nr)          */
-    int nrex;   /* with nrex lists of neighbours               */
-    /* respectively containing zeroth, first   */
-    /* second etc. neigbours (0 <= nre < nrex) */
-    int  **nrexcl; /* with (0 <= nrx < nrexcl[i][nre]) neigbours    */
-    /* per list stored in one 2d array of lists        */
-    int ***a;      /* like this: a[i][nre][nrx]                        */
-} t_nextnb;
-
-void init_nnb(t_nextnb *nnb, int nr, int nrex);
-/* Initiate the arrays for nnb (see above) */
-
-void done_nnb(t_nextnb *nnb);
-/* Cleanup the nnb struct */
-
-#ifdef DEBUG_NNB
-#define print_nnb(nnb, s) __print_nnb(nnb, s)
-void print_nnb(t_nextnb *nnb, char *s);
-/* Print the nnb struct */
-#else
-#define print_nnb(nnb, s)
-#endif
-
-void gen_nnb(t_nextnb *nnb, t_params plist[]);
-/* Generate a t_nextnb structure from bond information.
- * With the structure you can either generate exclusions
- * or generate angles and dihedrals. The structure must be
- * initiated using init_nnb.
- */
-
-void nnb2excl (t_nextnb *nnb, t_blocka *excl);
-/* generate exclusions from nnb */
-
-void generate_excl (int nrexcl, int nratoms,
-                    t_params plist[], t_blocka *excl);
-/* Generate an exclusion block from bonds and constraints in
- * plist.
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index 97c3d6350b028d467e4f657f3aeb9c18b193296f..fd4259440bdc27a5cd203aaeafa1c9d3b20e506c 100644 (file)
@@ -63,10 +63,6 @@ void init_plist(t_params plist[]);
 
 void init_molinfo(t_molinfo *mol);
 
-void init_top  (t_topology *top);
-
-void done_top(t_topology *top);
-
 /* FREE */
 void done_mi(t_molinfo *mi);
 
index 848c588f4e2d77014a6f1bafd73f150e4e556d1c..17663d2fb249c18a9aec5b9ea4eb8197bee1940a 100644 (file)
@@ -129,7 +129,7 @@ void init_block(t_block *block);
 void init_blocka(t_blocka *block);
 void init_atom (t_atoms *at);
 void init_mtop(gmx_mtop_t *mtop);
-void init_top (t_topology *top);
+void init_top(t_topology *top);
 void init_inputrec(t_inputrec *ir);
 void init_energyhistory(energyhistory_t * enerhist);
 void done_energyhistory(energyhistory_t * enerhist);
index 70b7febe0ba555119cce43dd7c22393b77ea0492..d6ce4c2c5cff6ecf7b35255c41a52b75f91e6369 100644 (file)
@@ -175,8 +175,6 @@ extern void done_man(t_x11 *x11, t_manager *man);
 
 extern void draw_mol(t_x11 *x11, t_manager *man);
 
-extern void create_visibility(t_manager *man);
-
 extern void do_filter(t_x11 *x11, t_manager *man, t_filter *filter);
 
 #endif
index fd0c5d6ee548bcb1cf74ca7dbe1a93fccc4fa41d..37e64ba8c87f320ff6cac423b520f4967ba84d8a 100644 (file)
@@ -237,8 +237,6 @@ void ps_draw_mol(t_psdata ps, t_manager *man)
 
     init_pbc(man->box);
 
-    /* create_visibility(man); */
-
     for (i = 0; (i < man->natom); i++)
     {
         if (man->bVis[i])
index 17e28cf967f6b0131902d5c0b611a1318b9d091e..2155810c8d64d4299555db8f6da7ff9c670ed73d 100644 (file)
@@ -306,29 +306,6 @@ int compare_obj(const void *a, const void *b)
     }
 }
 
-void create_visibility(t_manager *man)
-{
-    t_object *obj;
-    int       i;
-
-    for (i = 0, obj = man->obj; (i < man->nobj); i++, obj++)
-    {
-        if (obj->eV != eVHidden)
-        {
-            man->bVis[obj->ai] = true;
-            switch (obj->eO)
-            {
-                case eOBond:
-                case eOHBond:
-                    man->bVis[obj->aj] = true;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-}
-
 void z_fill(t_manager *man, real *zz)
 {
     t_object *obj;
@@ -591,8 +568,6 @@ void draw_mol(t_x11 *x11, t_manager *man)
 
     my_init_pbc(man->box);
 
-    /* create_visibility(man); */
-
     for (i = 0; (i < man->natom); i++)
     {
         if (man->bVis[i])
index 988d9d94989e845eb9bc8d1be6515ba125855a71..fe66bb5b399fe8fb3aa35d57197bce1bb4425d90 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) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, 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.
@@ -50,7 +50,6 @@ extern t_molwin *init_mw(t_x11 *x11, Window Parent,
 extern void map_mw(t_x11 *x11, t_molwin *mw);
 
 extern void z_fill(t_manager *man, real *zz);
-extern void create_visibility(t_manager *man);
 extern int  compare_obj(const void *a, const void *b);
 extern int  filter_vis(t_manager *man);
 extern void set_sizes(t_manager *man);