Replaced atom_id by int.
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Fri, 13 Nov 2015 09:15:23 +0000 (10:15 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 13 Nov 2015 17:12:13 +0000 (18:12 +0100)
Change-Id: Id5d3937e3293bf9e4cb8b4d35b981a289e6001b1

144 files changed:
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/ewald/long-range-correction.cpp
src/gromacs/fileio/confio.cpp
src/gromacs/fileio/confio.h
src/gromacs/fileio/espio.cpp
src/gromacs/fileio/espio.h
src/gromacs/fileio/g96io.cpp
src/gromacs/fileio/g96io.h
src/gromacs/fileio/groio.cpp
src/gromacs/fileio/groio.h
src/gromacs/fileio/oenv.h
src/gromacs/fileio/pdbio.cpp
src/gromacs/fileio/pdbio.h
src/gromacs/fileio/tngio_for_tools.cpp
src/gromacs/fileio/tngio_for_tools.h
src/gromacs/fileio/trxio.cpp
src/gromacs/fileio/trxio.h
src/gromacs/gmxana/anadih.cpp
src/gromacs/gmxana/fitahx.cpp
src/gromacs/gmxana/fitahx.h
src/gromacs/gmxana/gmx_anaeig.cpp
src/gromacs/gmxana/gmx_angle.cpp
src/gromacs/gmxana/gmx_bundle.cpp
src/gromacs/gmxana/gmx_chi.cpp
src/gromacs/gmxana/gmx_cluster.cpp
src/gromacs/gmxana/gmx_clustsize.cpp
src/gromacs/gmxana/gmx_confrms.cpp
src/gromacs/gmxana/gmx_covar.cpp
src/gromacs/gmxana/gmx_current.cpp
src/gromacs/gmxana/gmx_density.cpp
src/gromacs/gmxana/gmx_densmap.cpp
src/gromacs/gmxana/gmx_densorder.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gmxana/gmx_do_dssp.cpp
src/gromacs/gmxana/gmx_dos.cpp
src/gromacs/gmxana/gmx_dyecoupl.cpp
src/gromacs/gmxana/gmx_dyndom.cpp
src/gromacs/gmxana/gmx_editconf.cpp
src/gromacs/gmxana/gmx_filter.cpp
src/gromacs/gmxana/gmx_genion.cpp
src/gromacs/gmxana/gmx_genpr.cpp
src/gromacs/gmxana/gmx_gyrate.cpp
src/gromacs/gmxana/gmx_h2order.cpp
src/gromacs/gmxana/gmx_hbond.cpp
src/gromacs/gmxana/gmx_helix.cpp
src/gromacs/gmxana/gmx_helixorient.cpp
src/gromacs/gmxana/gmx_hydorder.cpp
src/gromacs/gmxana/gmx_make_edi.cpp
src/gromacs/gmxana/gmx_make_ndx.cpp
src/gromacs/gmxana/gmx_mdmat.cpp
src/gromacs/gmxana/gmx_mindist.cpp
src/gromacs/gmxana/gmx_morph.cpp
src/gromacs/gmxana/gmx_msd.cpp
src/gromacs/gmxana/gmx_nmens.cpp
src/gromacs/gmxana/gmx_order.cpp
src/gromacs/gmxana/gmx_potential.cpp
src/gromacs/gmxana/gmx_principal.cpp
src/gromacs/gmxana/gmx_rms.cpp
src/gromacs/gmxana/gmx_rmsdist.cpp
src/gromacs/gmxana/gmx_rmsf.cpp
src/gromacs/gmxana/gmx_rotacf.cpp
src/gromacs/gmxana/gmx_rotmat.cpp
src/gromacs/gmxana/gmx_sans.cpp
src/gromacs/gmxana/gmx_sorient.cpp
src/gromacs/gmxana/gmx_spatial.cpp
src/gromacs/gmxana/gmx_spol.cpp
src/gromacs/gmxana/gmx_tcaf.cpp
src/gromacs/gmxana/gmx_traj.cpp
src/gromacs/gmxana/gmx_trjcat.cpp
src/gromacs/gmxana/gmx_trjconv.cpp
src/gromacs/gmxana/gmx_trjorder.cpp
src/gromacs/gmxana/gmx_vanhove.cpp
src/gromacs/gmxana/gmx_velacc.cpp
src/gromacs/gmxana/gstat.h
src/gromacs/gmxana/hxprops.cpp
src/gromacs/gmxana/hxprops.h
src/gromacs/gmxana/nrama.h
src/gromacs/gmxana/nsfactor.cpp
src/gromacs/gmxana/nsfactor.h
src/gromacs/gmxana/princ.cpp
src/gromacs/gmxana/princ.h
src/gromacs/gmxana/sfactor.cpp
src/gromacs/gmxana/sfactor.h
src/gromacs/gmxlib/chargegroup.cpp
src/gromacs/gmxlib/conformation-utilities.cpp
src/gromacs/gmxlib/disre.cpp
src/gromacs/gmxlib/orires.cpp
src/gromacs/gmxpreprocess/add_par.cpp
src/gromacs/gmxpreprocess/convparm.cpp
src/gromacs/gmxpreprocess/gen_ad.cpp
src/gromacs/gmxpreprocess/genhydro.cpp
src/gromacs/gmxpreprocess/grompp-impl.h
src/gromacs/gmxpreprocess/hackblock.h
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/pgutil.cpp
src/gromacs/gmxpreprocess/pgutil.h
src/gromacs/gmxpreprocess/topio.cpp
src/gromacs/gmxpreprocess/toppush.cpp
src/gromacs/gmxpreprocess/toppush.h
src/gromacs/gmxpreprocess/topshake.cpp
src/gromacs/gmxpreprocess/toputil.cpp
src/gromacs/gmxpreprocess/vsite_parm.cpp
src/gromacs/imd/imd.cpp
src/gromacs/legacyheaders/types/inputrec.h
src/gromacs/legacyheaders/types/ns.h
src/gromacs/mdlib/adress.cpp
src/gromacs/mdlib/constr.cpp
src/gromacs/mdlib/constr.h
src/gromacs/mdlib/ns.cpp
src/gromacs/mdlib/qmmm.cpp
src/gromacs/mdlib/rf_util.cpp
src/gromacs/mdlib/shakef.cpp
src/gromacs/mdlib/shellfc.cpp
src/gromacs/mdlib/tests/shake.cpp
src/gromacs/mdlib/vsite.cpp
src/gromacs/pbcutil/mshift.cpp
src/gromacs/pbcutil/mshift.h
src/gromacs/pulling/pull_internal.h
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/selection/centerofmass.cpp
src/gromacs/selection/centerofmass.h
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/indexutil.h
src/gromacs/swap/swapcoords.cpp
src/gromacs/tools/convert_tpr.cpp
src/gromacs/topology/CMakeLists.txt
src/gromacs/topology/atom_id.h [deleted file]
src/gromacs/topology/block.h
src/gromacs/topology/idef.h
src/gromacs/topology/index.cpp
src/gromacs/topology/index.h
src/gromacs/topology/invblock.cpp
src/gromacs/topology/invblock.h
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/trajectoryanalysis/modules/surfacearea.cpp
src/gromacs/trajectoryanalysis/modules/surfacearea.h
src/programs/mdrun/membed.cpp
src/programs/view/manager.cpp
src/programs/view/manager.h
src/programs/view/molps.cpp
src/programs/view/nmol.cpp

index 242d05dedc5e5ae5aa1b03699ec1892dc9a8a1f9..3ddf5e02a3e3834d49937ec7b455971565503cf8 100644 (file)
@@ -3610,7 +3610,7 @@ static void distribute_cg(FILE *fplog,
     rvec                 cg_cm;
     ivec                 ind;
     real                 nrcg, inv_ncg, pos_d;
-    atom_id             *cgindex;
+    int                 *cgindex;
     gmx_bool             bScrew;
 
     ma = dd->ma;
@@ -4357,7 +4357,7 @@ static void dd_redistribute_cg(FILE *fplog, gmx_int64_t step,
     real               pos_d;
     matrix             tcm;
     rvec              *cg_cm = NULL, cell_x0, cell_x1, limitd, limit0, limit1;
-    atom_id           *cgindex;
+    int               *cgindex;
     cginfo_mb_t       *cginfo_mb;
     gmx_domdec_comm_t *comm;
     int               *moved;
index 3994f7583d70c8f595eac5f5fb6efee764a9ef4a..ff12777edb8e9215a8d1662fd4db0e59f40cf17c 100644 (file)
@@ -522,7 +522,7 @@ static int low_make_reverse_ilist(const t_ilist *il_mt,
     int            ftype, nral, i, j, nlink, link;
     const t_ilist *il;
     t_iatom       *ia;
-    atom_id        a;
+    int            a;
     int            nint;
     gmx_bool       bVSite;
 
index b7e4f6e94d818358e27eace4c90864ee3dbf1b2e..214c070429ef54824ef239853b6725c85c446c8a 100644 (file)
@@ -75,7 +75,7 @@ void ewald_LRcorrection(int start, int end,
                         real *dvdlambda_q, real *dvdlambda_lj)
 {
     int         i, i1, i2, j, k, m, iv, jv, q;
-    atom_id    *AA;
+    int        *AA;
     double      Vexcl_q, dvdl_excl_q, dvdl_excl_lj; /* Necessary for precision */
     double      Vexcl_lj;
     real        one_4pi_eps;
index 71c425a5b2f1e3589c3a15e92062e07f904480e7..eaa9395451feccf9e3106152ae1abc4d2f676e9b 100644 (file)
@@ -64,7 +64,7 @@
 void write_sto_conf_indexed(const char *outfile, const char *title,
                             t_atoms *atoms,
                             rvec x[], rvec *v, int ePBC, matrix box,
-                            atom_id nindex, atom_id index[])
+                            int nindex, int index[])
 {
     FILE       *out;
     int         ftp;
index 67477ccf47a92208326cd59f64dd77db1dfe7610..6251da49973be78b31a11307222205df0e34bfe2 100644 (file)
@@ -38,7 +38,6 @@
 #define GMX_FILEIO_CONFIO_H
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 /* For reading coordinate files it is assumed that enough memory
@@ -55,7 +54,7 @@ struct t_topology;
 void write_sto_conf_indexed(const char *outfile, const char *title,
                             struct t_atoms *atoms,
                             rvec x[], rvec *v, int ePBC, matrix box,
-                            atom_id nindex, atom_id index[]);
+                            int nindex, int index[]);
 /* like write_sto_conf, but indexed */
 
 void write_sto_conf(const char *outfile, const char *title,
index d88dc1f05e781ccc80b74870d3e17f70fa3fb9f7..babf898bf774995e12d35ca864cff19c6dcd2d2e 100644 (file)
@@ -426,7 +426,7 @@ int get_espresso_coordnum(const char *infile)
 }
 
 void write_espresso_conf_indexed(FILE *out, const char *title,
-                                 t_atoms *atoms, int nx, atom_id *index,
+                                 t_atoms *atoms, int nx, int *index,
                                  rvec *x, rvec *v, matrix box)
 {
     int i, j;
index 21d315f1fdb4f09f47dfd9930321dd578e34e5b4..49a3528987455443cf2ffe7810ebcb0008e8f7d5 100644 (file)
@@ -39,7 +39,6 @@
 #include <cstdio>
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 
 struct t_atoms;
 struct t_topology;
@@ -50,7 +49,7 @@ void gmx_espresso_read_conf(const char *infile,
 int get_espresso_coordnum(const char *infile);
 
 void write_espresso_conf_indexed(FILE *out, const char *title,
-                                 t_atoms *atoms, int nx, atom_id *index,
+                                 t_atoms *atoms, int nx, int *index,
                                  rvec *x, rvec *v, matrix box);
 
 #endif
index e9c91cc951d21f5e34cb8a90b4c1fb644253f276..b1472fa18074d7e42f92e096cb0ebf3f8cdcf091 100644 (file)
@@ -337,7 +337,7 @@ int read_g96_conf(FILE *fp, const char *infile, t_trxframe *fr,
 }
 
 void write_g96_conf(FILE *out, t_trxframe *fr,
-                    int nindex, const atom_id *index)
+                    int nindex, const int *index)
 {
     t_atoms *atoms;
     int      nout, i, a;
index e49b3a723165faf3175a262180c06e698241cd0f..2dbccacc6a60a1a99d997c35ea89938fdde08fcd 100644 (file)
@@ -39,7 +39,6 @@
 
 #include <stdio.h>
 
-#include "gromacs/topology/atom_id.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -59,7 +58,7 @@ int read_g96_conf(FILE *fp, const char *infile, struct t_trxframe *fr,
  * title, atoms, x, v can all be NULL, in which case they won't be read *
  * line holds the previous line for trajectory reading                  */
 
-void write_g96_conf(FILE *out, struct t_trxframe *fr, int nindex, const atom_id *index);
+void write_g96_conf(FILE *out, struct t_trxframe *fr, int nindex, const int *index);
 /* write a Gromos96 coordinate file or trajectory frame *
  * index can be NULL                                    */
 
index f350f1a981bca2fe0a01ea5e59730e5d998063a5..8e3e94673ed2c4db25617b0a770935faa6b07df0 100644 (file)
@@ -461,7 +461,7 @@ static void write_hconf_box(FILE *out, int pr, matrix box)
 }
 
 void write_hconf_indexed_p(FILE *out, const char *title, t_atoms *atoms,
-                           int nx, const atom_id index[], int pr,
+                           int nx, const int index[], int pr,
                            rvec *x, rvec *v, matrix box)
 {
     char resnm[6], nm[6], format[100];
@@ -561,7 +561,7 @@ void write_hconf_mtop(FILE *out, const char *title, gmx_mtop_t *mtop, int pr,
 void write_hconf_p(FILE *out, const char *title, t_atoms *atoms, int pr,
                    rvec *x, rvec *v, matrix box)
 {
-    atom_id *aa;
+    int     *aa;
     int      i;
 
     snew(aa, atoms->nr);
index fd6f3029881392867f12292c106caa72c6077917..e64f37991ca8b8469a484a10365164185180d778 100644 (file)
@@ -40,7 +40,6 @@
 #include <stdio.h>
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
@@ -61,7 +60,7 @@ int gro_first_x_or_v(FILE *status, struct t_trxframe *fr);
 /* read first/next x and/or v frame from gro file */
 
 void write_hconf_indexed_p(FILE *out, const char *title, struct t_atoms *atoms,
-                           int nx, const atom_id index[], int ndec,
+                           int nx, const int index[], int ndec,
                            rvec *x, rvec *v, matrix box);
 
 void write_hconf_mtop(FILE *out, const char *title, struct gmx_mtop_t *mtop, int pr,
index 709a49638ade955060a7eed3cd7caf413cdf5b5f..e3dcecc4032b4c99876df6a68dda65640d652b6b 100644 (file)
@@ -37,7 +37,6 @@
 #ifndef GMX_FILEIO_OENV_H
 #define GMX_FILEIO_OENV_H
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
index 1224f422e3976b8afbb760659502d76744b7e355..20aa5ae332b5a5b97d6a8bda7f558dc3a73ee689 100644 (file)
@@ -259,12 +259,12 @@ static void read_cryst1(char *line, int *ePBC, matrix box)
 void write_pdbfile_indexed(FILE *out, const char *title,
                            t_atoms *atoms, rvec x[],
                            int ePBC, matrix box, char chainid,
-                           int model_nr, atom_id nindex, const atom_id index[],
+                           int model_nr, int nindex, const int index[],
                            gmx_conect conect, gmx_bool bTerSepChains)
 {
     gmx_conect_t     *gc = (gmx_conect_t *)conect;
     char              resnm[6], nm[6], pukestring[100];
-    atom_id           i, ii;
+    int               i, ii;
     int               resind, resnr;
     enum PDB_record   type;
     unsigned char     resic, ch;
@@ -413,7 +413,7 @@ void write_pdbfile_indexed(FILE *out, const char *title,
 void write_pdbfile(FILE *out, const char *title, t_atoms *atoms, rvec x[],
                    int ePBC, matrix box, char chainid, int model_nr, gmx_conect conect, gmx_bool bTerSepChains)
 {
-    atom_id i, *index;
+    int i, *index;
 
     snew(index, atoms->nr);
     for (i = 0; i < atoms->nr; i++)
index a88150d635f31691385260c9efad138a3116727a..e171a26024c00a33e3399313510ae1b50faa17d4 100644 (file)
@@ -41,7 +41,6 @@
 #include <stdio.h>
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
@@ -103,7 +102,7 @@ void gmx_write_pdb_box(FILE *out, int ePBC, matrix box);
 
 void write_pdbfile_indexed(FILE *out, const char *title, struct t_atoms *atoms,
                            rvec x[], int ePBC, matrix box, char chain,
-                           int model_nr, atom_id nindex, const atom_id index[],
+                           int model_nr, int nindex, const int index[],
                            gmx_conect conect, gmx_bool bTerSepChains);
 /* REALLY low level */
 
index b006a042f19c756b24fc4e25ce613bdab67e129d..643dc6a9a6304f132241364c66dd89a03c612dc5 100644 (file)
@@ -57,7 +57,7 @@ void gmx_prepare_tng_writing(const char              *filename,
                              tng_trajectory_t        *output,
                              int                      nAtoms,
                              const gmx_mtop_t        *mtop,
-                             const atom_id           *index,
+                             const int               *index,
                              const char              *indexGroupName)
 {
 #ifdef GMX_USE_TNG
@@ -331,7 +331,7 @@ static real getDistanceScaleFactor(tng_trajectory_t in)
 
 void gmx_tng_setup_atom_subgroup(tng_trajectory_t tng,
                                  const int        nind,
-                                 const atom_id   *ind,
+                                 const int       *ind,
                                  const char      *name)
 {
 #ifdef GMX_USE_TNG
index 7d34bc989f617c016dcf2f1a2b4ed3ad03241f63..fc79008f5e3462dbcfb13aa7d5ebe0da6b811ee0 100644 (file)
@@ -39,7 +39,6 @@
 
 #include "tng/tng_io_fwd.h"
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
@@ -60,7 +59,7 @@ void gmx_prepare_tng_writing(const char              *filename,
                              tng_trajectory_t        *out,
                              int                      nAtoms,
                              const struct gmx_mtop_t *mtop,
-                             const atom_id           *index,
+                             const int               *index,
                              const char              *indexGroupName);
 
 /*! \brief Write a trxframe to a TNG file
@@ -82,7 +81,7 @@ void gmx_write_tng_from_trxframe(tng_trajectory_t        output,
  * selection group. */
 void gmx_tng_setup_atom_subgroup(tng_trajectory_t tng,
                                  const int        nind,
-                                 const atom_id   *ind,
+                                 const int       *ind,
                                  const char      *name);
 
 /*! \brief Read the first/next TNG frame. */
index a6465af52df7a8f8a9dfa0e7ecb25116589fd05e..2e980c3516a80aae8a436a6e5e2071e403f3ef75 100644 (file)
@@ -312,7 +312,7 @@ void set_trxframe_ePBC(t_trxframe *fr, int ePBC)
 }
 
 int write_trxframe_indexed(t_trxstatus *status, t_trxframe *fr, int nind,
-                           const atom_id *ind, gmx_conect gc)
+                           const int *ind, gmx_conect gc)
 {
     char  title[STRLEN];
     rvec *xout = NULL, *vout = NULL, *fout = NULL;
@@ -463,7 +463,7 @@ void trjtools_gmx_prepare_tng_writing(const char       *filename,
                                       const char       *infile,
                                       const int         natoms,
                                       const gmx_mtop_t *mtop,
-                                      const atom_id    *index,
+                                      const int        *index,
                                       const char       *index_group_name)
 {
     if (filemode != 'w' && filemode != 'a')
@@ -588,7 +588,7 @@ int write_trxframe(t_trxstatus *status, t_trxframe *fr, gmx_conect gc)
     return 0;
 }
 
-int write_trx(t_trxstatus *status, int nind, const atom_id *ind, t_atoms *atoms,
+int write_trx(t_trxstatus *status, int nind, const int *ind, t_atoms *atoms,
               int step, real time, matrix box, rvec x[], rvec *v,
               gmx_conect gc)
 {
index ef891d986cc3fc090502ecd04d85ebfc56741498..c8f3bfaef07f8a62f16564bddf69c6874497816a 100644 (file)
@@ -81,7 +81,7 @@ int nframes_read(t_trxstatus *status);
 /* Returns the number of frames read from the trajectory */
 
 int write_trxframe_indexed(t_trxstatus *status, struct t_trxframe *fr, int nind,
-                           const atom_id *ind, gmx_conect gc);
+                           const int *ind, gmx_conect gc);
 /* Write an indexed frame to a TRX file, see write_trxframe. gc may be NULL */
 
 int write_trxframe(t_trxstatus *status, struct t_trxframe *fr, gmx_conect gc);
@@ -94,7 +94,7 @@ int write_trxframe(t_trxstatus *status, struct t_trxframe *fr, gmx_conect gc);
  * gc is important for pdb file writing only and may be NULL.
  */
 
-int write_trx(t_trxstatus *status, int nind, const atom_id *ind, struct t_atoms *atoms,
+int write_trx(t_trxstatus *status, int nind, const int *ind, struct t_atoms *atoms,
               int step, real time, matrix box, rvec x[], rvec *v,
               gmx_conect gc);
 /* Write an indexed frame to a TRX file.
@@ -109,7 +109,7 @@ void trjtools_gmx_prepare_tng_writing(const char               *filename,
                                       const char               *infile,
                                       const int                 natoms,
                                       const struct gmx_mtop_t  *mtop,
-                                      const atom_id            *index,
+                                      const int                *index,
                                       const char               *index_group_name);
 /* Sets up *out for writing TNG. If *in != NULL and contains a TNG trajectory
  * some data, e.g. molecule system, will be copied over from *in to *out.
index 16cef400a087d0a97505a60e0b90376f1591d286..310dc10e0c20173082a5bc3ae76f4e50d01e3849 100644 (file)
@@ -674,7 +674,7 @@ void calc_distribution_props(int nh, int histo[], real start,
 }
 
 static void calc_angles(struct t_pbc *pbc,
-                        int n3, atom_id index[], real ang[], rvec x_s[])
+                        int n3, int index[], real ang[], rvec x_s[])
 {
     int  i, ix, t1, t2;
     rvec r_ij, r_kj;
@@ -728,7 +728,7 @@ static real calc_fraction(real angles[], int nangles)
 }
 
 static void calc_dihs(struct t_pbc *pbc,
-                      int n4, atom_id index[], real ang[], rvec x_s[])
+                      int n4, int index[], real ang[], rvec x_s[])
 {
     int  i, ix, t1, t2, t3;
     rvec r_ij, r_kj, r_kl, m, n;
@@ -809,7 +809,7 @@ void read_ang_dih(const char *trj_fn,
                   gmx_bool bAngles, gmx_bool bSaveAll, gmx_bool bRb, gmx_bool bPBC,
                   int maxangstat, int angstat[],
                   int *nframes, real **time,
-                  int isize, atom_id index[],
+                  int isize, int index[],
                   real **trans_frac,
                   real **aver_angle,
                   real *dih[],
index 7616cc65238df0e9ecce936cf2795fa2677bf306..780d82ee1ecec01f7a362af753dfc668dc904ab8 100644 (file)
@@ -45,7 +45,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
-static void my_calc_xcm(int nbb, atom_id bbind[], rvec x[], rvec xcm)
+static void my_calc_xcm(int nbb, int bbind[], rvec x[], rvec xcm)
 {
     int    i, m, ai;
 
@@ -61,7 +61,7 @@ static void my_calc_xcm(int nbb, atom_id bbind[], rvec x[], rvec xcm)
     }
 }
 
-static void my_sub_xcm(int nbb, atom_id bbind[], rvec x[], rvec xcm)
+static void my_sub_xcm(int nbb, int bbind[], rvec x[], rvec xcm)
 {
     int i, ai;
 
@@ -72,9 +72,9 @@ static void my_sub_xcm(int nbb, atom_id bbind[], rvec x[], rvec xcm)
     }
 }
 
-real fit_ahx(int nres, t_bb bb[], int natoms, int nall, atom_id allindex[],
+real fit_ahx(int nres, t_bb bb[], int natoms, int nall, int allindex[],
              rvec x[], int nca,
-             atom_id caindex[], gmx_bool bFit)
+             int caindex[], gmx_bool bFit)
 {
     static rvec *xref = NULL;
     static real *mass = NULL;
index 7394138d76268c15f1d510982bd194b6f7827f09..a81077238efe6fe55417b93e755c006b614ef945 100644 (file)
@@ -46,8 +46,8 @@ extern "C"
 {
 #endif
 
-real fit_ahx(int nres, t_bb bb[], int natoms, int nall, atom_id allindex[],
-             rvec x[], int nca, atom_id caindex[], gmx_bool bFit);
+real fit_ahx(int nres, t_bb bb[], int natoms, int nall, int allindex[],
+             rvec x[], int nca, int caindex[], gmx_bool bFit);
 
 #ifdef __cplusplus
 }
index 91eab138e13f7a2f720e7f6636547e336e39e63d..73ca2c4157cc68afede46c4c29d7ff5912755a9f 100644 (file)
@@ -502,8 +502,8 @@ static void project(const char *trajfile, t_topology *top, int ePBC, matrix topb
                     const char *projfile, const char *twodplotfile,
                     const char *threedplotfile, const char *filterfile, int skip,
                     const char *extremefile, gmx_bool bExtrAll, real extreme,
-                    int nextr, t_atoms *atoms, int natoms, atom_id *index,
-                    gmx_bool bFit, rvec *xref, int nfit, atom_id *ifit, real *w_rls,
+                    int nextr, t_atoms *atoms, int natoms, int *index,
+                    gmx_bool bFit, rvec *xref, int nfit, int *ifit, real *w_rls,
                     real *sqrtm, rvec *xav,
                     int *eignr, rvec **eigvec,
                     int noutvec, int *outvec, gmx_bool bSplit,
@@ -515,7 +515,7 @@ static void project(const char *trajfile, t_topology *top, int ePBC, matrix topb
     t_trxstatus *status;
     int          noutvec_extr, imin, imax;
     real        *pmin, *pmax;
-    atom_id     *all_at;
+    int         *all_at;
     matrix       box;
     rvec        *xread, *x;
     real         t, inp, **inprod = NULL;
@@ -1081,7 +1081,7 @@ int gmx_anaeig(int argc, char *argv[])
     const char       *indexfile;
     int               i, j, d;
     int               nout, *iout, noutvec, *outvec, nfit;
-    atom_id          *index = NULL, *ifit = NULL;
+    int              *index = NULL, *ifit = NULL;
     const char       *VecFile, *Vec2File, *topfile;
     const char       *EigFile, *Eig2File;
     const char       *CompFile, *RmsfFile, *ProjOnVecFile;
index 92341c94fa048f34260fcbf0905c0d06e1c0b1fa..0f44226df9e88c592402689b4700fafdc24d4fb4 100644 (file)
@@ -153,7 +153,7 @@ int gmx_g_angle(int argc, char *argv[])
     FILE              *out;
     real               dt;
     int                isize;
-    atom_id           *index;
+    int               *index;
     char              *grpname;
     real               maxang, S2, norm_fac, maxstat;
     unsigned long      mode;
index 3c7f114d591b56fdcd8e1f3b979cda5800f98544..4a1d249693e5a0039ace7bcf6f42eaf073688894 100644 (file)
@@ -86,7 +86,7 @@ static void rotate_ends(t_bundle *bun, rvec axis, int c0, int c1)
     axis[c1] = ax[c0]*tmp[c0] + ax[c1]*tmp[c1];
 }
 
-static void calc_axes(rvec x[], t_atom atom[], int gnx[], atom_id *index[],
+static void calc_axes(rvec x[], t_atom atom[], int gnx[], int *index[],
                       gmx_bool bRot, t_bundle *bun)
 {
     int   end, i, div, d;
@@ -236,7 +236,7 @@ int gmx_bundle(int argc, char *argv[])
     /* FIXME: The constness should not be cast away */
     char             *anm = (char *)"CA", *rnm = (char *)"GLY";
     int               i, gnx[MAX_ENDS];
-    atom_id          *index[MAX_ENDS];
+    int              *index[MAX_ENDS];
     t_bundle          bun;
     gmx_bool          bKink;
     rvec              va, vb, vc, vr, vl;
index 567e2fc8b682288e086e9f75193f47859dfc3956..d4126b2d6647d07ba3da4ab4caf9b06d5cee30e2 100644 (file)
@@ -139,9 +139,9 @@ static gmx_bool bAllowed(real phi, real psi)
     return (map[x][y] == '1') ? TRUE : FALSE;
 }
 
-atom_id *make_chi_ind(int nl, t_dlist dl[], int *ndih)
+int *make_chi_ind(int nl, t_dlist dl[], int *ndih)
 {
-    atom_id *id;
+    int     *id;
     int      i, Xi, n;
 
     /* There are nl residues with max edMax dihedrals with 4 atoms each */
@@ -446,7 +446,7 @@ static int reset_em_all(int nlist, t_dlist dlist[], int nf,
 static void histogramming(FILE *log, int nbin, gmx_residuetype_t *rt,
                           int nf, int maxchi, real **dih,
                           int nlist, t_dlist dlist[],
-                          atom_id index[],
+                          int index[],
                           gmx_bool bPhi, gmx_bool bPsi, gmx_bool bOmega, gmx_bool bChi,
                           gmx_bool bNormalize, gmx_bool bSSHisto, const char *ssdump,
                           real bfac_max, t_atoms *atoms,
@@ -1362,7 +1362,7 @@ int gmx_chi(int argc, char *argv[])
     gmx_output_env_t  *oenv;
     gmx_residuetype_t *rt;
 
-    atom_id            isize, *index;
+    int                isize, *index;
     int                ndih, nactdih, nf;
     real             **dih, *trans_frac, *aver_angle, *time;
     int                i, **chi_lookup, *multiplicity;
index 681a580f1d5562bbda6a5883ff1be690358845de..b711630412f9157fdafff956892fd9c0751648b2 100644 (file)
@@ -773,7 +773,7 @@ static void gromos(int n1, real **mat, real rmsdcut, t_clusters *clust)
     clust->ncl = k-1;
 }
 
-rvec **read_whole_trj(const char *fn, int isize, atom_id index[], int skip,
+rvec **read_whole_trj(const char *fn, int isize, int index[], int skip,
                       int *nframe, real **time, const gmx_output_env_t *oenv, gmx_bool bPBC, gmx_rmpbc_t gpbc)
 {
     rvec       **xx, *x;
@@ -996,8 +996,8 @@ static void ana_trans(t_clusters *clust, int nf,
 static void analyze_clusters(int nf, t_clusters *clust, real **rmsd,
                              int natom, t_atoms *atoms, rvec *xtps,
                              real *mass, rvec **xx, real *time,
-                             int ifsize, atom_id *fitidx,
-                             int iosize, atom_id *outidx,
+                             int ifsize, int *fitidx,
+                             int iosize, int *outidx,
                              const char *trxfn, const char *sizefn,
                              const char *transfn, const char *ntransfn,
                              const char *clustidfn, gmx_bool bAverage,
@@ -1421,7 +1421,7 @@ int gmx_cluster(int argc, char *argv[])
     real              *eigenvectors;
 
     int                isize = 0, ifsize = 0, iosize = 0;
-    atom_id           *index = NULL, *fitidx = NULL, *outidx = NULL;
+    int               *index = NULL, *fitidx = NULL, *outidx = NULL;
     char              *grpname;
     real               rmsd, **d1, **d2, *time = NULL, time_invfac, *mass = NULL;
     char               buf[STRLEN], buf1[80], title[STRLEN];
index 40f332c9c892eff75b61d111b6e58636111c3f52..2f0173d2a4d811453391a6d7ca35b27c59151f12 100644 (file)
@@ -71,7 +71,7 @@ static void clust_size(const char *ndx, const char *trx, const char *xpm,
                        const gmx_output_env_t *oenv)
 {
     FILE                 *fp, *gp, *hp, *tp;
-    atom_id              *index = NULL;
+    int                  *index = NULL;
     int                   nindex, natoms;
     t_trxstatus          *status;
     rvec                 *x = NULL, *v = NULL, dx;
index 25cb7c91e57e388daf8561312e97a62ca6d45e23..156154c7d4cb99077a38bae1902fa5ca802d8db3 100644 (file)
@@ -62,7 +62,7 @@
 
 static const int NOTSET = -9368163;
 
-void calc_rm_cm(int isize, atom_id index[], t_atoms *atoms, rvec x[], rvec xcm)
+void calc_rm_cm(int isize, int index[], t_atoms *atoms, rvec x[], rvec xcm)
 {
     int  i, d;
     real tm, m;
@@ -86,7 +86,7 @@ void calc_rm_cm(int isize, atom_id index[], t_atoms *atoms, rvec x[], rvec xcm)
     }
 }
 
-int build_res_index(int isize, atom_id index[], t_atom atom[], int rindex[])
+int build_res_index(int isize, int index[], t_atom atom[], int rindex[])
 {
     int i, r;
 
@@ -105,7 +105,7 @@ int build_res_index(int isize, atom_id index[], t_atom atom[], int rindex[])
     return r;
 }
 
-int find_res_end(int i, int isize, atom_id index[], t_atoms *atoms)
+int find_res_end(int i, int isize, int index[], t_atoms *atoms)
 {
     int rnr;
 
@@ -126,9 +126,9 @@ int debug_strcmp(char s1[], char s2[])
     return std::strcmp(s1, s2);
 }
 
-int find_next_match_atoms_in_res(int *i1, atom_id index1[],
+int find_next_match_atoms_in_res(int *i1, int index1[],
                                  int m1, char **atnms1[],
-                                 int *i2, atom_id index2[],
+                                 int *i2, int index2[],
                                  int m2, char **atnms2[])
 {
     int      dx, dy, dmax, cmp;
@@ -308,7 +308,7 @@ static int find_next_match_res(int *rnr1, int isize1,
     return cmp;
 }
 
-int find_first_atom_in_res(int rnr, int isize, atom_id index[], t_atom atom[])
+int find_first_atom_in_res(int rnr, int isize, int index[], t_atom atom[])
 {
     int i;
 
@@ -328,8 +328,8 @@ int find_first_atom_in_res(int rnr, int isize, atom_id index[], t_atom atom[])
     }
 }
 
-void find_matching_names(int *isize1, atom_id index1[], t_atoms *atoms1,
-                         int *isize2, atom_id index2[], t_atoms *atoms2)
+void find_matching_names(int *isize1, int index1[], t_atoms *atoms1,
+                         int *isize2, int index2[], t_atoms *atoms2)
 {
     int        i1, i2, ii1, ii2, m1, m2;
     int        atcmp, rescmp;
@@ -531,7 +531,7 @@ int gmx_confrms(int argc, char *argv[])
     int               ePBC1, ePBC2;
     t_atoms          *atoms1, *atoms2;
     int               warn = 0;
-    atom_id           at;
+    int               at;
     real             *w_rls, mass, totmass;
     rvec             *x1, *v1, *x2, *v2, *fit_x;
     matrix            box1, box2;
@@ -547,7 +547,7 @@ int gmx_confrms(int argc, char *argv[])
     /* variables for fit */
     char    *groupnames1, *groupnames2;
     int      isize1, isize2;
-    atom_id *index1, *index2;
+    int     *index1, *index2;
     real     rms, msd, minmsd, maxmsd;
     real    *msds;
 
index c7e88aafbe5ed5c7d613a3fc0ad7cccae147d27a..be52559b317f2171c8f08695d57ac179f0ca6062 100644 (file)
@@ -129,7 +129,7 @@ int gmx_covar(int argc, char *argv[])
     const char       *asciifile, *xpmfile, *xpmafile;
     char              str[STRLEN], *fitname, *ananame;
     int               d, dj, nfit;
-    atom_id          *index, *ifit;
+    int              *index, *ifit;
     gmx_bool          bDiffMass1, bDiffMass2;
     char              timebuf[STRLEN];
     t_rgb             rlo, rmi, rhi;
index c3621e6421d64f7c4778fc21db3613dc0293c7a4..177ee33b0783a42c5f84ae134f591502e856567c 100644 (file)
@@ -350,7 +350,7 @@ static void dielectric(FILE *fmj, FILE *fmd, FILE *outf, FILE *fcur, FILE *mcor,
                        int ePBC, t_topology top, t_trxframe fr, real temp,
                        real bfit, real efit, real bvit, real evit,
                        t_trxstatus *status, int isize, int nmols, int nshift,
-                       atom_id *index0, int indexm[], real mass2[],
+                       int *index0, int indexm[], real mass2[],
                        real qmol[], real eps_rf, const gmx_output_env_t *oenv)
 {
     int       i, j;
@@ -810,7 +810,7 @@ int gmx_current(int argc, char *argv[])
     t_trxframe             fr;
     real                  *mass2 = NULL;
     matrix                 box;
-    atom_id               *index0;
+    int                   *index0;
     int                   *indexm = NULL;
     int                    isize;
     t_trxstatus           *status;
index b36cf6e80607085e4e04a29b0e2f41f63a9356a0..ad9b231fea9398db62a7bb9703ac831abdad52d7 100644 (file)
@@ -129,7 +129,7 @@ int get_electrons(t_electron **eltab, const char *fn)
     return nr;
 }
 
-void center_coords(t_atoms *atoms, atom_id *index_center, int ncenter,
+void center_coords(t_atoms *atoms, int *index_center, int ncenter,
                    matrix box, rvec x0[])
 {
     int  i, k, m;
@@ -167,12 +167,12 @@ void center_coords(t_atoms *atoms, atom_id *index_center, int ncenter,
     }
 }
 
-void calc_electron_density(const char *fn, atom_id **index, int gnx[],
+void calc_electron_density(const char *fn, int **index, int gnx[],
                            double ***slDensity, int *nslices, t_topology *top,
                            int ePBC,
                            int axis, int nr_grps, real *slWidth,
                            t_electron eltab[], int nr, gmx_bool bCenter,
-                           atom_id *index_center, int ncenter,
+                           int *index_center, int ncenter,
                            gmx_bool bRelative, const gmx_output_env_t *oenv)
 {
     rvec        *x0;            /* coordinates without pbc */
@@ -326,10 +326,10 @@ void calc_electron_density(const char *fn, atom_id **index, int gnx[],
     sfree(x0); /* free memory used by coordinate array */
 }
 
-void calc_density(const char *fn, atom_id **index, int gnx[],
+void calc_density(const char *fn, int **index, int gnx[],
                   double ***slDensity, int *nslices, t_topology *top, int ePBC,
                   int axis, int nr_grps, real *slWidth, gmx_bool bCenter,
-                  atom_id *index_center, int ncenter,
+                  int *index_center, int ncenter,
                   gmx_bool bRelative, const gmx_output_env_t *oenv)
 {
     rvec        *x0;            /* coordinates without pbc */
@@ -661,8 +661,8 @@ int gmx_density(int argc, char *argv[])
     t_electron        *el_tab;         /* tabel with nr. of electrons*/
     t_topology        *top;            /* topology               */
     int                ePBC;
-    atom_id           *index_center;   /* index for centering group  */
-    atom_id          **index;          /* indices for all groups     */
+    int               *index_center;   /* index for centering group  */
+    int              **index;          /* indices for all groups     */
     int                i;
 
     t_filenm           fnm[] = { /* files for g_density       */
index 1a7e0112b3dd1eb8b59503d879900f15dc1dd4fb..6fcfcdb5d649bb101ba5a21c6b997ae7abddf0f7 100644 (file)
@@ -141,7 +141,7 @@ int gmx_densmap(int argc, char *argv[])
     char             **grpname, buf[STRLEN];
     const char        *unit;
     int                i, j, k, l, ngrps, anagrp, *gnx = NULL, nindex, nradial = 0, nfr, nmpower;
-    atom_id          **ind = NULL, *index;
+    int              **ind = NULL, *index;
     real             **grid, maxgrid, m1, m2, box1, box2, *tickx, *tickz, invcellvol;
     real               invspa = 0, invspz = 0, axial, r, vol_old, vol, rowsum;
     int                nlev   = 51;
index 6e569dad3a18b250319acbc4b9ea156e0fc06aa1..3182fc2483b18aa20bcf0dc8b18bacd58acae2ef 100644 (file)
@@ -101,7 +101,7 @@ static void center_coords(t_atoms *atoms, matrix box, rvec x0[], int axis)
 }
 
 
-static void density_in_time (const char *fn, atom_id **index, int gnx[], real bw, real bwz, int nsttblock, real *****Densdevel, int *xslices, int *yslices, int *zslices, int *tblock, t_topology *top, int ePBC, int axis, gmx_bool bCenter, gmx_bool bps1d, const gmx_output_env_t *oenv)
+static void density_in_time (const char *fn, int **index, int gnx[], real bw, real bwz, int nsttblock, real *****Densdevel, int *xslices, int *yslices, int *zslices, int *tblock, t_topology *top, int ePBC, int axis, gmx_bool bCenter, gmx_bool bps1d, const gmx_output_env_t *oenv)
 
 {
 /*
@@ -677,7 +677,7 @@ int gmx_densorder(int argc, char *argv[])
     static int         nsttblock = 100;
     static int         axis      = 2;
     static const char *axtitle   = "Z";
-    atom_id          **index; /* Index list for single group*/
+    int              **index; /* Index list for single group*/
     int                xslices, yslices, zslices, tblock;
     static gmx_bool    bGraph   = FALSE;
     static gmx_bool    bCenter  = FALSE;
index c8b50ece85efc7a44d0bbc57496feb3d86359826..b7572a16834250cb54a02e30de1e62a911f6a09a 100644 (file)
@@ -1585,7 +1585,7 @@ int gmx_dipoles(int argc, char *argv[])
     };
     int              *gnx;
     int               nFF[2];
-    atom_id         **grpindex;
+    int             **grpindex;
     char            **grpname = NULL;
     gmx_bool          bGkr, bMU, bSlab;
     t_filenm          fnm[] = {
index cfca64114e0091526710081dc9463783d6c4b7db..67d4445843178beedea7aa614d0ca1aacb2ce652 100644 (file)
@@ -157,7 +157,7 @@ static void check_viol(FILE *log,
                        t_ilist *disres, t_iparams forceparams[],
                        rvec x[], rvec f[],
                        t_pbc *pbc, t_graph *g, t_dr_result dr[],
-                       int clust_id, int isize, atom_id index[], real vvindex[],
+                       int clust_id, int isize, int index[], real vvindex[],
                        t_fcdata *fcd)
 {
     t_iatom         *forceatoms;
@@ -372,7 +372,7 @@ static void dump_viol(FILE *log, int ndr, t_dr_stats *drs, gmx_bool bLinear)
     }
 }
 
-static gmx_bool is_core(int i, int isize, atom_id index[])
+static gmx_bool is_core(int i, int isize, int index[])
 {
     int      kk;
     gmx_bool bIC = FALSE;
@@ -387,7 +387,7 @@ static gmx_bool is_core(int i, int isize, atom_id index[])
 
 static void dump_stats(FILE *log, int nsteps, int ndr, t_ilist *disres,
                        t_iparams ip[], t_dr_result *dr,
-                       int isize, atom_id index[], t_atoms *atoms)
+                       int isize, int index[], t_atoms *atoms)
 {
     int         i, j, nra;
     t_dr_stats *drs;
@@ -437,7 +437,7 @@ static void dump_stats(FILE *log, int nsteps, int ndr, t_ilist *disres,
 
 static void dump_clust_stats(FILE *fp, int ndr, t_ilist *disres,
                              t_iparams ip[], t_blocka *clust, t_dr_result dr[],
-                             char *clust_name[], int isize, atom_id index[])
+                             char *clust_name[], int isize, int index[])
 {
     int         i, j, k, nra, mmm = 0;
     double      sumV, maxV, sumVT3, sumVT6, maxVT3, maxVT6;
@@ -534,7 +534,7 @@ static void dump_disre_matrix(const char *fn, t_dr_result *dr, int ndr,
     int        n_res, a_offset, mb, mol, a;
     t_atoms   *atoms;
     int        i, j, nra, nratoms, tp, ri, rj, index, nlabel, label;
-    atom_id    ai, aj, *ptr;
+    int        ai, aj, *ptr;
     real     **matrix, *t_res, hi, *w_dr, rav, rviol;
     t_rgb      rlo = { 1, 1, 1 };
     t_rgb      rhi = { 0, 0, 0 };
@@ -704,7 +704,7 @@ int gmx_disre(int argc, char *argv[])
     matrix            box;
     gmx_bool          bPDB;
     int               isize;
-    atom_id          *index = NULL, *ind_fit = NULL;
+    int              *index = NULL, *ind_fit = NULL;
     char             *grpname;
     t_cluster_ndx    *clust = NULL;
     t_dr_result       dr, *dr_clust = NULL;
index ec3393abf1a373a69089926f4c05c3b0352c8c79..0e8aa592601f5224070425d35bb3b0088cd9053e 100644 (file)
@@ -502,7 +502,7 @@ int gmx_do_dssp(int argc, char *argv[])
     matrix             box = {{0}};
     int                gnx;
     char              *grpnm, *ss_str;
-    atom_id           *index;
+    int               *index;
     rvec              *xp, *x;
     int               *average_area;
     real             **accr, *accr_ptr = NULL, *av_area, *norm_av_area;
index e39acaf9382ac4776b935b4d327ef3438271f878..e6629a7864ee4746bed82c19ae0136e3789915f0 100644 (file)
@@ -66,7 +66,7 @@ enum {
     VACF, MVACF, DOS, DOS_SOLID, DOS_DIFF, DOS_CP, DOS_S, DOS_A, DOS_E, DOS_NR
 };
 
-static int calcMoleculesInIndexGroup(t_block *mols, int natoms, atom_id *index, int nindex)
+static int calcMoleculesInIndexGroup(t_block *mols, int natoms, int *index, int nindex)
 {
     int   i    = 0;
     int   mol  = 0;
@@ -281,7 +281,7 @@ int gmx_dos(int argc, char *argv[])
     double              cP, DiffCoeff, Delta, f, y, z, sigHS, Shs, Sig, DoS0, recip_fac;
     double              wCdiff, wSdiff, wAdiff, wEdiff;
     int                 grpNatoms;
-    atom_id            *index;
+    int                *index;
     char               *grpname;
     double              invNormalize;
     gmx_bool            normalizeAutocorrelation;
index 4e0ddc60440e434a883dda3dd851598650d34866..9e0a26f01660a086c26d14d65d24770f628efded 100644 (file)
@@ -101,7 +101,7 @@ int gmx_dyecoupl(int argc, char *argv[])
     const char  *in_trajfile, *out_xvgrkfile = NULL, *out_xvginstefffile = NULL, *out_xvgrhistfile = NULL, *out_xvgkhistfile = NULL, *out_datfile = NULL;
     gmx_bool     bHaveFirstFrame, bHaveNextFrame, indexOK = TRUE;
     int          ndon, nacc;
-    atom_id     *donindex, *accindex;
+    int         *donindex, *accindex;
     char        *grpnm;
     t_trxstatus *status;
     t_trxframe   fr;
index 3ef57ec805b6577b5b59a6b04416b068c15e9e46..913d3aa03229e4d843faebee47d957c5f4cdc6ca 100644 (file)
@@ -53,7 +53,7 @@
 #include "gromacs/utility/smalloc.h"
 
 static void rot_conf(t_atoms *atoms, rvec x[], rvec v[], real trans, real angle,
-                     rvec head, rvec tail, int isize, atom_id index[],
+                     rvec head, rvec tail, int isize, int index[],
                      rvec xout[], rvec vout[])
 {
     rvec     arrow, xcm;
@@ -190,7 +190,7 @@ int gmx_dyndom(int argc, char *argv[])
     };
     int               i, j, natoms, isize;
     t_trxstatus      *status;
-    atom_id          *index = NULL, *index_all;
+    int              *index = NULL, *index_all;
     char             *grpname;
     real              angle, trans;
     rvec             *x, *v, *xout, *vout;
index 1aae5c82778f95ce03d268011e6e8e79a9671b9b..50615f8f2184fcc07652d6d178f65b0acb6fc7b3 100644 (file)
@@ -87,7 +87,7 @@ real calc_mass(t_atoms *atoms, gmx_bool bGetMass, gmx_atomprop_t aps)
     return tmass;
 }
 
-real calc_geom(int isize, atom_id *index, rvec *x, rvec geom_center, rvec minval,
+real calc_geom(int isize, int *index, rvec *x, rvec geom_center, rvec minval,
                rvec maxval, gmx_bool bDiam)
 {
     real  diam2, d;
@@ -704,7 +704,7 @@ int gmx_editconf(int argc, char *argv[])
     t_topology       *top     = NULL;
     char             *grpname, *sgrpname, *agrpname;
     int               isize, ssize, asize;
-    atom_id          *index, *sindex, *aindex;
+    int              *index, *sindex, *aindex;
     rvec             *x, *v, gc, rmin, rmax, size;
     int               ePBC;
     matrix            box, rotmatrix, trans;
@@ -952,7 +952,7 @@ int gmx_editconf(int argc, char *argv[])
 
     if (bOrient)
     {
-        atom_id *index;
+        int     *index;
         char    *grpnames;
 
         /* Get a group for principal component analysis */
index 01fe38c9cd8fcd84f10ab6be38ef28838a32347b..6e3937a26098e584d5f000da423aa46dff3fe515 100644 (file)
@@ -98,12 +98,12 @@ int gmx_filter(int argc, char *argv[])
     matrix            topbox, *box, boxf;
     char             *grpname;
     int               isize;
-    atom_id          *index;
+    int              *index;
     real             *w_rls = NULL;
     t_trxstatus      *in;
     t_trxstatus      *outl, *outh;
     int               nffr, i, fr, nat, j, d, m;
-    atom_id          *ind;
+    int              *ind;
     real              flen, *filt, sum, *t;
     rvec              xcmtop, xcm, **x, *ptr, *xf, *xn, *xp, hbox;
     gmx_output_env_t *oenv;
index 29e607654a3fbb24883b4a8a0720ba364eda9efa..627884344b90d7d7b0dfcfa3d594c5bb041de81d 100644 (file)
@@ -59,7 +59,7 @@
 #include "gromacs/utility/smalloc.h"
 
 static void insert_ion(int nsa, int *nwater,
-                       gmx_bool bSet[], int repl[], atom_id index[],
+                       gmx_bool bSet[], int repl[], int index[],
                        rvec x[], t_pbc *pbc,
                        int sign, int q, const char *ionname,
                        t_atoms *atoms,
@@ -133,7 +133,7 @@ static char *aname(const char *mname)
     return str;
 }
 
-void sort_ions(int nsa, int nw, int repl[], atom_id index[],
+void sort_ions(int nsa, int nw, int repl[], int index[],
                t_atoms *atoms, rvec x[],
                const char *p_name, const char *n_name)
 {
@@ -386,7 +386,7 @@ int gmx_genion(int argc, char *argv[])
     t_atoms            atoms;
     t_pbc              pbc;
     int               *repl, ePBC;
-    atom_id           *index;
+    int               *index;
     char              *grpname;
     gmx_bool          *bSet;
     int                i, nw, nwa, nsa, nsalt, iqtot;
index b6c2d815904c9e7ff2c6e1b59a6b8e9174dcfe14..17641a07dda4981241c462ee720115c18c1ae218 100644 (file)
@@ -115,7 +115,7 @@ int gmx_genpr(int argc, char *argv[])
     FILE             *out;
     int               igrp;
     real              d, dd, lo, hi;
-    atom_id          *ind_grp;
+    int              *ind_grp;
     const char       *xfn, *nfn;
     char             *gn_grp;
     matrix            box;
index fabae1d24d5630ae87d801bf7ca232c0f57ddf4f..5827696d6440637107fa079ce4ecb4495a4e5632 100644 (file)
@@ -58,7 +58,7 @@
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
 
-real calc_gyro(rvec x[], int gnx, atom_id index[], t_atom atom[], real tm,
+real calc_gyro(rvec x[], int gnx, int index[], t_atom atom[], real tm,
                rvec gvec, rvec d, gmx_bool bQ, gmx_bool bRot, gmx_bool bMOI, matrix trans)
 {
     int    i, ii, m;
@@ -111,7 +111,7 @@ real calc_gyro(rvec x[], int gnx, atom_id index[], t_atom atom[], real tm,
 }
 
 void calc_gyro_z(rvec x[], matrix box,
-                 int gnx, atom_id index[], t_atom atom[],
+                 int gnx, int index[], t_atom atom[],
                  int nz, real time, FILE *out)
 {
     static dvec   *inertia = NULL;
@@ -217,7 +217,7 @@ int gmx_gyrate(int argc, char *argv[])
     int               natoms;
     char             *grpname;
     int               j, m, gnx, nam, mol;
-    atom_id          *index;
+    int              *index;
     gmx_output_env_t *oenv;
     gmx_rmpbc_t       gpbc   = NULL;
     const char       *leg[]  = { "Rg", "Rg\\sX\\N", "Rg\\sY\\N", "Rg\\sZ\\N" };
index 309b597c727f7a4e0b95eda69e24dbfc086b13c7..37c36848ad5ad34535af4c8faf126d39a6f1c570 100644 (file)
 /* directions.                                                              */
 /****************************************************************************/
 
-void calc_h2order(const char *fn, atom_id index[], int ngx, rvec **slDipole,
+void calc_h2order(const char *fn, int index[], int ngx, rvec **slDipole,
                   real **slOrder, real *slWidth, int *nslices,
                   t_topology *top, int ePBC,
-                  int axis, gmx_bool bMicel, atom_id micel[], int nmic,
+                  int axis, gmx_bool bMicel, int micel[], int nmic,
                   const gmx_output_env_t *oenv)
 {
     rvec *x0,            /* coordinates with pbc */
@@ -296,7 +296,7 @@ int gmx_h2order(int argc, char *argv[])
                        nmic = 0;            /* nr. of atoms in micelle    */
     t_topology        *top;                 /* topology           */
     int                ePBC;
-    atom_id           *index,               /* indices for solvent group  */
+    int               *index,               /* indices for solvent group  */
     *micelle                  = NULL;
     gmx_bool           bMicel =  FALSE;     /* think we're a micel        */
     t_filenm           fnm[]  = {           /* files for g_order      */
index 6f4f13c019f1084250bd11efd154e62b5d18cfb0..c487dc496df51022f56214dcc259ec5a25b0b3f8 100644 (file)
@@ -122,7 +122,7 @@ static gmx_bool    bDebug = FALSE;
 typedef struct {
     int      nr;
     int      maxnr;
-    atom_id *atoms;
+    int     *atoms;
 } t_ncell;
 
 typedef struct {
@@ -131,7 +131,7 @@ typedef struct {
 } t_gridcell;
 
 typedef int     t_icell[grNR];
-typedef atom_id h_id[MAXHYDRO];
+typedef int h_id[MAXHYDRO];
 
 typedef struct {
     int      history[MAXHYDRO];
@@ -154,9 +154,9 @@ typedef struct {
 
 typedef struct {
     int      nra, max_nra;
-    atom_id *acc;             /* Atom numbers of the acceptors     */
-    int     *grp;             /* Group index                       */
-    int     *aptr;            /* Map atom number to acceptor index */
+    int     *acc;         /* Atom numbers of the acceptors     */
+    int     *grp;         /* Group index                       */
+    int     *aptr;        /* Map atom number to acceptor index */
 } t_acceptors;
 
 typedef struct {
@@ -356,7 +356,7 @@ static void inc_nhbonds(t_donors *ddd, int d, int h)
     }
 }
 
-static int _acceptor_index(t_acceptors *a, int grp, atom_id i,
+static int _acceptor_index(t_acceptors *a, int grp, int i,
                            const char *file, int line)
 {
     int ai = a->aptr[i];
@@ -377,7 +377,7 @@ static int _acceptor_index(t_acceptors *a, int grp, atom_id i,
 }
 #define acceptor_index(a, grp, i) _acceptor_index(a, grp, i, __FILE__, __LINE__)
 
-static int _donor_index(t_donors *d, int grp, atom_id i, const char *file, int line)
+static int _donor_index(t_donors *d, int grp, int i, const char *file, int line)
 {
     int di = d->dptr[i];
 
@@ -588,7 +588,7 @@ static char *mkatomname(t_atoms *atoms, int i)
     return buf;
 }
 
-static void gen_datable(atom_id *index, int isize, unsigned char *datable, int natoms)
+static void gen_datable(int *index, int isize, unsigned char *datable, int natoms)
 {
     /* Generates table of all atoms and sets the ingroup bit for atoms in index[] */
     int i;
@@ -630,7 +630,7 @@ static void add_acc(t_acceptors *a, int ia, int grp)
 }
 
 static void search_acceptors(t_topology *top, int isize,
-                             atom_id *index, t_acceptors *a, int grp,
+                             int *index, t_acceptors *a, int grp,
                              gmx_bool bNitAcc,
                              gmx_bool bContact, gmx_bool bDoIt, unsigned char *datable)
 {
@@ -732,14 +732,14 @@ static void add_dh(t_donors *ddd, int id, int ih, int grp, unsigned char *databl
     }
 }
 
-static void search_donors(t_topology *top, int isize, atom_id *index,
+static void search_donors(t_topology *top, int isize, int *index,
                           t_donors *ddd, int grp, gmx_bool bContact, gmx_bool bDoIt,
                           unsigned char *datable)
 {
     int            i, j;
     t_functype     func_type;
     t_ilist       *interaction;
-    atom_id        nr1, nr2, nr3;
+    int            nr1, nr2, nr3;
 
     if (!ddd->dptr)
     {
@@ -927,7 +927,7 @@ static void build_grid(t_hbdata *hb, rvec x[], rvec xshell,
                        ivec ngrid, t_gridcell ***grid)
 {
     int         i, m, gr, xi, yi, zi, nr;
-    atom_id    *ad;
+    int        *ad;
     ivec        grididx;
     rvec        invdelta, dshell;
     t_ncell    *newgrid;
@@ -2534,7 +2534,7 @@ int gmx_hbond(int argc, char *argv[])
     int                   npargs, natoms, nframes = 0, shatom;
     int                  *isize;
     char                **grpnames;
-    atom_id             **index;
+    int                 **index;
     rvec                 *x, hbox;
     matrix                box;
     real                  t, ccut, dist = 0.0, ang = 0.0;
@@ -2767,7 +2767,7 @@ int gmx_hbond(int argc, char *argv[])
     if (rshell > 0)
     {
         int      shisz;
-        atom_id *shidx;
+        int     *shidx;
         char    *shgrpnm;
         /* get index group with atom for shell */
         do
index 5d5d72e484e9c48d7e9906dac7096237fb5d50d9..a6e813e5df154a2ec892bcfef2e2627ef9d68075 100644 (file)
@@ -146,7 +146,7 @@ int gmx_helix(int argc, char *argv[])
     int               natoms, nres;
     t_bb             *bb;
     int               i, j, nall, nbb, nca, teller;
-    atom_id          *bbindex, *caindex, *allindex;
+    int              *bbindex, *caindex, *allindex;
     t_topology       *top;
     int               ePBC;
     rvec             *x, *xref;
index 560902cf2201e366e1cc7ebee4327e78e106dc0d..29bd388bdc37aff2f8611cde63af0bbb6d95f5d6 100644 (file)
@@ -85,8 +85,8 @@ int gmx_helixorient(int argc, char *argv[])
 
     int               i, j, teller = 0;
     int               iCA, iSC;
-    atom_id          *ind_CA;
-    atom_id          *ind_SC;
+    int              *ind_CA;
+    int              *ind_SC;
     char             *gn_CA;
     char             *gn_SC;
     rvec              v1, v2;
index 0038e70d0eff7823bd61c771eb45c59c27f33eb2..09d197232df1a3f42c2be8f1c7747bcb04070e1c 100644 (file)
@@ -60,7 +60,7 @@
 #include "gromacs/utility/smalloc.h"
 
 /* Print name of first atom in all groups in index file */
-static void print_types(atom_id index[], atom_id a[], int ngrps,
+static void print_types(int index[], int a[], int ngrps,
                         char *groups[], t_topology *top)
 {
     int i;
@@ -86,7 +86,7 @@ static void check_length(real length, int a, int b)
 
 static void find_tetra_order_grid(t_topology top, int ePBC,
                                   int natoms, matrix box,
-                                  rvec x[], int maxidx, atom_id index[],
+                                  rvec x[], int maxidx, int index[],
                                   real *sgmean, real *skmean,
                                   int nslicex, int nslicey, int nslicez,
                                   real ***sggrid, real ***skgrid)
@@ -285,7 +285,7 @@ static void calc_tetra_order_interface(const char *fnNDX, const char *fnTPS, con
     rvec         *xtop, *x;
     matrix        box;
     real          sg, sk, sgintf;
-    atom_id     **index   = NULL;
+    int         **index   = NULL;
     char        **grpname = NULL;
     int           i, j, k, n, *isize, ng, nslicez, framenr;
     real       ***sg_grid = NULL, ***sk_grid = NULL, ***sg_fravg = NULL, ***sk_fravg = NULL, ****sk_4d = NULL, ****sg_4d = NULL;
index 9872614a359e9a99d3f206067cdd07ddd8c526ac..ce0cdb69acdf51cb9940047d2b360e013f65e984 100644 (file)
@@ -106,7 +106,7 @@ typedef struct edipar
 
 
 
-void make_t_edx(struct edix *edx, int natoms, rvec *pos, atom_id index[])
+void make_t_edx(struct edix *edx, int natoms, rvec *pos, int index[])
 {
     edx->nr   = natoms;
     edx->anrs = index;
@@ -492,8 +492,8 @@ void init_edx(struct edix *edx)
     snew(edx->anrs, 1);
 }
 
-void filter2edx(struct edix *edx, int nindex, atom_id index[], int ngro,
-                atom_id igro[], rvec *x, const char* structure)
+void filter2edx(struct edix *edx, int nindex, int index[], int ngro,
+                int igro[], rvec *x, const char* structure)
 {
 /* filter2edx copies coordinates from x to edx which are given in index
  */
@@ -520,9 +520,9 @@ void filter2edx(struct edix *edx, int nindex, atom_id index[], int ngro,
 
 void get_structure(t_atoms *atoms, const char *IndexFile,
                    const char *StructureFile, struct edix *edx, int nfit,
-                   atom_id ifit[], int nav, atom_id index[])
+                   int ifit[], int nav, int index[])
 {
-    atom_id *igro; /*index corresponding to target or origin structure*/
+    int     *igro; /*index corresponding to target or origin structure*/
     int      ngro;
     int      ntar;
     rvec    *xtar;
@@ -731,7 +731,7 @@ int gmx_make_edi(int argc, char *argv[])
     char             *grpname;
     const char       *indexfile;
     int               i;
-    atom_id          *index, *ifit;
+    int              *index, *ifit;
     int               nfit;           /* Number of atoms in the reference/fit structure */
     int               ev_class;       /* parameter _class i.e. evMON, evRADFIX etc. */
     int               nvecs;
index 085f6849251175f94bef7474e337881207730503..6e6a72d0ef94218eb5aa6d99fe2bf77b8b93833a 100644 (file)
@@ -63,10 +63,10 @@ static const int NOTSET = -92637;
 
 gmx_bool         bCase = FALSE;
 
-static int or_groups(atom_id nr1, atom_id *at1, atom_id nr2, atom_id *at2,
-                     atom_id *nr, atom_id *at)
+static int or_groups(int nr1, int *at1, int nr2, int *at2,
+                     int *nr, int *at)
 {
-    atom_id  i1, i2, max = 0;
+    int      i1, i2, max = 0;
     gmx_bool bNotIncr;
 
     *nr = 0;
@@ -123,10 +123,10 @@ static int or_groups(atom_id nr1, atom_id *at1, atom_id nr2, atom_id *at2,
     return *nr;
 }
 
-static int and_groups(atom_id nr1, atom_id *at1, atom_id nr2, atom_id *at2,
-                      atom_id *nr, atom_id *at)
+static int and_groups(int nr1, int *at1, int nr2, int *at2,
+                      int *nr, int *at)
 {
-    atom_id i1, i2;
+    int i1, i2;
 
     *nr = 0;
     for (i1 = 0; i1 < nr1; i1++)
@@ -294,8 +294,8 @@ static gmx_bool parse_string(char **string, int *nr, int ngrps, char **grpname)
     return (*nr) != -1;
 }
 
-static int select_atomnumbers(char **string, t_atoms *atoms, atom_id n1,
-                              atom_id *nr, atom_id *index, char *gname)
+static int select_atomnumbers(char **string, t_atoms *atoms, int n1,
+                              int *nr, int *index, char *gname)
 {
     char    buf[STRLEN];
     int     i, up;
@@ -358,8 +358,8 @@ static int select_atomnumbers(char **string, t_atoms *atoms, atom_id n1,
 }
 
 static int select_residuenumbers(char **string, t_atoms *atoms,
-                                 atom_id n1, char c,
-                                 atom_id *nr, atom_id *index, char *gname)
+                                 int n1, char c,
+                                 int *nr, int *index, char *gname)
 {
     char       buf[STRLEN];
     int        i, j, up;
@@ -431,8 +431,8 @@ static int select_residuenumbers(char **string, t_atoms *atoms,
 }
 
 static int select_residueindices(char **string, t_atoms *atoms,
-                                 atom_id n1, char c,
-                                 atom_id *nr, atom_id *index, char *gname)
+                                 int n1, char c,
+                                 int *nr, int *index, char *gname)
 {
     /*this should be similar to select_residuenumbers except select by index (sequential numbering in file)*/
     /*resind+1 for 1-indexing*/
@@ -507,7 +507,7 @@ static int select_residueindices(char **string, t_atoms *atoms,
 
 
 static gmx_bool atoms_from_residuenumbers(t_atoms *atoms, int group, t_blocka *block,
-                                          atom_id *nr, atom_id *index, char *gname)
+                                          int *nr, int *index, char *gname)
 {
     int i, j, j0, j1, resnr, nres;
 
@@ -577,11 +577,11 @@ static gmx_bool comp_name(char *name, char *search)
 }
 
 static int select_chainnames(t_atoms *atoms, int n_names, char **names,
-                             atom_id *nr, atom_id *index)
+                             int *nr, int *index)
 {
     char    name[2];
     int     j;
-    atom_id i;
+    int     i;
 
     name[1] = 0;
     *nr     = 0;
@@ -611,11 +611,11 @@ static int select_chainnames(t_atoms *atoms, int n_names, char **names,
 }
 
 static int select_atomnames(t_atoms *atoms, int n_names, char **names,
-                            atom_id *nr, atom_id *index, gmx_bool bType)
+                            int *nr, int *index, gmx_bool bType)
 {
     char   *name;
     int     j;
-    atom_id i;
+    int     i;
 
     *nr = 0;
     for (i = 0; i < atoms->nr; i++)
@@ -651,11 +651,11 @@ static int select_atomnames(t_atoms *atoms, int n_names, char **names,
 }
 
 static int select_residuenames(t_atoms *atoms, int n_names, char **names,
-                               atom_id *nr, atom_id *index)
+                               int *nr, int *index)
 {
     char   *name;
     int     j;
-    atom_id i;
+    int     i;
 
     *nr = 0;
     for (i = 0; i < atoms->nr; i++)
@@ -682,7 +682,7 @@ static int select_residuenames(t_atoms *atoms, int n_names, char **names,
     return *nr;
 }
 
-static void copy2block(int n, atom_id *index, t_blocka *block)
+static void copy2block(int n, int *index, t_blocka *block)
 {
     int i, n0;
 
@@ -710,7 +710,7 @@ static void make_gname(int n, char **names, char *gname)
     }
 }
 
-static void copy_group(int g, t_blocka *block, atom_id *nr, atom_id *index)
+static void copy_group(int g, t_blocka *block, int *nr, int *index)
 {
     int i, i0;
 
@@ -769,7 +769,7 @@ static void split_group(t_atoms *atoms, int sel_nr, t_blocka *block, char ***gn,
 {
     char    buf[STRLEN], *name;
     int     i, resind;
-    atom_id a, n0, n1;
+    int     a, n0, n1;
 
     printf("Splitting group %d '%s' into %s\n", sel_nr, (*gn)[sel_nr],
            bAtom ? "atoms" : "residues");
@@ -812,7 +812,7 @@ static int split_chain(t_atoms *atoms, rvec *x,
 {
     char    buf[STRLEN];
     int     j, nchain;
-    atom_id i, a, natoms, *start = NULL, *end = NULL, ca_start, ca_end;
+    int     i, a, natoms, *start = NULL, *end = NULL, ca_start, ca_end;
     rvec    vec;
 
     natoms   = atoms->nr;
@@ -928,12 +928,12 @@ static gmx_bool check_have_atoms(t_atoms *atoms, char *string)
 
 static gmx_bool parse_entry(char **string, int natoms, t_atoms *atoms,
                             t_blocka *block, char ***gn,
-                            atom_id *nr, atom_id *index, char *gname)
+                            int *nr, int *index, char *gname)
 {
     static char   **names, *ostring;
     static gmx_bool bFirst = TRUE;
     int             j, n_names, sel_nr1;
-    atom_id         i, nr1, *index1;
+    int             i, nr1, *index1;
     char            c;
     gmx_bool        bRet, bCompl;
 
@@ -1163,7 +1163,7 @@ static void edit_index(int natoms, t_atoms *atoms, rvec *x, t_blocka *block, cha
     char            inp_string[STRLEN], *string;
     char            gname[STRLEN], gname1[STRLEN], gname2[STRLEN];
     int             i, i0, i1, sel_nr, sel_nr2, newgroup;
-    atom_id         nr, nr1, nr2, *index, *index1, *index2;
+    int             nr, nr1, nr2, *index, *index1, *index2;
     gmx_bool        bAnd, bOr, bPrintOnce;
 
     if (bFirst)
index 33cbe0c52e2935d49203c7bf66793a5e05c42b59..9a9ba4dd6ac359fe086912871211bb4e4d4a4f8c 100644 (file)
@@ -106,7 +106,7 @@ int *res_natm(t_atoms *atoms)
 }
 
 static void calc_mat(int nres, int natoms, int rndx[],
-                     rvec x[], atom_id *index,
+                     rvec x[], int *index,
                      real trunc, real **mdmat, int **nmat, int ePBC, matrix box)
 {
     int   i, j, resi, resj;
@@ -207,7 +207,7 @@ int gmx_mdmat(int argc, char *argv[])
     int               ePBC;
     t_atoms           useatoms;
     int               isize;
-    atom_id          *index;
+    int              *index;
     char             *grpname;
     int              *rndx, *natm, prevres, newres;
 
index 0b46628d5a38b2d73d515d3107d9bbcae8b26e13..071593346f571659ce232a4f7c9813927417528c 100644 (file)
@@ -62,7 +62,7 @@
 
 
 static void periodic_dist(int ePBC,
-                          matrix box, rvec x[], int n, atom_id index[],
+                          matrix box, rvec x[], int n, int index[],
                           real *rmin, real *rmax, int *min_ind)
 {
 #define NSHIFT_MAX 26
@@ -140,7 +140,7 @@ static void periodic_dist(int ePBC,
 
 static void periodic_mindist_plot(const char *trxfn, const char *outfn,
                                   t_topology *top, int ePBC,
-                                  int n, atom_id index[], gmx_bool bSplit,
+                                  int n, int index[], gmx_bool bSplit,
                                   const gmx_output_env_t *oenv)
 {
     FILE        *out;
@@ -215,14 +215,14 @@ static void periodic_mindist_plot(const char *trxfn, const char *outfn,
 }
 
 static void calc_dist(real rcut, gmx_bool bPBC, int ePBC, matrix box, rvec x[],
-                      int nx1, int nx2, atom_id index1[], atom_id index2[],
+                      int nx1, int nx2, int index1[], int index2[],
                       gmx_bool bGroup,
                       real *rmin, real *rmax, int *nmin, int *nmax,
                       int *ixmin, int *jxmin, int *ixmax, int *jxmax)
 {
     int      i, j, i0 = 0, j1;
     int      ix, jx;
-    atom_id *index3;
+    int     *index3;
     rvec     dx;
     real     r2, rmin2, rmax2, rcut2;
     t_pbc    pbc;
@@ -326,8 +326,8 @@ static void calc_dist(real rcut, gmx_bool bPBC, int ePBC, matrix box, rvec x[],
 void dist_plot(const char *fn, const char *afile, const char *dfile,
                const char *nfile, const char *rfile, const char *xfile,
                real rcut, gmx_bool bMat, t_atoms *atoms,
-               int ng, atom_id *index[], int gnx[], char *grpn[], gmx_bool bSplit,
-               gmx_bool bMin, int nres, atom_id *residue, gmx_bool bPBC, int ePBC,
+               int ng, int *index[], int gnx[], char *grpn[], gmx_bool bSplit,
+               gmx_bool bMin, int nres, int *residue, gmx_bool bPBC, int ePBC,
                gmx_bool bGroup, gmx_bool bEachResEachTime, gmx_bool bPrintResName,
                const gmx_output_env_t *oenv)
 {
@@ -342,7 +342,7 @@ void dist_plot(const char *fn, const char *afile, const char *dfile,
     int              min2, max2, min1r, min2r, max1r, max2r;
     int              min1 = 0;
     int              max1 = 0;
-    atom_id          oindex[2];
+    int              oindex[2];
     rvec            *x0;
     matrix           box;
     gmx_bool         bFirst;
@@ -594,7 +594,7 @@ void dist_plot(const char *fn, const char *afile, const char *dfile,
     sfree(x0);
 }
 
-int find_residues(t_atoms *atoms, int n, atom_id index[], atom_id **resindex)
+int find_residues(t_atoms *atoms, int n, int index[], int **resindex)
 {
     int  i;
     int  nres      = 0, resnr, presnr = 0;
@@ -626,7 +626,7 @@ int find_residues(t_atoms *atoms, int n, atom_id index[], atom_id **resindex)
     return nres;
 }
 
-void dump_res(FILE *out, int nres, atom_id *resindex, atom_id index[])
+void dump_res(FILE *out, int nres, int *resindex, int index[])
 {
     int i, j;
 
@@ -701,7 +701,7 @@ int gmx_mindist(int argc, char *argv[])
     const char       *trxfnm, *tpsfnm, *ndxfnm, *distfnm, *numfnm, *atmfnm, *oxfnm, *resfnm;
     char            **grpname;
     int              *gnx;
-    atom_id         **index, *residues = NULL;
+    int             **index, *residues = NULL;
     t_filenm          fnm[] = {
         { efTRX, "-f",  NULL,      ffREAD },
         { efTPS,  NULL, NULL,      ffOPTRD },
index b58b326276b55095742e236a490c1e61513f9d96..9378205c5cf10406bc7dbbc1cddbf5af9b21a17a 100644 (file)
@@ -115,7 +115,7 @@ int gmx_morph(int argc, char *argv[])
     FILE             *fp    = NULL;
     int               i, isize, is_lsq, nat1, nat2;
     t_trxstatus      *status;
-    atom_id          *index, *index_lsq, *index_all, *dummy;
+    int              *index, *index_lsq, *index_all, *dummy;
     rvec             *x1, *x2, *xx;
     matrix            box;
     real              rms1, rms2, fac, *mass;
index 6b8318a8349adb36147a6b570000322db8c48af0..7254b1232538d8bb934f1508847657178cb5ac09 100644 (file)
@@ -95,7 +95,7 @@ typedef struct {
                                  point. */
 } t_corr;
 
-typedef real t_calc_func (t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
+typedef real t_calc_func (t_corr *curr, int nx, int index[], int nx0, rvec xc[],
                           rvec dcom, gmx_bool bTen, matrix mat);
 
 static real thistime(t_corr *curr)
@@ -217,7 +217,7 @@ static void corr_print(t_corr *curr, gmx_bool bTen, const char *fn, const char *
 }
 
 /* called from corr_loop, to do the main calculations */
-static void calc_corr(t_corr *curr, int nr, int nx, atom_id index[], rvec xc[],
+static void calc_corr(t_corr *curr, int nr, int nx, int index[], rvec xc[],
                       gmx_bool bRmCOMM, rvec com, t_calc_func *calc1, gmx_bool bTen)
 {
     int    nx0;
@@ -265,7 +265,7 @@ static void calc_corr(t_corr *curr, int nr, int nx, atom_id index[], rvec xc[],
 }
 
 /* the non-mass-weighted mean-squared displacement calcuation */
-static real calc1_norm(t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
+static real calc1_norm(t_corr *curr, int nx, int index[], int nx0, rvec xc[],
                        rvec dcom, gmx_bool bTen, matrix mat)
 {
     int  i, ix, m, m2;
@@ -403,7 +403,7 @@ static real calc_one_mw(t_corr *curr, int ix, int nx0, rvec xc[], real *tm,
 }
 
 /* the normal, mass-weighted mean-squared displacement calcuation */
-static real calc1_mw(t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
+static real calc1_mw(t_corr *curr, int nx, int index[], int nx0, rvec xc[],
                      rvec dcom, gmx_bool bTen, matrix mat)
 {
     int  i;
@@ -431,7 +431,7 @@ static real calc1_mw(t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
    xcur = the current coordinates
    xprev = the previous coordinates
    box = the box matrix */
-static void prep_data(gmx_bool bMol, int gnx, atom_id index[],
+static void prep_data(gmx_bool bMol, int gnx, int index[],
                       rvec xcur[], rvec xprev[], matrix box)
 {
     int  i, m, ind;
@@ -480,7 +480,7 @@ static void prep_data(gmx_bool bMol, int gnx, atom_id index[],
    box = the box matrix
    atoms = atom data (for mass)
    com(output) = center of mass  */
-static void calc_com(gmx_bool bMol, int gnx, atom_id index[],
+static void calc_com(gmx_bool bMol, int gnx, int index[],
                      rvec xcur[], rvec xprev[], matrix box, t_atoms *atoms,
                      rvec com)
 {
@@ -519,7 +519,7 @@ static void calc_com(gmx_bool bMol, int gnx, atom_id index[],
 }
 
 
-static real calc1_mol(t_corr *curr, int nx, atom_id gmx_unused index[], int nx0, rvec xc[],
+static real calc1_mol(t_corr *curr, int nx, int gmx_unused index[], int nx0, rvec xc[],
                       rvec dcom, gmx_bool bTen, matrix mat)
 {
     int  i;
@@ -640,8 +640,8 @@ void printmol(t_corr *curr, const char *fn,
  * read_next_x
  */
 int corr_loop(t_corr *curr, const char *fn, t_topology *top, int ePBC,
-              gmx_bool bMol, int gnx[], atom_id *index[],
-              t_calc_func *calc1, gmx_bool bTen, int *gnx_com, atom_id *index_com[],
+              gmx_bool bMol, int gnx[], int *index[],
+              t_calc_func *calc1, gmx_bool bTen, int *gnx_com, int *index_com[],
               real dt, real t_pdb, rvec **x_pdb, matrix box_pdb,
               const gmx_output_env_t *oenv)
 {
@@ -880,14 +880,14 @@ void do_corr(const char *trx_file, const char *ndx_file, const char *msd_file,
 {
     t_corr        *msd;
     int           *gnx;   /* the selected groups' sizes */
-    atom_id      **index; /* selected groups' indices */
+    int          **index; /* selected groups' indices */
     char         **grpname;
     int            i, i0, i1, j, N, nat_trx;
     real          *DD, *SigmaD, a, a2, b, r, chi2;
     rvec          *x;
     matrix         box;
     int           *gnx_com     = NULL; /* the COM removal group size  */
-    atom_id      **index_com   = NULL; /* the COM removal group atom indices */
+    int          **index_com   = NULL; /* the COM removal group atom indices */
     char         **grpname_com = NULL; /* the COM removal group name */
 
     snew(gnx, nrgrp);
index 6ebdac7eb235ca6e86ca10bd4e3ca5a119951591..e7a3852e55818dc39e30014c866a2a0847041ad4 100644 (file)
@@ -100,7 +100,7 @@ int gmx_nmens(int argc, char *argv[])
     const char         *indexfile;
     int                 i, j, d, s, v;
     int                 nout, *iout, noutvec, *outvec;
-    atom_id            *index;
+    int                *index;
     real                rfac, rhalf, jr;
     gmx_output_env_t   *oenv;
     gmx_rng_t           rng;
index cf8e67a211d6dd580fe784f087e7d144c285844f..36d55a44642d21cf812deec2ba07bbe4f67c36a4 100644 (file)
@@ -75,7 +75,7 @@
 
 static void find_nearest_neighbours(int ePBC,
                                     int natoms, matrix box,
-                                    rvec x[], int maxidx, atom_id index[],
+                                    rvec x[], int maxidx, int index[],
                                     real *sgmean, real *skmean,
                                     int nslice, int slice_dim,
                                     real sgslice[], real skslice[],
@@ -265,7 +265,7 @@ static void calc_tetra_order_parm(const char *fnNDX, const char *fnTPS,
     rvec        *xtop, *x;
     matrix       box;
     real         sg, sk;
-    atom_id    **index;
+    int        **index;
     char       **grpname;
     int          i, *isize, ng, nframes;
     real        *sg_slice, *sg_slice_tot, *sk_slice, *sk_slice_tot;
@@ -346,7 +346,7 @@ static void calc_tetra_order_parm(const char *fnNDX, const char *fnTPS,
 
 
 /* Print name of first atom in all groups in index file */
-static void print_types(atom_id index[], atom_id a[], int ngrps,
+static void print_types(int index[], int a[], int ngrps,
                         char *groups[], t_topology *top)
 {
     int i;
@@ -370,7 +370,7 @@ static void check_length(real length, int a, int b)
     }
 }
 
-void calc_order(const char *fn, atom_id *index, atom_id *a, rvec **order,
+void calc_order(const char *fn, int *index, int *a, rvec **order,
                 real ***slOrder, real *slWidth, int nslices, gmx_bool bSliced,
                 gmx_bool bUnsat, t_topology *top, int ePBC, int ngrps, int axis,
                 gmx_bool permolecule, gmx_bool radial, gmx_bool distcalc, const char *radfn,
@@ -403,7 +403,7 @@ void calc_order(const char *fn, atom_id *index, atom_id *a, rvec **order,
     gmx_bool     use_unitvector         = FALSE; /* use a specified unit vector instead of axis to specify unit normal*/
     rvec         direction, com, dref, dvec;
     int          comsize, distsize;
-    atom_id     *comidx  = NULL, *distidx = NULL;
+    int         *comidx  = NULL, *distidx = NULL;
     char        *grpname = NULL;
     t_pbc        pbc;
     real         arcdist, tmpdist;
@@ -833,7 +833,7 @@ void order_plot(rvec order[], real *slOrder[], const char *afile, const char *bf
     xvgrclose(slOrd);
 }
 
-void write_bfactors(t_filenm  *fnm, int nfile, atom_id *index, atom_id *a, int nslices, int ngrps, real **order, t_topology *top, real **distvals, gmx_output_env_t *oenv)
+void write_bfactors(t_filenm  *fnm, int nfile, int *index, int *a, int nslices, int ngrps, real **order, t_topology *top, real **distvals, gmx_output_env_t *oenv)
 {
     /*function to write order parameters as B factors in PDB file using
           first frame of trajectory*/
@@ -949,7 +949,7 @@ int gmx_order(int argc, char *argv[])
                        axis = 0;                      /* normal axis                */
     t_topology       *top;                            /* topology         */
     int               ePBC;
-    atom_id          *index,                          /* indices for a              */
+    int              *index,                          /* indices for a              */
     *a;                                               /* atom numbers in each group */
     t_blocka         *block;                          /* data from index file       */
     t_filenm          fnm[] = {                       /* files for g_order    */
index 352a889c9040d6b2c54c28cc375763fa2efd2af6..82007565ae9e7033a4e6450c24e701b2b62e5123 100644 (file)
@@ -98,7 +98,7 @@ void p_integrate(double *result, double data[], int ndata, double slWidth)
     return;
 }
 
-void calc_potential(const char *fn, atom_id **index, int gnx[],
+void calc_potential(const char *fn, int **index, int gnx[],
                     double ***slPotential, double ***slCharge,
                     double ***slField, int *nslices,
                     t_topology *top, int ePBC,
@@ -453,7 +453,7 @@ int gmx_potential(int argc, char *argv[])
     int        *ngx;                           /* sizes of groups            */
     t_topology *top;                           /* topology        */
     int         ePBC;
-    atom_id   **index;                         /* indices for all groups     */
+    int       **index;                         /* indices for all groups     */
     t_filenm    fnm[] = {                      /* files for g_order       */
         { efTRX, "-f", NULL,  ffREAD },        /* trajectory file             */
         { efNDX, NULL, NULL,  ffREAD },        /* index file          */
index 195dd7ac0667cccae11fc3dd2d399ce983794c7f..05f95fb693a42ae4df7267c98ad8d725907226d1 100644 (file)
@@ -60,7 +60,7 @@
 void
 calc_principal_axes(t_topology *   top,
                     rvec *         x,
-                    atom_id *      index,
+                    int     *      index,
                     int            n,
                     matrix         axes,
                     rvec           inertia)
@@ -95,7 +95,7 @@ int gmx_principal(int argc, char *argv[])
     int               natoms;
     char             *grpname;
     int               i, gnx;
-    atom_id          *index;
+    int              *index;
     rvec              moi;
     FILE        *     axis1;
     FILE        *     axis2;
index 9fcead046336557d0c52276a9b2046b399401cf5..dbb0df2fa263ed7c01517157682afdbb5957b7b6 100644 (file)
@@ -62,7 +62,7 @@
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
 
-static void norm_princ(t_atoms *atoms, int isize, atom_id *index, int natoms,
+static void norm_princ(t_atoms *atoms, int isize, int *index, int natoms,
                        rvec *x)
 {
     int  i, m;
@@ -247,7 +247,7 @@ int gmx_rms(int argc, char *argv[])
     gmx_bool          bA1, bA2, bPrev, bTop, *bInMat = NULL;
     int               ifit, *irms, ibond = 0, *ind_bond1 = NULL, *ind_bond2 = NULL, n_ind_m =
         0;
-    atom_id          *ind_fit, **ind_rms, *ind_m = NULL, *rev_ind_m = NULL, *ind_rms_m =
+    int              *ind_fit, **ind_rms, *ind_m = NULL, *rev_ind_m = NULL, *ind_rms_m =
         NULL;
     char             *gn_fit, **gn_rms;
     t_rgb             rlo, rhi;
index 3b3acf6ca4cda6fc0f0c6e50feb79c5cd408f2af..c1e81401140e9e0f97cb593c89d4416651962cb5 100644 (file)
@@ -60,7 +60,7 @@
 #include "gromacs/utility/smalloc.h"
 
 
-static void calc_dist(int nind, atom_id index[], rvec x[], int ePBC, matrix box,
+static void calc_dist(int nind, int index[], rvec x[], int ePBC, matrix box,
                       real **d)
 {
     int      i, j;
@@ -82,7 +82,7 @@ static void calc_dist(int nind, atom_id index[], rvec x[], int ePBC, matrix box,
     }
 }
 
-static void calc_dist_tot(int nind, atom_id index[], rvec x[],
+static void calc_dist_tot(int nind, int index[], rvec x[],
                           int ePBC, matrix box,
                           real **d, real **dtot, real **dtot2,
                           gmx_bool bNMR, real **dtot1_3, real **dtot1_6)
@@ -280,9 +280,9 @@ static gmx_bool is_equiv(int neq, t_equiv **equiv, char **nname,
 }
 
 static int analyze_noe_equivalent(const char *eq_fn,
-                                  t_atoms *atoms, int isize, atom_id *index,
+                                  t_atoms *atoms, int isize, int *index,
                                   gmx_bool bSumH,
-                                  atom_id *noe_index, t_noe_gr *noe_gr)
+                                  int *noe_index, t_noe_gr *noe_gr)
 {
     int       i, j, anmil, anmjl, rnri, rnrj, gi, groupnr, neq;
     char     *anmi, *anmj, **nnm;
@@ -464,7 +464,7 @@ static char *noe2scale(real r3, real r6, real rmax)
     return buf;
 }
 
-static void calc_noe(int isize, atom_id *noe_index,
+static void calc_noe(int isize, int *noe_index,
                      real **dtot1_3, real **dtot1_6, int gnr, t_noe **noe)
 {
     int i, j, gi, gj;
@@ -667,7 +667,7 @@ int gmx_rmsdist(int argc, char *argv[])
 
     t_trxstatus      *status;
     int               isize, gnr = 0;
-    atom_id          *index, *noe_index;
+    int              *index, *noe_index;
     char             *grpname;
     real            **d_r, **d, **dtot, **dtot2, **mean, **rms, **rmsc, *resnr;
     real            **dtot1_3 = NULL, **dtot1_6 = NULL;
index 970e02c0c96bcb7006120152308f4c4b48becc96..7b017be664f6540e594ddc09fff2c9fda40ac2ef 100644 (file)
@@ -107,7 +107,7 @@ void correlate_aniso(const char *fn, t_atoms *ref, t_atoms *calc,
 }
 
 static void average_residues(double f[], double **U, int uind,
-                             int isize, atom_id index[], real w_rls[],
+                             int isize, int index[], real w_rls[],
                              t_atoms *atoms)
 {
     int    i, j, start;
@@ -239,13 +239,13 @@ int gmx_rmsf(int argc, char *argv[])
     int               resind;
 
     gmx_bool          bReadPDB;
-    atom_id          *index;
+    int              *index;
     int               isize;
     char             *grpnames;
 
     real              bfac, pdb_bfac, *Uaver;
     double          **U, *xav;
-    atom_id           aid;
+    int               aid;
     rvec             *rmsd_x = NULL;
     double           *rmsf, invcount, totmass;
     int               d;
index eb1d867f3e3031081a02db2952d00e6028df0398..f30805be6b568e87421c7318aafdd5643bc5fdbf 100644 (file)
@@ -85,7 +85,7 @@ int gmx_rotacf(int argc, char *argv[])
 
     t_trxstatus      *status;
     int               isize;
-    atom_id          *index;
+    int              *index;
     char             *grpname;
     rvec             *x, *x_s;
     matrix            box;
index 4982dedab703ca6ccb5e8db77b7df28ef01168a0..3a4a3df7699e1c08223be8adef17c90fa596e8f7 100644 (file)
@@ -226,7 +226,7 @@ int gmx_rotmat(int argc, char *argv[])
     char             *grpname;
     int               gnx;
     gmx_rmpbc_t       gpbc = NULL;
-    atom_id          *index;
+    int              *index;
     gmx_output_env_t *oenv;
     real             *w_rls;
     const char       *leg[]  = { "xx", "xy", "xz", "yx", "yy", "yz", "zx", "zy", "zz" };
index 6ffec91667f3a31e24d7de2d392e83eeaad22deb..73e6306f2e7166e01561cc035a3f6a08c2f9d9a7 100644 (file)
@@ -131,7 +131,7 @@ int gmx_sans(int argc, char *argv[])
     int                                   natoms;
     real                                  t;
     char                                **grpname = NULL;
-    atom_id                              *index   = NULL;
+    int                                  *index   = NULL;
     int                                   isize;
     int                                   i;
     char                                 *hdr            = NULL;
index 6c3d478a262386e9337f1be37951b1a65fc9346d..30cb387ac5a9a8b56719581146e47460f4a19e43 100644 (file)
@@ -56,7 +56,7 @@
 #include "gromacs/utility/smalloc.h"
 
 static void calc_com_pbc(int nrefat, t_topology *top, rvec x[], t_pbc *pbc,
-                         atom_id index[], rvec xref, gmx_bool bPBC)
+                         int index[], rvec xref, gmx_bool bPBC)
 {
     const real tol = 1e-4;
     gmx_bool   bChanged;
@@ -127,7 +127,7 @@ int gmx_sorient(int argc, char *argv[])
     real             *histi1, *histi2, invbw, invrbw;
     double            sum1, sum2;
     int              *isize, nrefgrp, nrefat;
-    atom_id         **index;
+    int             **index;
     char            **grpname;
     real              inp, outp, nav, normfac, rmin2, rmax2, rcut, rcut2, r2, r;
     real              c1, c2;
index 07819ca5bfbf949e46fdf9461ea32a137c4188ba..ba4899e83ead484d4ef948678d835382ff84362e 100644 (file)
@@ -141,7 +141,7 @@ int gmx_spatial(int argc, char *argv[])
     t_atoms          *atoms;
     int               natoms;
     char             *grpnm, *grpnmp;
-    atom_id          *index, *indexp;
+    int              *index, *indexp;
     int               i, nidx, nidxp;
     int               v;
     int               j, k;
index 6e422d51943a1ebc9ad54dfbe961329da45a72d8..28c09e061f62e2b6fc135ec0e10b7b10f7b4a528 100644 (file)
@@ -57,7 +57,7 @@
 #include "gromacs/utility/smalloc.h"
 
 static void calc_com_pbc(int nrefat, t_topology *top, rvec x[], t_pbc *pbc,
-                         atom_id index[], rvec xref, int ePBC)
+                         int index[], rvec xref, int ePBC)
 {
     const real tol = 1e-4;
     gmx_bool   bChanged;
@@ -159,7 +159,7 @@ int gmx_spol(int argc, char *argv[])
 
     FILE        *fp;
     int         *isize, nrefgrp;
-    atom_id    **index, *molindex;
+    int        **index, *molindex;
     char       **grpname;
     real         rmin2, rmax2, rcut, rcut2, rdx2 = 0, rtry2, qav, q, dip2, invbw;
     int          nbin, i, m, mol, a0, a1, a, d;
index 52806340c8377ad35c1ab71fc35f6458d0057276..7919a52903af3d845141b5164dfaeefee01ab90a 100644 (file)
@@ -310,7 +310,7 @@ int gmx_tcaf(int argc, char *argv[])
     matrix            box;
     gmx_bool          bTop;
     int               gnx;
-    atom_id          *index, *atndx = NULL, at;
+    int              *index, *atndx = NULL, at;
     char             *grpname;
     char              title[256];
     real              t0, t1, dt, m, mtot, sysmass, rho, sx, cx;
index 44eaeeb96c8ee9a3f3bcb233151f12b508900fdc..d7e93070b612e09cb700440bd504e4afeceea679 100644 (file)
@@ -63,7 +63,7 @@
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
 
-static void low_print_data(FILE *fp, real time, rvec x[], int n, atom_id *index,
+static void low_print_data(FILE *fp, real time, rvec x[], int n, int *index,
                            gmx_bool bDim[], const char *sffmt)
 {
     int i, ii, d;
@@ -95,7 +95,7 @@ static void low_print_data(FILE *fp, real time, rvec x[], int n, atom_id *index,
 }
 
 static void average_data(rvec x[], rvec xav[], real *mass,
-                         int ngrps, int isize[], atom_id **index)
+                         int ngrps, int isize[], int **index)
 {
     int    g, i, ind, d;
     real   m;
@@ -147,7 +147,7 @@ static void average_data(rvec x[], rvec xav[], real *mass,
 }
 
 static void print_data(FILE *fp, real time, rvec x[], real *mass, gmx_bool bCom,
-                       int ngrps, int isize[], atom_id **index, gmx_bool bDim[],
+                       int ngrps, int isize[], int **index, gmx_bool bDim[],
                        const char *sffmt)
 {
     static rvec *xav = NULL;
@@ -168,7 +168,7 @@ static void print_data(FILE *fp, real time, rvec x[], real *mass, gmx_bool bCom,
 }
 
 static void write_trx_x(t_trxstatus *status, t_trxframe *fr, real *mass, gmx_bool bCom,
-                        int ngrps, int isize[], atom_id **index)
+                        int ngrps, int isize[], int **index)
 {
     static rvec    *xav   = NULL;
     static t_atoms *atoms = NULL;
@@ -208,7 +208,7 @@ static void write_trx_x(t_trxstatus *status, t_trxframe *fr, real *mass, gmx_boo
     }
 }
 
-static void make_legend(FILE *fp, int ngrps, int isize, atom_id index[],
+static void make_legend(FILE *fp, int ngrps, int isize, int index[],
                         char **name, gmx_bool bCom, gmx_bool bMol, gmx_bool bDim[],
                         const gmx_output_env_t *oenv)
 {
@@ -259,7 +259,7 @@ static void make_legend(FILE *fp, int ngrps, int isize, atom_id index[],
     sfree(leg);
 }
 
-static real ekrot(rvec x[], rvec v[], real mass[], int isize, atom_id index[])
+static real ekrot(rvec x[], rvec v[], real mass[], int isize, int index[])
 {
     static real **TCM = NULL, **L;
     double        tm, m0, lxx, lxy, lxz, lyy, lyz, lzz, ekrot;
@@ -351,7 +351,7 @@ static real ekrot(rvec x[], rvec v[], real mass[], int isize, atom_id index[])
     return ekrot;
 }
 
-static real ektrans(rvec v[], real mass[], int isize, atom_id index[])
+static real ektrans(rvec v[], real mass[], int isize, int index[])
 {
     dvec   mvcom;
     double mtot;
@@ -372,7 +372,7 @@ static real ektrans(rvec v[], real mass[], int isize, atom_id index[])
     return dnorm2(mvcom)/(mtot*2);
 }
 
-static real temp(rvec v[], real mass[], int isize, atom_id index[])
+static real temp(rvec v[], real mass[], int isize, int index[])
 {
     double ekin2;
     int    i, j;
@@ -420,14 +420,14 @@ static void remove_jump(matrix box, int natoms, rvec xp[], rvec x[])
 
 static void write_pdb_bfac(const char *fname, const char *xname,
                            const char *title, t_atoms *atoms, int ePBC, matrix box,
-                           int isize, atom_id *index, int nfr_x, rvec *x,
+                           int isize, int *index, int nfr_x, rvec *x,
                            int nfr_v, rvec *sum,
                            gmx_bool bDim[], real scale_factor,
                            const gmx_output_env_t *oenv)
 {
     FILE       *fp;
     real        max, len2, scale;
-    atom_id     maxi;
+    int         maxi;
     int         i, m, onedim;
 
     if ((nfr_x == 0) || (nfr_v == 0))
@@ -538,7 +538,7 @@ static void write_pdb_bfac(const char *fname, const char *xname,
     }
 }
 
-static void update_histo(int gnx, atom_id index[], rvec v[],
+static void update_histo(int gnx, int index[], rvec v[],
                          int *nhisto, int **histo, real binwidth)
 {
     int  i, m, in, nnn;
@@ -674,8 +674,8 @@ int gmx_traj(int argc, char *argv[])
     int               nr_xfr, nr_vfr, nr_ffr;
     char            **grpname;
     int              *isize0, *isize;
-    atom_id         **index0, **index;
-    atom_id          *atndx;
+    int             **index0, **index;
+    int              *atndx;
     t_block          *mols;
     gmx_bool          bTop, bOX, bOXT, bOV, bOF, bOB, bOT, bEKT, bEKR, bCV, bCF;
     gmx_bool          bDim[4], bDum[4], bVD;
index a7a6dfbe42024cb885bf2205f05a860508080ff7..0ce3ca9c65669393b4ce7e9eb8f7e99039b169f7 100644 (file)
@@ -70,7 +70,7 @@
 #define FLAGS (TRX_READ_X | TRX_READ_V | TRX_READ_F)
 
 static void scan_trj_files(char **fnms, int nfiles, real *readtime,
-                           real *timestep, atom_id imax,
+                           real *timestep, int imax,
                            const gmx_output_env_t *oenv)
 {
     /* Check start time of all files */
@@ -103,7 +103,7 @@ static void scan_trj_files(char **fnms, int nfiles, real *readtime,
         }
         else
         {
-            if (imax == NO_ATID)
+            if (imax == -1)
             {
                 if (natoms != fr.natoms)
                 {
@@ -309,7 +309,7 @@ static void edit_files(char **fnms, int nfiles, real *readtime, real *timestep,
 
 static void do_demux(int nset, char *fnms[], char *fnms_out[], int nval,
                      real **value, real *time, real dt_remd, int isize,
-                     atom_id index[], real dt, const gmx_output_env_t *oenv)
+                     int index[], real dt, const gmx_output_env_t *oenv)
 {
     int           i, j, k, natoms, nnn;
     t_trxstatus **fp_in, **fp_out;
@@ -486,7 +486,7 @@ int gmx_trjcat(int argc, char *argv[])
     gmx_bool          lastTimeSet = FALSE;
     real              last_frame_time, searchtime;
     int               isize = 0, j;
-    atom_id          *index = NULL, imax;
+    int              *index = NULL, imax;
     char             *grpname;
     real            **val = NULL, *t = NULL, dt_remd;
     int               n, nset, ftpout = -1, prevEndStep = 0, filetype;
@@ -512,7 +512,7 @@ int gmx_trjcat(int argc, char *argv[])
     bDeMux = ftp2bSet(efXVG, NFILE, fnm);
     bSort  = bSort && !bDeMux;
 
-    imax = NO_ATID;
+    imax = -1;
     if (bIndex)
     {
         printf("Select group for output\n");
index 2aa1c6640fb42079f388827459d2e3a6fa752d1f..e8ee35d186f7d96d1b165f25df6a6ff91e16ab9b 100644 (file)
@@ -76,14 +76,14 @@ enum {
 
 
 static void calc_pbc_cluster(int ecenter, int nrefat, t_topology *top, int ePBC,
-                             rvec x[], atom_id index[], matrix box)
+                             rvec x[], int index[], matrix box)
 {
     int       m, i, j, j0, j1, jj, ai, aj;
     int       imin, jmin;
     real      fac, min_dist2;
     rvec      dx, xtest, box_center;
     int       nmol, imol_center;
-    atom_id  *molind;
+    int      *molind;
     gmx_bool *bMol, *bTmp;
     rvec     *m_com, *m_shift;
     t_pbc     pbc;
@@ -268,7 +268,7 @@ static void put_molecule_com_in_box(int unitcell_enum, int ecenter,
                                     int natoms, t_atom atom[],
                                     int ePBC, matrix box, rvec x[])
 {
-    atom_id i, j;
+    int     i, j;
     int     d;
     rvec    com, new_com, shift, box_center;
     real    m;
@@ -333,7 +333,7 @@ static void put_residue_com_in_box(int unitcell_enum, int ecenter,
                                    int natoms, t_atom atom[],
                                    int ePBC, matrix box, rvec x[])
 {
-    atom_id          i, j, res_start, res_end;
+    int              i, j, res_start, res_end;
     int              d, presnr;
     real             m;
     double           mtot;
@@ -402,7 +402,7 @@ static void put_residue_com_in_box(int unitcell_enum, int ecenter,
     }
 }
 
-static void center_x(int ecenter, rvec x[], matrix box, int n, int nc, atom_id ci[])
+static void center_x(int ecenter, rvec x[], matrix box, int n, int nc, int ci[])
 {
     int  i, m, ai;
     rvec cmin, cmax, box_center, dx;
@@ -875,12 +875,12 @@ int gmx_trjconv(int argc, char *argv[])
     int               ePBC  = -1;
     t_atoms          *atoms = NULL, useatoms;
     matrix            top_box;
-    atom_id          *index, *cindex;
+    int              *index, *cindex;
     char             *grpnm;
     int              *frindex, nrfri;
     char             *frname;
     int               ifit, my_clust = -1;
-    atom_id          *ind_fit;
+    int              *ind_fit;
     char             *gn_fit;
     t_cluster_ndx    *clust           = NULL;
     t_trxstatus     **clust_status    = NULL;
@@ -1128,7 +1128,7 @@ int gmx_trjconv(int argc, char *argv[])
         if (opt2bSet("-fr", NFILE, fnm))
         {
             printf("Select groups of frame number indices:\n");
-            rd_index(opt2fn("-fr", NFILE, fnm), 1, &nrfri, (atom_id **)&frindex, &frname);
+            rd_index(opt2fn("-fr", NFILE, fnm), 1, &nrfri, (int **)&frindex, &frname);
             if (debug)
             {
                 for (i = 0; i < nrfri; i++)
@@ -1404,7 +1404,7 @@ int gmx_trjconv(int argc, char *argv[])
                         my_clust = clust->inv_clust[frame];
                     }
                     if ((my_clust < 0) || (my_clust >= clust->clust->nr) ||
-                        (my_clust == NO_ATID))
+                        (my_clust == -1))
                     {
                         my_clust = -1;
                     }
index 69d9ce0f4690196611d0617bb5537149249ac79a..c9767a9ece3a6ee2b4a039606bdfc508744ad117 100644 (file)
@@ -58,7 +58,7 @@
 #include "gromacs/utility/smalloc.h"
 
 typedef struct {
-    atom_id i;
+    int     i;
     real    d2;
 } t_order;
 
@@ -137,7 +137,7 @@ int gmx_trjorder(int argc, char *argv[])
     int               natoms, nwat, ncut;
     char            **grpname;
     int               i, j, d, *isize, isize_ref = 0, isize_sol;
-    atom_id           sa, sr, *swi, **index, *ind_ref = NULL, *ind_sol;
+    int               sa, sr, *swi, **index, *ind_ref = NULL, *ind_sol;
     gmx_output_env_t *oenv;
     t_filenm          fnm[] = {
         { efTRX, "-f", NULL, ffREAD  },
index 247cee9ae1d33896a22571dba0b6a10983801d72..9eb5fc219186989d5a2898a9381c38bccd9c9844 100644 (file)
@@ -136,7 +136,7 @@ int gmx_vanhove(int argc, char *argv[])
     rvec             *xtop, *x, **sx;
     int               isize, nalloc, nallocn;
     t_trxstatus      *status;
-    atom_id          *index;
+    int              *index;
     char             *grpname;
     int               nfr, f, ff, i, m, mat_nx = 0, nbin = 0, bin, mbin, fbin;
     real             *time, t, invbin = 0, rmax2 = 0, rint2 = 0, d2;
index 5ab71a4bef22ee56a43227a4c718b96634492b58..7fcc9f31b360eaa09adecc04c99bb8d848bb4749 100644 (file)
@@ -61,7 +61,7 @@
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
 
-static void index_atom2mol(int *n, atom_id *index, t_block *mols)
+static void index_atom2mol(int *n, int *index, t_block *mols)
 {
     int nat, i, nmol, mol, j;
 
@@ -207,7 +207,7 @@ int gmx_velacc(int argc, char *argv[])
     matrix          box;
     gmx_bool        bTPS = FALSE, bTop = FALSE;
     int             gnx;
-    atom_id        *index;
+    int            *index;
     char           *grpname;
     /* t0, t1 are the beginning and end time respectively.
      * dt is the time step, mass is temp variable for atomic mass.
index b68ecd34899edb11726074e6a375ef2b2c3baa1b..8ae96075f9a033ff00cc6b4157755a8f299ef373 100644 (file)
@@ -158,7 +158,7 @@ void read_ang_dih(const char *trj_fn,
                   gmx_bool bAngles, gmx_bool bSaveAll, gmx_bool bRb, gmx_bool bPBC,
                   int maxangstat, int angstat[],
                   int *nframes, real **time,
-                  int isize, atom_id index[],
+                  int isize, int index[],
                   real **trans_frac,
                   real **aver_angle,
                   real *dih[],
index ac184f76df77f4ddc9e9b15fbb416f25c232e0af..40890a4ad389aca1735ea8b8710eb26052cd4c69 100644 (file)
@@ -96,7 +96,7 @@ real ellipticity(int nres, t_bb bb[])
     return ell;
 }
 
-real ahx_len(int gnx, atom_id index[], rvec x[])
+real ahx_len(int gnx, int index[], rvec x[])
 /* Assume we have a list of Calpha atoms only! */
 {
     rvec dx;
@@ -106,7 +106,7 @@ real ahx_len(int gnx, atom_id index[], rvec x[])
     return norm(dx);
 }
 
-real radius(FILE *fp, int nca, atom_id ca_index[], rvec x[])
+real radius(FILE *fp, int nca, int ca_index[], rvec x[])
 /* Assume we have all the backbone */
 {
     real dl2, dlt;
@@ -149,7 +149,7 @@ static real rot(rvec x1, rvec x2)
     return dphi;
 }
 
-real twist(int nca, atom_id caindex[], rvec x[])
+real twist(int nca, int caindex[], rvec x[])
 {
     real pt, dphi;
     int  i, a0, a1;
@@ -172,7 +172,7 @@ real twist(int nca, atom_id caindex[], rvec x[])
     return (pt/(nca-1));
 }
 
-real ca_phi(int gnx, atom_id index[], rvec x[])
+real ca_phi(int gnx, int index[], rvec x[])
 /* Assume we have a list of Calpha atoms only! */
 {
     real phi, phitot;
@@ -202,7 +202,7 @@ real ca_phi(int gnx, atom_id index[], rvec x[])
     return (phitot/(gnx-4.0));
 }
 
-real dip(int nbb, atom_id bbind[], rvec x[], t_atom atom[])
+real dip(int nbb, int bbind[], rvec x[], t_atom atom[])
 {
     int  i, m, ai;
     rvec dipje;
@@ -221,7 +221,7 @@ real dip(int nbb, atom_id bbind[], rvec x[], t_atom atom[])
     return norm(dipje);
 }
 
-real rise(int gnx, atom_id index[], rvec x[])
+real rise(int gnx, int index[], rvec x[])
 /* Assume we have a list of Calpha atoms only! */
 {
     real z, z0, ztot;
@@ -325,7 +325,7 @@ static void set_ahcity(int nbb, t_bb bb[])
 }
 
 t_bb *mkbbind(const char *fn, int *nres, int *nbb, int res0,
-              int *nall, atom_id **index,
+              int *nall, int **index,
               char ***atomname, t_atom atom[],
               t_resinfo *resinfo)
 {
@@ -555,8 +555,8 @@ static void check_ahx(int nres, t_bb bb[],
     *hend   = h1sav;
 }
 
-void do_start_end(int nres, t_bb bb[], int *nbb, atom_id bbindex[],
-                  int *nca, atom_id caindex[],
+void do_start_end(int nres, t_bb bb[], int *nbb, int bbindex[],
+                  int *nca, int caindex[],
                   gmx_bool bRange, int rStart, int rEnd)
 {
     int    i, j, hstart = 0, hend = 0;
index 65fc31b87e03a7ba9a729fcd956ba1d0ef17f0e4..dc757ea98fcb20e4c0a5ffc7af2d4f472380aa05 100644 (file)
@@ -77,15 +77,15 @@ enum {
     efhAHX,  efhNR
 };
 
-extern real ahx_len(int gnx, atom_id index[], rvec x[]);
+extern real ahx_len(int gnx, int index[], rvec x[]);
 /* Assume we have a list of Calpha atoms only! */
 
 extern real ellipticity(int nres, t_bb bb[]);
 
-extern real radius(FILE *fp, int nca, atom_id ca_index[], rvec x[]);
+extern real radius(FILE *fp, int nca, int ca_index[], rvec x[]);
 /* Assume we have calphas */
 
-extern real twist(int nca, atom_id caindex[], rvec x[]);
+extern real twist(int nca, int caindex[], rvec x[]);
 /* Calculate the twist of the helix */
 
 extern real pprms(FILE *fp, int nbb, t_bb bb[]);
@@ -93,12 +93,12 @@ extern real pprms(FILE *fp, int nbb, t_bb bb[]);
  * and the distance per residue
  */
 
-extern real ca_phi(int gnx, atom_id index[], rvec x[]);
+extern real ca_phi(int gnx, int index[], rvec x[]);
 /* Assume we have a list of Calpha atoms only! */
 
-extern real dip(int nbb, atom_id bbind[], rvec x[], t_atom atom[]);
+extern real dip(int nbb, int bbind[], rvec x[], t_atom atom[]);
 
-extern real rise(int gnx, atom_id index[], rvec x[]);
+extern real rise(int gnx, int index[], rvec x[]);
 /* Assume we have a list of Calpha atoms only! */
 
 extern void av_hblen(FILE *fp3, FILE *fp3a,
@@ -110,12 +110,12 @@ extern void av_phipsi(FILE *fphi, FILE *fpsi, FILE *fphi2, FILE *fpsi2,
                       real t, int nres, t_bb bb[]);
 
 extern t_bb *mkbbind(const char *fn, int *nres, int *nbb, int res0,
-                     int *nall, atom_id **index,
+                     int *nall, int **index,
                      char ***atomname, t_atom atom[],
                      t_resinfo *resinfo);
 
 extern void do_start_end(int nres, t_bb bb[], int *nbb,
-                         atom_id bbindex[], int *nca, atom_id caindex[],
+                         int bbindex[], int *nca, int caindex[],
                          gmx_bool bRange, int rStart, int rEnd);
 
 extern void calc_hxprops(int nres, t_bb bb[], rvec x[]);
index 6c883f7f2c777ac32d2a2ccca3c2c35da4ac0ac8..b3b00edb69e7eca80e805629123ea26e56c4e25e 100644 (file)
@@ -55,7 +55,7 @@ typedef struct {
 } t_phipsi;
 
 typedef struct {
-    atom_id ai[4];
+    int     ai[4];
     int     mult;
     real    phi0;
     real    ang;
index 6da3be50cecfa97a2dc6fd4bd8fe7fa6fd059c55..5ece0fe2295ab5fd8c55085a6c5058c891840d65 100644 (file)
@@ -44,7 +44,6 @@
 #include "gromacs/fileio/strdb.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/random/random.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
@@ -193,7 +192,7 @@ gmx_radial_distribution_histogram_t *calc_radial_distribution_histogram (
         gmx_sans_t  *gsans,
         rvec        *x,
         matrix       box,
-        atom_id     *index,
+        int         *index,
         int          isize,
         double       binwidth,
         gmx_bool     bMC,
index ce8686023fbbf5d6445d5b6cd8682000ff1c2466..258d9c1e5779392a70bf81058d51cf93eaf64575 100644 (file)
@@ -37,7 +37,6 @@
 #define GMX_GMXANA_NSFACTOR_H
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 struct t_topology;
@@ -82,7 +81,7 @@ gmx_sans_t *gmx_sans_init(struct t_topology *top, gmx_neutron_atomic_structurefa
 gmx_radial_distribution_histogram_t *calc_radial_distribution_histogram  (gmx_sans_t  *gsans,
                                                                           rvec        *x,
                                                                           matrix       box,
-                                                                          atom_id     *index,
+                                                                          int         *index,
                                                                           int          isize,
                                                                           double       binwidth,
                                                                           gmx_bool     bMC,
index 5522dabe6f18430d3e8064e645322be4b333f2ba..8392ac5f7f82e642db17d9347a208f2ee186b6a1 100644 (file)
@@ -96,7 +96,7 @@ void t_trans(matrix trans, real d[], real **ev)
 }
 #endif
 
-void principal_comp(int n, atom_id index[], t_atom atom[], rvec x[],
+void principal_comp(int n, int index[], t_atom atom[], rvec x[],
                     matrix trans, rvec d)
 {
     int      i, j, ai, m, nrot;
@@ -197,7 +197,7 @@ void principal_comp(int n, atom_id index[], t_atom atom[], rvec x[],
     sfree(ev);
 }
 
-void rotate_atoms(int gnx, atom_id *index, rvec x[], matrix trans)
+void rotate_atoms(int gnx, int *index, rvec x[], matrix trans)
 {
     real   xt, yt, zt;
     int    i, ii;
@@ -214,7 +214,7 @@ void rotate_atoms(int gnx, atom_id *index, rvec x[], matrix trans)
     }
 }
 
-real calc_xcm(rvec x[], int gnx, atom_id *index, t_atom *atom, rvec xcm,
+real calc_xcm(rvec x[], int gnx, int *index, t_atom *atom, rvec xcm,
               gmx_bool bQ)
 {
     int  i, ii, m;
@@ -254,7 +254,7 @@ real calc_xcm(rvec x[], int gnx, atom_id *index, t_atom *atom, rvec xcm,
     return tm;
 }
 
-real sub_xcm(rvec x[], int gnx, atom_id *index, t_atom atom[], rvec xcm,
+real sub_xcm(rvec x[], int gnx, int *index, t_atom atom[], rvec xcm,
              gmx_bool bQ)
 {
     int  i, ii;
@@ -269,7 +269,7 @@ real sub_xcm(rvec x[], int gnx, atom_id *index, t_atom atom[], rvec xcm,
     return tm;
 }
 
-void add_xcm(rvec x[], int gnx, atom_id *index, rvec xcm)
+void add_xcm(rvec x[], int gnx, int *index, rvec xcm)
 {
     int  i, ii;
 
@@ -280,7 +280,7 @@ void add_xcm(rvec x[], int gnx, atom_id *index, rvec xcm)
     }
 }
 
-void orient_princ(t_atoms *atoms, int isize, atom_id *index,
+void orient_princ(t_atoms *atoms, int isize, int *index,
                   int natoms, rvec x[], rvec *v, rvec d)
 {
     int     i, m;
index e1178ad101c32aad6a0b4aca6599fcf4bd14258e..32ab524be952074dda85b83dcb2c4e10a2e77e35 100644 (file)
@@ -48,34 +48,34 @@ struct t_atoms;
 extern "C" {
 #endif
 
-void rotate_atoms(int gnx, atom_id index[], rvec x[], matrix trans);
+void rotate_atoms(int gnx, int index[], rvec x[], matrix trans);
 /* Rotate all atoms in index using matrix trans */
 
-void principal_comp(int n, atom_id index[], t_atom atom[], rvec x[],
+void principal_comp(int n, int index[], t_atom atom[], rvec x[],
                     matrix trans, rvec d);
 /* Calculate the principal components of atoms in index. Atoms are
  * mass weighted. It is assumed that the center of mass is in the origin!
  */
 
-void orient_princ(t_atoms *atoms, int isize, atom_id *index,
+void orient_princ(t_atoms *atoms, int isize, int *index,
                   int natoms, rvec x[], rvec *v, rvec d);
 /* rotates molecule to align principal axes with coordinate axes */
 
-real calc_xcm(rvec x[], int gnx, atom_id *index, t_atom *atom, rvec xcm,
+real calc_xcm(rvec x[], int gnx, int *index, t_atom *atom, rvec xcm,
               gmx_bool bQ);
 /* Calculate the center of mass of the atoms in index. if bQ then the atoms
  * will be charge weighted rather than mass weighted.
  * Returns the total mass/charge.
  */
 
-real sub_xcm(rvec x[], int gnx, atom_id *index, t_atom atom[], rvec xcm,
+real sub_xcm(rvec x[], int gnx, int *index, t_atom atom[], rvec xcm,
              gmx_bool bQ);
 /* Calc. the center of mass and subtract it from all coordinates.
  * Returns the original center of mass in xcm
  * Returns the total mass
  */
 
-void add_xcm(rvec x[], int gnx, atom_id *index, rvec xcm);
+void add_xcm(rvec x[], int gnx, int *index, rvec xcm);
 /* Increment all atoms in index with xcm */
 
 #ifdef __cplusplus
index 07330a56f2fdc921db15cc3ad2e30a8890b8bf94..f897f24ba5b88370a678d3fcd76a5b2f1b7d9b6b 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
@@ -333,7 +332,7 @@ extern gmx_structurefactors_t *gmx_structurefactors_init(const char *datfn)
 }
 
 
-extern void rearrange_atoms (reduced_atom_t * positions, t_trxframe *fr, atom_id * index,
+extern void rearrange_atoms (reduced_atom_t * positions, t_trxframe *fr, int * index,
                              int isize, t_topology * top, gmx_bool flag, gmx_structurefactors_t *gsf)
 /* given the group's index, return the (continuous) array of atoms */
 {
@@ -447,7 +446,7 @@ extern int do_scattering_intensity (const char* fnTPS, const char* fnNDX,
     int                     i, *isize, flags = TRX_READ_X, **index_atp;
     t_trxstatus            *status;
     char                  **grpname;
-    atom_id               **index;
+    int                   **index;
     t_topology              top;
     int                     ePBC;
     t_trxframe              fr;
index cb6affb57600adb945793d5c9f482878a1d613cb..eb11a7eb2d8768fce2f6aaef936b36335a1c62d7 100644 (file)
@@ -39,7 +39,6 @@
 
 #include "gromacs/math/gmxcomplex.h"
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 struct gmx_output_env_t;
@@ -74,7 +73,7 @@ double CMSF (gmx_structurefactors_t *gsf, int type, int nh, double lambda, doubl
 
 int return_atom_type (const char *name, gmx_structurefactors_t *gsf);
 
-void rearrange_atoms (reduced_atom_t * positions, struct t_trxframe *fr, atom_id * index,
+void rearrange_atoms (reduced_atom_t * positions, struct t_trxframe *fr, int * index,
                       int isize, struct t_topology * top, gmx_bool flag, gmx_structurefactors_t *gsf);
 
 int do_scattering_intensity (const char* fnTPS, const char* fnNDX,
index d8220b8257955659933d056c4b416ad6e45061f7..424c847944e33a4196d7f12460d101c80c5d714c 100644 (file)
@@ -151,7 +151,7 @@ void calc_cgcm(FILE gmx_unused *fplog, int cg0, int cg1, const t_block *cgs,
     int      icg, k, k0, k1, d;
     rvec     cg;
     real     nrcg, inv_ncg;
-    atom_id *cgindex;
+    int     *cgindex;
 
 #ifdef DEBUG
     fprintf(fplog, "Calculating centre of geometry for charge groups %d to %d\n",
@@ -197,7 +197,7 @@ void put_charge_groups_in_box(FILE gmx_unused *fplog, int cg0, int cg1,
     int      npbcdim, icg, k, k0, k1, d, e;
     rvec     cg;
     real     nrcg, inv_ncg;
-    atom_id *cgindex;
+    int     *cgindex;
     gmx_bool bTric;
 
     if (ePBC == epbcNONE)
index e3db85b67683fb9e8a2b2c450c983494340bf34c..0d6b8463686e4d16928f748e8d16d0ce557251da 100644 (file)
@@ -85,7 +85,7 @@ static void low_rotate_conf(int natom, rvec *x, real alfa, real beta, real gamma
     }
 }
 
-static void low_rotate_conf_indexed(int nindex, atom_id *index, rvec *x, real alfa, real beta, real gamma)
+static void low_rotate_conf_indexed(int nindex, int *index, rvec *x, real alfa, real beta, real gamma)
 {
     int  i;
     rvec x_old;
index fb075a7dc5ade450fc6393611f3ed69f207031ad..49939d1015f0e0def11079af9213a096a72b32dc 100644 (file)
@@ -267,7 +267,7 @@ void calc_disres_R_6(int nfa, const t_iatom forceatoms[], const t_iparams ip[],
                      const rvec x[], const t_pbc *pbc,
                      t_fcdata *fcd, history_t *hist)
 {
-    atom_id         ai, aj;
+    int             ai, aj;
     int             fa, res, pair;
     int             type, npair, np;
     rvec            dx;
@@ -377,7 +377,7 @@ real ta_disres(int nfa, const t_iatom forceatoms[], const t_iparams ip[],
     const real      sixth       = 1.0/6.0;
     const real      seven_three = 7.0/3.0;
 
-    atom_id         ai, aj;
+    int             ai, aj;
     int             fa, res, npair, p, pair, ki = CENTRAL, m;
     int             type;
     rvec            dx;
index a249021710966de953aa9f7b0ebfe6fe9753bda8..41e73cacf0f4cd7e86fe7e342b1caa8f51e1a2ce 100644 (file)
@@ -615,7 +615,7 @@ real orires(int nfa, const t_iatom forceatoms[], const t_iparams ip[],
             const t_mdatoms gmx_unused *md, t_fcdata *fcd,
             int gmx_unused *global_atom_index)
 {
-    atom_id             ai, aj;
+    int                 ai, aj;
     int                 fa, d, i, type, ex, power, ki = CENTRAL;
     ivec                dt;
     real                r2, invr, invr2, fc, smooth_fc, dev, devins, pfac;
index e8ace961c365ad0776d0db1a147e52ca7665dd8c..dd8586a89c06b630104d1c87b477d606d41ac3c5 100644 (file)
@@ -49,7 +49,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
-static void clear_atom_list(int i0, atom_id a[])
+static void clear_atom_list(int i0, int a[])
 {
     int i;
 
index b86b225d27624cada96dc6d55e751921119d831f..543864f88b70de2c6373c432c13a5a10383305d7 100644 (file)
@@ -517,7 +517,7 @@ static int enter_params(gmx_ffparams_t *ffparams, t_functype ftype,
 }
 
 static void append_interaction(t_ilist *ilist,
-                               int type, int nral, atom_id a[MAXATOMLIST])
+                               int type, int nral, int a[MAXATOMLIST])
 {
     int i, where1;
 
index 941bd948347ecbf40cfa78166d6f263578d01214..4aabeb2119bcf8bb5f9a9cfc13f697f0c40524be 100644 (file)
@@ -276,7 +276,7 @@ static void cpparam(t_param *dest, t_param *src)
     }
 }
 
-static void set_p(t_param *p, atom_id ai[4], real *c, char *s)
+static void set_p(t_param *p, int ai[4], real *c, char *s)
 {
     int j;
 
@@ -304,12 +304,7 @@ static int int_comp(const void *a, const void *b)
     return (*(int *)a) - (*(int *)b);
 }
 
-static int atom_id_comp(const void *a, const void *b)
-{
-    return (*(atom_id *)a) - (*(atom_id *)b);
-}
-
-static int eq_imp(atom_id a1[], atom_id a2[])
+static int eq_imp(int a1[], int a2[])
 {
     int b1[4], b2[4];
     int j;
@@ -378,7 +373,7 @@ static void sort_id(int nr, t_param ps[])
     }
 }
 
-static int n_hydro(atom_id a[], char ***atomname)
+static int n_hydro(int a[], char ***atomname)
 {
     int  i, nh = 0;
     char c0, c1, *aname;
@@ -516,7 +511,7 @@ static int get_impropers(t_atoms *atoms, t_hackblock hb[], t_param **improper,
 {
     t_rbondeds   *impropers;
     int           nimproper, i, j, k, start, ninc, nalloc;
-    atom_id       ai[MAXATOMLIST];
+    int           ai[MAXATOMLIST];
     gmx_bool      bStop;
 
     ninc   = 500;
@@ -539,7 +534,7 @@ static int get_impropers(t_atoms *atoms, t_hackblock hb[], t_param **improper,
                     ai[k] = search_atom(impropers->b[j].a[k], start,
                                         atoms,
                                         "improper", bAllowMissing);
-                    if (ai[k] == NO_ATID)
+                    if (ai[k] == -1)
                     {
                         bStop = TRUE;
                     }
@@ -599,7 +594,7 @@ gmx_bool is_hydro(t_atoms *atoms, int ai)
 }
 
 static void get_atomnames_min(int n, char **anm,
-                              int resind, t_atoms *atoms, atom_id *a)
+                              int resind, t_atoms *atoms, int *a)
 {
     int m;
 
@@ -626,7 +621,7 @@ static void gen_excls(t_atoms *atoms, t_excls *excls, t_hackblock hb[],
                       gmx_bool bAllowMissing)
 {
     int         r;
-    atom_id     a, astart, i1, i2, itmp;
+    int         a, astart, i1, i2, itmp;
     t_rbondeds *hbexcl;
     int         e;
     char       *anm;
@@ -647,7 +642,7 @@ static void gen_excls(t_atoms *atoms, t_excls *excls, t_hackblock hb[],
                 anm = hbexcl->b[e].a[1];
                 i2  = search_atom(anm, astart, atoms,
                                   "exclusion", bAllowMissing);
-                if (i1 != NO_ATID && i2 != NO_ATID)
+                if (i1 != -1 && i2 != -1)
                 {
                     if (i1 > i2)
                     {
@@ -669,7 +664,7 @@ static void gen_excls(t_atoms *atoms, t_excls *excls, t_hackblock hb[],
     {
         if (excls[a].nr > 1)
         {
-            qsort(excls[a].e, excls[a].nr, (size_t)sizeof(atom_id), atom_id_comp);
+            qsort(excls[a].e, excls[a].nr, (size_t)sizeof(int), int_comp);
         }
     }
 }
@@ -1080,7 +1075,7 @@ void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[],
                         res++;
                     }
                     ang[nang].a[k] = search_res_atom(p, res, atoms, "angle", TRUE);
-                    bFound         = (ang[nang].a[k] != NO_ATID);
+                    bFound         = (ang[nang].a[k] != -1);
                 }
                 ang[nang].c0() = NOTSET;
                 ang[nang].c1() = NOTSET;
@@ -1125,7 +1120,7 @@ void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[],
                         res++;
                     }
                     dih[ndih].a[k] = search_res_atom(p, res, atoms, "dihedral", TRUE);
-                    bFound         = (dih[ndih].a[k] != NO_ATID);
+                    bFound         = (dih[ndih].a[k] != -1);
                 }
                 for (m = 0; m < MAXFORCEPARAM; m++)
                 {
index 6bc3e14eb6287f0a4d67c0d532a0882a1710109a..66896544647750415e605251834703ca71d8c495 100644 (file)
@@ -63,8 +63,8 @@ static void copy_atom(t_atoms *atoms1, int a1, t_atoms *atoms2, int a2)
     *atoms2->atomname[a2] = gmx_strdup(*atoms1->atomname[a1]);
 }
 
-static atom_id pdbasearch_atom(const char *name, int resind, t_atoms *pdba,
-                               const char *searchtype, gmx_bool bAllowMissing)
+static int pdbasearch_atom(const char *name, int resind, t_atoms *pdba,
+                           const char *searchtype, gmx_bool bAllowMissing)
 {
     int  i;
 
index 0e5f68d77d1e7205a2693b366014b76d26a33fd4..913afe9233f84ec0d839aab8ae6cc8580c45642f 100644 (file)
@@ -38,7 +38,6 @@
 #ifndef GMX_GMXPREPROCESS_GROMPP_IMPL_H
 #define GMX_GMXPREPROCESS_GROMPP_IMPL_H
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/atoms.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/idef.h"
@@ -59,16 +58,16 @@ typedef struct {
  */
 
 typedef struct {
-    atom_id    a[MAXATOMLIST];   /* The atom list (eg. bonds: particle */
+    int        a[MAXATOMLIST];   /* The atom list (eg. bonds: particle */
     /* i = a[0] (ai), j = a[1] (aj))   */
     real       c[MAXFORCEPARAM]; /* Force parameters (eg. b0 = c[0])   */
     char       s[MAXSLEN];       /* A string (instead of parameters),    *
                                   * read from the .rtp file in pdb2gmx   */
-    atom_id   &ai() { return a[0]; }
-    atom_id   &aj() { return a[1]; }
-    atom_id   &ak() { return a[2]; }
-    atom_id   &al() { return a[3]; }
-    atom_id   &am() { return a[4]; }
+    int   &ai() { return a[0]; }
+    int   &aj() { return a[1]; }
+    int   &ak() { return a[2]; }
+    int   &al() { return a[3]; }
+    int   &am() { return a[4]; }
 
     real      &c0() { return c[0]; }
     real      &c1() { return c[1]; }
@@ -93,8 +92,8 @@ typedef struct {
 } t_params;
 
 typedef struct {
-    int            nr;          /* The number of exclusions             */
-    atom_id       *e;           /* The excluded atoms                   */
+    int            nr;      /* The number of exclusions             */
+    int           *e;       /* The excluded atoms                   */
 } t_excls;
 
 typedef struct {
index 67b6b625798674d4f6512f993fcad76300e30b6e..e4577fcee20079b5e8c8ea6c58abe2b4ae33e7ed 100644 (file)
@@ -111,7 +111,7 @@ typedef struct {
     gmx_bool    bAlreadyPresent;
     gmx_bool    bXSet;
     rvec        newx; /* calculated new position    */
-    atom_id     newi; /* new atom index number (after additions) */
+    int         newi; /* new atom index number (after additions) */
     char*      &ai() { return a[0]; }
     char*      &aj() { return a[1]; }
     char*      &ak() { return a[2]; }
index dfee31e6d5526bdbb8c3af501c83cf560bb5da13..930dab640b09acee2f10ea62a770aad92bcaba37 100644 (file)
@@ -713,7 +713,7 @@ static void sort_pdbatoms(t_restp restp[],
     int          i, j;
     t_restp     *rptr;
     t_pdbindex  *pdbi;
-    atom_id     *a;
+    int         *a;
     char        *atomnm;
 
     pdba   = *pdbaptr;
index 2ad12deca84601a859271a0bbda56b0d60d7c1e7..4a66a62ba29eb874e3cf037d952ea4e18487bb03 100644 (file)
@@ -738,7 +738,7 @@ static void do_ssbonds(t_params *ps, t_atoms *atoms,
                        int nssbonds, t_ssbond *ssbonds, gmx_bool bAllowMissing)
 {
     int     i, ri, rj;
-    atom_id ai, aj;
+    int     ai, aj;
 
     for (i = 0; (i < nssbonds); i++)
     {
@@ -748,7 +748,7 @@ static void do_ssbonds(t_params *ps, t_atoms *atoms,
                              "special bond", bAllowMissing);
         aj = search_res_atom(ssbonds[i].a2, rj, atoms,
                              "special bond", bAllowMissing);
-        if ((ai == NO_ATID) || (aj == NO_ATID))
+        if ((ai == -1) || (aj == -1))
         {
             gmx_fatal(FARGS, "Trying to make impossible special bond (%s-%s)!",
                       ssbonds[i].a1, ssbonds[i].a2);
@@ -763,7 +763,7 @@ static void at2bonds(t_params *psb, t_hackblock *hb,
                      real long_bond_dist, real short_bond_dist)
 {
     int         resind, i, j, k;
-    atom_id     ai, aj;
+    int         ai, aj;
     real        dist2, long_bond_dist2, short_bond_dist2;
     const char *ptr;
 
@@ -794,7 +794,7 @@ static void at2bonds(t_params *psb, t_hackblock *hb,
                              ptr, TRUE);
             aj = search_atom(hb[resind].rb[ebtsBONDS].b[j].a[1], i, atoms,
                              ptr, TRUE);
-            if (ai != NO_ATID && aj != NO_ATID)
+            if (ai != -1 && aj != -1)
             {
                 dist2 = distance2(x[ai], x[aj]);
                 if (dist2 > long_bond_dist2)
@@ -866,7 +866,7 @@ static int pcompar(const void *a, const void *b)
 static void clean_bonds(t_params *ps)
 {
     int     i, j;
-    atom_id a;
+    int     a;
 
     if (ps->nr > 0)
     {
@@ -1417,7 +1417,7 @@ static void gen_cmap(t_params *psb, t_restp *restp, t_atoms *atoms)
     t_resinfo  *resinfo = atoms->resinfo;
     int         nres    = atoms->nres;
     gmx_bool    bAddCMAP;
-    atom_id     cmap_atomid[NUM_CMAP_ATOMS];
+    int         cmap_atomid[NUM_CMAP_ATOMS];
     int         cmap_chainnum = -1, this_residue_index;
 
     if (debug)
@@ -1463,11 +1463,11 @@ static void gen_cmap(t_params *psb, t_restp *restp, t_atoms *atoms)
 
                 cmap_atomid[k] = search_atom(pname,
                                              i, atoms, ptr, TRUE);
-                bAddCMAP = bAddCMAP && (cmap_atomid[k] != NO_ATID);
+                bAddCMAP = bAddCMAP && (cmap_atomid[k] != -1);
                 if (!bAddCMAP)
                 {
                     /* This break is necessary, because cmap_atomid[k]
-                     * == NO_ATID cannot be safely used as an index
+                     * == -1 cannot be safely used as an index
                      * into the atom array. */
                     break;
                 }
index e6771ead782be61666d28677312b0b29c344430a..7a187208a2e3e2da79762d2cbf3af7bd2d4d2fb3 100644 (file)
@@ -86,9 +86,9 @@ static void atom_not_found(int fatal_errno, const char *file, int line,
     }
 }
 
-atom_id search_atom(const char *type, int start,
-                    t_atoms *atoms,
-                    const char *bondtype, gmx_bool bAllowMissing)
+int search_atom(const char *type, int start,
+                t_atoms *atoms,
+                const char *bondtype, gmx_bool bAllowMissing)
 {
     int             i, resind = -1;
     gmx_bool        bPrevious, bNext;
@@ -120,7 +120,7 @@ atom_id search_atom(const char *type, int start,
         {
             if (anm[i] && gmx_strcasecmp(type, *(anm[i])) == 0)
             {
-                return (atom_id) i;
+                return (int) i;
             }
         }
         if (!(bNext && at[start].resind == at[natoms-1].resind))
@@ -140,7 +140,7 @@ atom_id search_atom(const char *type, int start,
         {
             if (gmx_strcasecmp(type, *(anm[i])) == 0)
             {
-                return (atom_id) i;
+                return (int) i;
             }
         }
         if (start > 0)
@@ -148,10 +148,10 @@ atom_id search_atom(const char *type, int start,
             atom_not_found(FARGS, type, at[start].resind, *atoms->resinfo[resind].name, bondtype, bAllowMissing);
         }
     }
-    return NO_ATID;
+    return -1;
 }
 
-atom_id
+int
 search_res_atom(const char *type, int resind,
                 t_atoms *atoms,
                 const char *bondtype, gmx_bool bAllowMissing)
@@ -166,7 +166,7 @@ search_res_atom(const char *type, int resind,
         }
     }
 
-    return NO_ATID;
+    return -1;
 }
 
 
index ec605c57c00e8cafa17a2f39738821f157feb262..5ad893a285bd09869b7f1e91c8f138fbc4a13d00 100644 (file)
@@ -38,7 +38,6 @@
 #ifndef GMX_GMXPREPROCESS_PGUTIL_H
 #define GMX_GMXPREPROCESS_PGUTIL_H
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
@@ -51,14 +50,14 @@ struct t_atoms;
  * when bondtype="check" no error/warning is issued.
  * When bAllowMissing=FALSE an fatal error is issued, otherwise a warning.
  */
-atom_id search_atom(const char *type, int start,
-                    t_atoms *atoms,
-                    const char *bondtype, gmx_bool bAllowMissing);
+int search_atom(const char *type, int start,
+                t_atoms *atoms,
+                const char *bondtype, gmx_bool bAllowMissing);
 
 /* Similar to search_atom, but this routine searches for the specified
  * atom in residue resind.
  */
-atom_id
+int
 search_res_atom(const char *type, int resind,
                 t_atoms *atoms,
                 const char *bondtype, gmx_bool bAllowMissing);
index 71f173e55946ef147fe09617264f4bbc197bc433..4bb813df6753491f0324f492277da74a4947e548 100644 (file)
@@ -1176,7 +1176,7 @@ static void generate_qmexcl_moltype(gmx_moltype_t *molt, unsigned char *grpnr,
      */
     int
         i, j, l, k = 0, jmax, qm_max = 0, qm_nr = 0, nratoms = 0, link_nr = 0, link_max = 0;
-    atom_id
+    int
        *qm_arr = NULL, *link_arr = NULL, a1, a2, a3, a4, ftype = 0;
     t_blocka
         qmexcl;
index fc552f09a18f80b9fdabbbf14b25ee5c9aca701b..79d08a8c867d7718ba12e6af4daa713934916341 100644 (file)
@@ -934,7 +934,7 @@ void push_nbt(directive d, t_nbparam **nbt, gpp_atomtype_t atype,
     int         i, f, n, ftype, nrfp;
     double      c[4], dum;
     real        cr[4];
-    atom_id     ai, aj;
+    int         ai, aj;
     t_nbparam  *nbp;
     gmx_bool    bId;
     char        errbuf[256];
@@ -2415,7 +2415,7 @@ void push_excl(char *line, t_block2 *b2)
 void b_to_b2(t_blocka *b, t_block2 *b2)
 {
     int     i;
-    atom_id j, a;
+    int     j, a;
 
     for (i = 0; (i < b->nr); i++)
     {
@@ -2431,7 +2431,7 @@ void b_to_b2(t_blocka *b, t_block2 *b2)
 void b2_to_b(t_block2 *b2, t_blocka *b)
 {
     int     i, nra;
-    atom_id j;
+    int     j;
 
     nra = 0;
     for (i = 0; (i < b2->nr); i++)
@@ -2449,13 +2449,13 @@ void b2_to_b(t_block2 *b2, t_blocka *b)
 
 static int icomp(const void *v1, const void *v2)
 {
-    return (*((atom_id *) v1))-(*((atom_id *) v2));
+    return (*((int *) v1))-(*((int *) v2));
 }
 
 void merge_excl(t_blocka *excl, t_block2 *b2)
 {
     int     i, k;
-    atom_id j;
+    int     j;
     int     nra;
 
     if (!b2->nr)
index 088aafd26a3497a649d6f08fec3b4008ee00a48f..ace6e436b0abb1092af470b874abbf27aecc3df6 100644 (file)
@@ -46,8 +46,8 @@
 typedef struct {
     int       nr;   /* The number of entries in the list            */
     int       nra2; /* The total number of entries in a                        */
-    atom_id  *nra;  /* The number of entries in each a array (dim nr)   */
-    atom_id **a;    /* The atom numbers (dim nr) the length of each element    */
+    int      *nra;  /* The number of entries in each a array (dim nr)   */
+    int     **a;    /* The atom numbers (dim nr) the length of each element    */
     /* i is nra[i]                                             */
 } t_block2;
 
index 4210822b54b6b6d671ca6fc5de51b91a4973e779..a7ed50590503ce1509707e8df9d30b7a0ae873c6 100644 (file)
@@ -81,7 +81,7 @@ static void copy_bond (t_params *pr, int to, int from)
     }
 }
 
-static int count_hydrogens (char ***atomname, int nra, atom_id a[])
+static int count_hydrogens (char ***atomname, int nra, int a[])
 {
     int  i, nh;
 
index d0aaa4cf88ad110ee38f95db244860df36efabd0..0504a1ddd70e4f6e37f58b3df851f071ddfdcb95 100644 (file)
@@ -383,7 +383,7 @@ void print_blocka(FILE *out, const char *szName,
 
 void print_excl(FILE *out, int natoms, t_excls excls[])
 {
-    atom_id     i;
+    int         i;
     gmx_bool    have_excl;
     int         j;
 
index 47860ab6914fdabffb7bdeab87b5b0b8a0a3162f..496309e1faf52b7160ee3a3511f23af5bde00781 100644 (file)
@@ -1001,7 +1001,7 @@ static void check_vsite_constraints(t_params *plist,
                                     int cftype, int vsite_type[])
 {
     int       i, k, n;
-    atom_id   atom;
+    int       atom;
     t_params *ps;
 
     n  = 0;
@@ -1030,7 +1030,7 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[],
 {
     int          ftype, i, j, k, m, n, nvsite, nOut, kept_i;
     int          nconverted, nremoved;
-    atom_id      atom, oatom, at1, at2;
+    int          atom, oatom, at1, at2;
     gmx_bool     bKeep, bRemove, bUsed, bPresent, bThisFD, bThisOUT, bAllFD, bFirstTwo;
     t_params    *ps;
 
@@ -1047,7 +1047,7 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[],
     for (i = 0; (i < ps->nr); i++) /* for all bonds in the plist */
     {
         int            vsnral      = 0;
-        const atom_id *first_atoms = NULL;
+        const int     *first_atoms = NULL;
 
         bKeep   = FALSE;
         bRemove = FALSE;
@@ -1120,7 +1120,7 @@ static void clean_vsite_bonds(t_params *plist, t_pindex pindex[],
                         {
                             for (m = 0; (m < vsnral) && !bKeep; m++)
                             {
-                                const atom_id *atoms;
+                                const int *atoms;
 
                                 bPresent = FALSE;
                                 atoms    = plist[pindex[atom].ftype].param[pindex[atom].parnr].a + 1;
@@ -1295,7 +1295,7 @@ static void clean_vsite_angles(t_params *plist, t_pindex pindex[],
                                at2vsitecon_t *at2vc)
 {
     int          i, j, k, m, n, nvsite, kept_i;
-    atom_id      atom, at1, at2;
+    int          atom, at1, at2;
     gmx_bool     bKeep, bUsed, bPresent, bAll3FAD, bFirstTwo;
     t_params    *ps;
 
@@ -1304,7 +1304,7 @@ static void clean_vsite_angles(t_params *plist, t_pindex pindex[],
     for (i = 0; (i < ps->nr); i++) /* for all angles in the plist */
     {
         int            vsnral      = 0;
-        const atom_id *first_atoms = NULL;
+        const int     *first_atoms = NULL;
 
         bKeep    = FALSE;
         bAll3FAD = TRUE;
@@ -1332,7 +1332,7 @@ static void clean_vsite_angles(t_params *plist, t_pindex pindex[],
                     {
                         for (m = 0; (m < vsnral) && !bKeep; m++)
                         {
-                            const atom_id *atoms;
+                            const int *atoms;
 
                             bPresent = FALSE;
                             atoms    = plist[pindex[atom].ftype].param[pindex[atom].parnr].a + 1;
@@ -1440,8 +1440,8 @@ static void clean_vsite_dihs(t_params *plist, t_pindex pindex[],
     {
         int            k, m, n, nvsite;
         int            vsnral      = 0;
-        const atom_id *first_atoms = NULL;
-        atom_id        atom;
+        const int     *first_atoms = NULL;
+        int            atom;
         gmx_bool       bKeep, bUsed, bPresent;
 
 
@@ -1476,7 +1476,7 @@ static void clean_vsite_dihs(t_params *plist, t_pindex pindex[],
                     {
                         for (m = 0; (m < vsnral) && !bKeep; m++)
                         {
-                            const atom_id *atoms;
+                            const int *atoms;
 
                             bPresent = FALSE;
                             atoms    = plist[pindex[atom].ftype].param[pindex[atom].parnr].a + 1;
index 0e73e335eec894eeb7a54adc0bba1986848c9f25..f3cd19cdf9ec894fa0c3d17d2bd5542161252307 100644 (file)
@@ -144,8 +144,8 @@ typedef struct t_gmx_IMD
 
     int        nat;                  /**< Number of atoms that can be pulled via IMD. */
     int        nat_loc;              /**< Part of the atoms that are local.           */
-    atom_id   *ind;                  /**< Global indices of the IMD atoms.            */
-    atom_id   *ind_loc;              /**< Local indices of the IMD atoms.             */
+    int       *ind;                  /**< Global indices of the IMD atoms.            */
+    int       *ind_loc;              /**< Local indices of the IMD atoms.             */
     int        nalloc_loc;           /**< Allocation size for ind_loc.                */
     rvec      *xa;                   /**< Positions for all IMD atoms assembled on
                                           the master node.                            */
@@ -179,7 +179,7 @@ typedef struct t_gmx_IMD
     float          *vmd_forces;      /**< The VMD forces flat in memory.              */
     int             nforces;         /**< Number of actual MD forces;
                                           this gets communicated to the clients.      */
-    atom_id        *f_ind;           /**< Force indices.                              */
+    int            *f_ind;           /**< Force indices.                              */
     rvec           *f;               /**< The IMD pulling forces.                     */
 
     char           *forcesendbuf;    /**< Buffer for force sending.                   */
@@ -193,9 +193,9 @@ typedef struct t_gmx_IMD
     /* The next block is used on the master node only to reduce the output
      * without sacrificing information. If any of these values changes,
      * we need to write output */
-    int       old_nforces;           /**< Old value for nforces.                      */
-    atom_id  *old_f_ind;             /**< Old values for force indices.               */
-    rvec     *old_forces;            /**< Old values for IMD pulling forces.          */
+    int       old_nforces;       /**< Old value for nforces.                      */
+    int      *old_f_ind;         /**< Old values for force indices.               */
+    rvec     *old_forces;        /**< Old values for IMD pulling forces.          */
 
 } t_gmx_IMD_setup;
 
@@ -1078,7 +1078,7 @@ static void init_imd_prepare_mols_in_imdgroup(t_gmx_IMD_setup *IMDsetup, gmx_mto
     int      gstart, gend, count;
     t_block  gmols, lmols;
     int      nat;
-    atom_id *ind;
+    int     *ind;
 
     gmols = top_global->mols;
     nat   = IMDsetup->nat;
index 9c6bfcb216b4bca4ed9b16bb0af0861e19ad4386..b458e6eb3470653dbca5b405ae5963871f7de8ed 100644 (file)
@@ -42,7 +42,6 @@
 #include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/swap/enums.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
@@ -102,11 +101,11 @@ typedef struct t_grpopts {
 } t_grpopts;
 
 typedef struct {
-    int         nat;        /* Number of atoms in the pull group */
-    atom_id    *ind;        /* The global atoms numbers */
-    int         nweight;    /* The number of weights (0 or nat) */
-    real       *weight;     /* Weights (use all 1 when weight==NULL) */
-    atom_id     pbcatom;    /* The reference atom for pbc (global number) */
+    int         nat;     /* Number of atoms in the pull group */
+    int        *ind;     /* The global atoms numbers */
+    int         nweight; /* The number of weights (0 or nat) */
+    real       *weight;  /* Weights (use all 1 when weight==NULL) */
+    int         pbcatom; /* The reference atom for pbc (global number) */
 } t_pull_group;
 
 typedef struct {
@@ -220,7 +219,7 @@ typedef struct {
     int         eType;             /* Rotation type for this group                  */
     int         bMassW;            /* Use mass-weighed positions?                   */
     int         nat;               /* Number of atoms in the group                  */
-    atom_id    *ind;               /* The global atoms numbers                      */
+    int        *ind;               /* The global atoms numbers                      */
     rvec       *x_ref;             /* The reference positions                       */
     rvec        vec;               /* The normalized rotation vector                */
     real        rate;              /* Rate of rotation (degree/ps)                  */
@@ -253,7 +252,7 @@ struct t_gmx_IMD;
 
 typedef struct t_IMD {
     int               nat;   /* Number of interactive atoms                   */
-    atom_id          *ind;   /* The global indices of the interactive atoms   */
+    int              *ind;   /* The global indices of the interactive atoms   */
     struct t_gmx_IMD *setup; /* Stores non-inputrec IMD data                  */
 } t_IMD;
 
@@ -265,9 +264,9 @@ typedef struct t_swapcoords {
     int              nat;                 /* Number of atoms in the ion group             */
     int              nat_split[2];        /* Number of atoms in the split group           */
     int              nat_sol;             /* Number of atoms in the solvent group         */
-    atom_id         *ind;                 /* The global ion group atoms numbers           */
-    atom_id         *ind_split[2];        /* Split groups for compartment partitioning    */
-    atom_id         *ind_sol;             /* The global solvent group atom numbers        */
+    int             *ind;                 /* The global ion group atoms numbers           */
+    int             *ind_split[2];        /* Split groups for compartment partitioning    */
+    int             *ind_sol;             /* The global solvent group atom numbers        */
     gmx_bool         massw_split[2];      /* Use mass-weighted positions in split group?  */
     real             cyl0r, cyl1r;        /* Split cylinders defined by radius, upper and */
     real             cyl0u, cyl1u;        /* ... lower extension. The split cylinders de- */
index 97701d10bd8236b5bce36f45995661ae5f458dc3..699941b2c2af97534582d90b4aaa01ae5c1daa7d 100644 (file)
@@ -39,7 +39,6 @@
 #define GMX_LEGACYHEADERS_TYPES_NS_H
 
 #include "gromacs/legacyheaders/types/nblist.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
@@ -61,12 +60,12 @@ enum {
 typedef struct {
     int     ncg;
     int     nj;
-    atom_id jcg[MAX_CG];
+    int     jcg[MAX_CG];
 } t_ns_buf;
 
 typedef struct gmx_ns_t {
     gmx_bool      bCGlist;
-    atom_id      *simple_aaj;
+    int          *simple_aaj;
     struct t_grid*grid;
     t_excl       *bexcl;
     gmx_bool     *bHaveVdW;
@@ -74,10 +73,10 @@ typedef struct gmx_ns_t {
     gmx_bool     *bExcludeAlleg;
     int           nra_alloc;
     int           cg_alloc;
-    atom_id     **nl_sr;
+    int         **nl_sr;
     int          *nsr;
-    atom_id     **nl_lr_ljc;
-    atom_id     **nl_lr_one;
+    int         **nl_lr_ljc;
+    int         **nl_lr_one;
     int          *nlr_ljc;
     int          *nlr_one;
     /* the nblists should probably go in here */
index 3693c71b139d4f7bfd42987a77085ac2da22eb74..3c0c06f57cf1c1b7002651c1061c3f53bfe3e859 100644 (file)
@@ -131,7 +131,7 @@ update_adress_weights_com(FILE gmx_unused    * fplog,
 {
     int            icg, k, k0, k1, d;
     real           nrcg, inv_ncg, mtot, inv_mtot;
-    atom_id *      cgindex;
+    int     *      cgindex;
     rvec           ix;
     int            adresstype;
     real           adressr, adressw;
@@ -266,7 +266,7 @@ void update_adress_weights_atom_per_atom(
         t_pbc *              pbc)
 {
     int            icg, k, k0, k1;
-    atom_id *      cgindex;
+    int     *      cgindex;
     int            adresstype;
     real           adressr, adressw;
     rvec *         ref;
@@ -459,7 +459,7 @@ update_adress_weights_atom(int                  cg0,
                            t_pbc *              pbc)
 {
     int            icg, k, k0, k1;
-    atom_id *      cgindex;
+    int     *      cgindex;
     int            adresstype;
     real           adressr, adressw;
     rvec *         ref;
index 3c9ed94461305c0ca3468eb2ef654b9cd8ee852e..832bbed48497e4d85c9be6596fda75c1470a4225 100644 (file)
@@ -96,14 +96,14 @@ typedef struct gmx_constr {
 } t_gmx_constr;
 
 typedef struct {
-    atom_id iatom[3];
-    atom_id blocknr;
+    int iatom[3];
+    int blocknr;
 } t_sortblock;
 
 static int pcomp(const void *p1, const void *p2)
 {
     int          db;
-    atom_id      min1, min2, max1, max2;
+    int          min1, min2, max1, max2;
     t_sortblock *a1 = (t_sortblock *)p1;
     t_sortblock *a2 = (t_sortblock *)p2;
 
@@ -677,7 +677,7 @@ static void make_shake_sblock_serial(struct gmx_constr *constr,
     t_blocka     sblocks;
     t_sortblock *sb;
     t_iatom     *iatom;
-    atom_id     *inv_sblock;
+    int         *inv_sblock;
 
     /* Since we are processing the local topology,
      * the F_CONSTRNC ilist has been concatenated to the F_CONSTR ilist.
index 884380a747698b756a383fec38dd44067afb10b7..ea00d8a07db7fcb5f83cbcd3c38f323733a7d4cd 100644 (file)
@@ -141,12 +141,12 @@ void settle_proj(gmx_settledata_t settled, int econq,
  * of coordinates working on settle type constraint.
  */
 
-void cshake(const atom_id iatom[], int ncon, int *nnit, int maxnit,
+void cshake(const int iatom[], int ncon, int *nnit, int maxnit,
             const real dist2[], real xp[], const real rij[], const real m2[], real omega,
             const real invmass[], const real tt[], real lagr[], int *nerror);
 /* Regular iterative shake */
 
-void crattle(atom_id iatom[], int ncon, int *nnit, int maxnit,
+void crattle(int iatom[], int ncon, int *nnit, int maxnit,
              real dist2[], real vp[], real rij[], real m2[], real omega,
              real invmass[], real tt[], real lagr[], int *nerror, real invdt);
 
index f9bd441aff7a9c464ecc5576dd1bcb82d3bee02b..7a3beb89ea137150312e4c7269c7b65944b5725a 100644 (file)
  */
 
 #ifdef DEBUG
-static void SETEXCL_(t_excl e[], atom_id i, atom_id j)
+static void SETEXCL_(t_excl e[], int i, int j)
 {
     e[j] = e[j] | (1<<i);
 }
-static void RMEXCL_(t_excl e[], atom_id i, atom_id j)
+static void RMEXCL_(t_excl e[], int i, int j)
 {
     e[j] = e[j] & ~(1<<i);
 }
-static gmx_bool ISEXCL_(t_excl e[], atom_id i, atom_id j)
+static gmx_bool ISEXCL_(t_excl e[], int i, int j)
 {
     return (gmx_bool)(e[j] & (1<<i));
 }
-static gmx_bool NOTEXCL_(t_excl e[], atom_id i, atom_id j)
+static gmx_bool NOTEXCL_(t_excl e[], int i, int j)
 {
     return !(ISEXCL(e, i, j));
 }
 #else
-#define SETEXCL(e, i, j) (e)[((atom_id) (j))] |= (1<<((atom_id) (i)))
-#define RMEXCL(e, i, j)  (e)[((atom_id) (j))] &= (~(1<<((atom_id) (i))))
-#define ISEXCL(e, i, j)  (gmx_bool) ((e)[((atom_id) (j))] & (1<<((atom_id) (i))))
+#define SETEXCL(e, i, j) (e)[((int) (j))] |= (1<<((int) (i)))
+#define RMEXCL(e, i, j)  (e)[((int) (j))] &= (~(1<<((int) (i))))
+#define ISEXCL(e, i, j)  (gmx_bool) ((e)[((int) (j))] & (1<<((int) (i))))
 #define NOTEXCL(e, i, j) !(ISEXCL(e, i, j))
 #endif
 
@@ -365,7 +365,7 @@ static void reset_neighbor_lists(t_forcerec *fr, gmx_bool bResetSR, gmx_bool bRe
 
 
 
-static gmx_inline void new_i_nblist(t_nblist *nlist, atom_id i_atom, int shift, int gid)
+static gmx_inline void new_i_nblist(t_nblist *nlist, int i_atom, int shift, int gid)
 {
     int    nri = nlist->nri;
 
@@ -482,7 +482,7 @@ static gmx_inline void close_neighbor_lists(t_forcerec *fr, gmx_bool bMakeQMMMnb
 }
 
 
-static gmx_inline void add_j_to_nblist(t_nblist *nlist, atom_id j_atom, gmx_bool bLR)
+static gmx_inline void add_j_to_nblist(t_nblist *nlist, int j_atom, gmx_bool bLR)
 {
     int nrj = nlist->nrj;
 
@@ -504,7 +504,7 @@ static gmx_inline void add_j_to_nblist(t_nblist *nlist, atom_id j_atom, gmx_bool
 }
 
 static gmx_inline void add_j_to_nblist_cg(t_nblist *nlist,
-                                          atom_id j_start, int j_end,
+                                          int j_start, int j_end,
                                           t_excl *bexcl, gmx_bool i_is_j,
                                           gmx_bool bLR)
 {
@@ -557,8 +557,8 @@ typedef void
                    int                   icg,
                    int                   jgid,
                    int                   nj,
-                   atom_id               jjcg[],
-                   atom_id               index[],
+                   int                   jjcg[],
+                   int                   index[],
                    t_excl                bExcl[],
                    int                   shift,
                    t_forcerec     *      fr,
@@ -574,8 +574,8 @@ put_in_list_at(gmx_bool              bHaveVdW[],
                int                   icg,
                int                   jgid,
                int                   nj,
-               atom_id               jjcg[],
-               atom_id               index[],
+               int                   jjcg[],
+               int                   index[],
                t_excl                bExcl[],
                int                   shift,
                t_forcerec     *      fr,
@@ -597,7 +597,7 @@ put_in_list_at(gmx_bool              bHaveVdW[],
     t_nblist  *   coul_ww    = NULL;
 
     int           i, j, jcg, igid, gid, nbl_ind;
-    atom_id       jj, jj0, jj1, i_atom;
+    int           jj, jj0, jj1, i_atom;
     int           i0, nicg;
 
     int          *cginfo;
@@ -1088,8 +1088,8 @@ put_in_list_adress(gmx_bool              bHaveVdW[],
                    int                   icg,
                    int                   jgid,
                    int                   nj,
-                   atom_id               jjcg[],
-                   atom_id               index[],
+                   int                   jjcg[],
+                   int                   index[],
                    t_excl                bExcl[],
                    int                   shift,
                    t_forcerec     *      fr,
@@ -1109,7 +1109,7 @@ put_in_list_adress(gmx_bool              bHaveVdW[],
     t_nblist  *   coul_adress  = NULL;
 
     int           i, j, jcg, igid, gid, nbl_ind, nbl_ind_adress;
-    atom_id       jj, jj0, jj1, i_atom;
+    int           jj, jj0, jj1, i_atom;
     int           i0, nicg;
 
     int          *cginfo;
@@ -1345,8 +1345,8 @@ put_in_list_qmmm(gmx_bool gmx_unused              bHaveVdW[],
                  int                              icg,
                  int                              jgid,
                  int                              nj,
-                 atom_id                          jjcg[],
-                 atom_id                          index[],
+                 int                              jjcg[],
+                 int                              index[],
                  t_excl                           bExcl[],
                  int                              shift,
                  t_forcerec                *      fr,
@@ -1357,7 +1357,7 @@ put_in_list_qmmm(gmx_bool gmx_unused              bHaveVdW[],
 {
     t_nblist  *   coul;
     int           i, j, jcg, igid, gid;
-    atom_id       jj, jj0, jj1, i_atom;
+    int           jj, jj0, jj1, i_atom;
     int           i0, nicg;
     gmx_bool      bNotEx;
 
@@ -1410,8 +1410,8 @@ put_in_list_cg(gmx_bool  gmx_unused             bHaveVdW[],
                int                              icg,
                int                              jgid,
                int                              nj,
-               atom_id                          jjcg[],
-               atom_id                          index[],
+               int                              jjcg[],
+               int                              index[],
                t_excl                           bExcl[],
                int                              shift,
                t_forcerec                *      fr,
@@ -1472,10 +1472,10 @@ put_in_list_cg(gmx_bool  gmx_unused             bHaveVdW[],
     close_i_nblist(vdwc);
 }
 
-static void setexcl(atom_id start, atom_id end, t_blocka *excl, gmx_bool b,
+static void setexcl(int start, int end, t_blocka *excl, gmx_bool b,
                     t_excl bexcl[])
 {
-    atom_id i, k;
+    int i, k;
 
     if (b)
     {
@@ -1638,7 +1638,7 @@ static real calc_image_rect(rvec xi, rvec xj, rvec box_size,
     return r2;
 }
 
-static void add_simple(t_ns_buf * nsbuf, int nrj, atom_id cg_j,
+static void add_simple(t_ns_buf * nsbuf, int nrj, int cg_j,
                        gmx_bool bHaveVdW[], int ngid, t_mdatoms *md,
                        int icg, int jgid, t_block *cgs, t_excl bexcl[],
                        int shift, t_forcerec *fr, put_in_list_t *put_in_list)
@@ -1655,7 +1655,7 @@ static void add_simple(t_ns_buf * nsbuf, int nrj, atom_id cg_j,
 }
 
 static void ns_inner_tric(rvec x[], int icg, int *i_egp_flags,
-                          int njcg, atom_id jcg[],
+                          int njcg, int jcg[],
                           matrix box, rvec b_inv, real rcut2,
                           t_block *cgs, t_ns_buf **ns_buf,
                           gmx_bool bHaveVdW[], int ngid, t_mdatoms *md,
@@ -1665,7 +1665,7 @@ static void ns_inner_tric(rvec x[], int icg, int *i_egp_flags,
     int       shift;
     int       j, nrj, jgid;
     int      *cginfo = fr->cginfo;
-    atom_id   cg_j, *cgindex;
+    int       cg_j, *cgindex;
 
     cgindex = cgs->index;
     shift   = CENTRAL;
@@ -1687,7 +1687,7 @@ static void ns_inner_tric(rvec x[], int icg, int *i_egp_flags,
 }
 
 static void ns_inner_rect(rvec x[], int icg, int *i_egp_flags,
-                          int njcg, atom_id jcg[],
+                          int njcg, int jcg[],
                           gmx_bool bBox, rvec box_size, rvec b_inv, real rcut2,
                           t_block *cgs, t_ns_buf **ns_buf,
                           gmx_bool bHaveVdW[], int ngid, t_mdatoms *md,
@@ -1697,7 +1697,7 @@ static void ns_inner_rect(rvec x[], int icg, int *i_egp_flags,
     int       shift;
     int       j, nrj, jgid;
     int      *cginfo = fr->cginfo;
-    atom_id   cg_j, *cgindex;
+    int       cg_j, *cgindex;
 
     cgindex = cgs->index;
     if (bBox)
@@ -1745,7 +1745,7 @@ static int ns_simple_core(t_forcerec *fr,
                           gmx_localtop_t *top,
                           t_mdatoms *md,
                           matrix box, rvec box_size,
-                          t_excl bexcl[], atom_id *aaj,
+                          t_excl bexcl[], int *aaj,
                           int ngid, t_ns_buf **ns_buf,
                           put_in_list_t *put_in_list, gmx_bool bHaveVdW[])
 {
@@ -1754,7 +1754,7 @@ static int ns_simple_core(t_forcerec *fr,
     int          nsearch, icg, igid, nn;
     int         *cginfo;
     t_ns_buf    *nsbuf;
-    /* atom_id  *i_atoms; */
+    /* int  *i_atoms; */
     t_block     *cgs  = &(top->cgs);
     t_blocka    *excl = &(top->excls);
     rvec         b_inv;
@@ -2088,12 +2088,12 @@ static int nsgrid_core(t_commrec *cr, t_forcerec *fr,
                        gmx_bool bDoLongRange, gmx_bool bMakeQMMMnblist)
 {
     gmx_ns_t     *ns;
-    atom_id     **nl_lr_ljc, **nl_lr_one, **nl_sr;
+    int         **nl_lr_ljc, **nl_lr_one, **nl_sr;
     int          *nlr_ljc, *nlr_one, *nsr;
     gmx_domdec_t *dd;
     t_block      *cgs    = &(top->cgs);
     int          *cginfo = fr->cginfo;
-    /* atom_id *i_atoms,*cgsindex=cgs->index; */
+    /* int *i_atoms,*cgsindex=cgs->index; */
     ivec          sh0, sh1, shp;
     int           cell_x, cell_y, cell_z;
     int           d, tx, ty, tz, dx, dy, dz, cj;
index e4e1791498d795cfd97fd391dcd445a58f7852dc..06754b233a9c2efa858ad19d4beb0cbd9e235a13 100644 (file)
@@ -471,7 +471,7 @@ void init_QMMMrec(t_commrec  *cr,
      */
 
     gmx_groups_t            *groups;
-    atom_id                 *qm_arr = NULL, vsite, ai, aj;
+    int                     *qm_arr = NULL, vsite, ai, aj;
     int                      qm_max = 0, qm_nr = 0, i, j, jmax, k, l, nrvsite2 = 0;
     t_QMMMrec               *qr;
     t_MMrec                 *mm;
index 47e71d65343cfb5ec4fcfdb4922847e688d4073a..ee39826739ab39bbc8be5d9a3c26eb558d38b4c5 100644 (file)
@@ -63,7 +63,7 @@ real RF_excl_correction(const t_forcerec *fr, t_graph *g,
     const real *chargeA, *chargeB;
     real        ek, ec, L1, qiA, qiB, qqA, qqB, qqL, v;
     rvec        dx, df;
-    atom_id    *AA;
+    int        *AA;
     ivec        dt;
     int         start = 0;
     int         end   = mdatoms->homenr;
index 3a5cae5777b36a6fae4f59014c5462603a845116..489d5c77a4a1a5754826051c25be161dfc011614 100644 (file)
@@ -119,7 +119,7 @@ static void pv(FILE *log, char *s, rvec x)
  *                                             problematic constraint if the input was malformed
  *
  * \todo Make SHAKE use better data structures, in particular for iatom. */
-void cshake(const atom_id iatom[], int ncon, int *nnit, int maxnit,
+void cshake(const int iatom[], int ncon, int *nnit, int maxnit,
             const real constraint_distance_squared[], real positions[],
             const real initial_displacements[], const real half_of_reduced_mass[], real omega,
             const real invmass[], const real distance_squared_tolerance[],
@@ -504,7 +504,7 @@ gmx_bool bshakef(FILE *log, gmx_shakedata_t shaked,
     return TRUE;
 }
 
-void crattle(atom_id iatom[], int ncon, int *nnit, int maxnit,
+void crattle(int iatom[], int ncon, int *nnit, int maxnit,
              real constraint_distance_squared[], real vp[], real rij[], real m2[], real omega,
              real invmass[], real distance_squared_tolerance[], real scaled_lagrange_multiplier[],
              int *nerror, real invdt)
index f5de26bb8e68297b2015f9f755d262038f459ee2..d6a01e497b49168fe74c732607d7aa25ad37baa9 100644 (file)
@@ -65,8 +65,8 @@
 
 typedef struct {
     int     nnucl;
-    atom_id shell;               /* The shell id                               */
-    atom_id nucl1, nucl2, nucl3; /* The nuclei connected to the shell  */
+    int     shell;               /* The shell id                               */
+    int     nucl1, nucl2, nucl3; /* The nuclei connected to the shell  */
     /* gmx_bool    bInterCG; */       /* Coupled to nuclei outside cg?        */
     real    k;                   /* force constant                     */
     real    k_1;                 /* 1 over force constant              */
@@ -316,11 +316,11 @@ gmx_shellfc_t *init_shell_flexcon(FILE *fplog,
     /* Initiate the shell structures */
     for (i = 0; (i < nshell); i++)
     {
-        shell[i].shell = NO_ATID;
+        shell[i].shell = -1;
         shell[i].nnucl = 0;
-        shell[i].nucl1 = NO_ATID;
-        shell[i].nucl2 = NO_ATID;
-        shell[i].nucl3 = NO_ATID;
+        shell[i].nucl1 = -1;
+        shell[i].nucl2 = -1;
+        shell[i].nucl3 = -1;
         /* shell[i].bInterCG=FALSE; */
         shell[i].k_1   = 0;
         shell[i].k     = 0;
@@ -360,7 +360,7 @@ gmx_shellfc_t *init_shell_flexcon(FILE *fplog,
                     nra   = interaction_function[ftype].nratoms;
 
                     /* Check whether we have a bond with a shell */
-                    aS = NO_ATID;
+                    aS = -1;
 
                     switch (bondtypes[j])
                     {
@@ -388,7 +388,7 @@ gmx_shellfc_t *init_shell_flexcon(FILE *fplog,
                             gmx_fatal(FARGS, "Death Horror: %s, %d", __FILE__, __LINE__);
                     }
 
-                    if (aS != NO_ATID)
+                    if (aS != -1)
                     {
                         qS = atom[aS].q;
 
@@ -399,7 +399,7 @@ gmx_shellfc_t *init_shell_flexcon(FILE *fplog,
                             gmx_fatal(FARGS, "nsi is %d should be within 0 - %d. aS = %d",
                                       nsi, nshell, aS);
                         }
-                        if (shell[nsi].shell == NO_ATID)
+                        if (shell[nsi].shell == -1)
                         {
                             shell[nsi].shell = a_offset + aS;
                             ns++;
@@ -409,15 +409,15 @@ gmx_shellfc_t *init_shell_flexcon(FILE *fplog,
                             gmx_fatal(FARGS, "Weird stuff in %s, %d", __FILE__, __LINE__);
                         }
 
-                        if      (shell[nsi].nucl1 == NO_ATID)
+                        if      (shell[nsi].nucl1 == -1)
                         {
                             shell[nsi].nucl1 = a_offset + aN;
                         }
-                        else if (shell[nsi].nucl2 == NO_ATID)
+                        else if (shell[nsi].nucl2 == -1)
                         {
                             shell[nsi].nucl2 = a_offset + aN;
                         }
-                        else if (shell[nsi].nucl3 == NO_ATID)
+                        else if (shell[nsi].nucl3 == -1)
                         {
                             shell[nsi].nucl3 = a_offset + aN;
                         }
index f914ebb982539804aa59e10907ba199e717a754b..b36d847f06c40c4a22ffc41a95ad962fb1b324ee 100644 (file)
@@ -48,7 +48,7 @@
 namespace
 {
 
-/*! \brief Stride of the vector of atom_id used to describe each SHAKE
+/*! \brief Stride of the vector of int used to describe each SHAKE
  * constraint
  *
  * Like other such code, SHAKE is hard-wired to use t_ilist.iatoms as
@@ -61,7 +61,7 @@ const int constraintStride = 3;
 /*! \brief Compute the displacements between pairs of constrained
  * atoms described in the iatom "topology". */
 std::vector<real>
-computeDisplacements(const std::vector<atom_id> &iatom,
+computeDisplacements(const std::vector<int>     &iatom,
                      const std::vector<real>    &positions)
 {
     assert(0 == iatom.size() % constraintStride);
@@ -87,7 +87,7 @@ computeDisplacements(const std::vector<atom_id> &iatom,
  *
  * The reduced mass is m = 1/(1/m_i + 1/m_j)) */
 std::vector<real>
-computeHalfOfReducedMasses(const std::vector<atom_id> &iatom,
+computeHalfOfReducedMasses(const std::vector<int>     &iatom,
                            const std::vector<real>    &inverseMasses)
 {
     int               numConstraints = iatom.size() / constraintStride;
@@ -158,7 +158,7 @@ class ShakeTest : public ::testing::Test
         //! Run the test
         void runTest(size_t gmx_unused           numAtoms,
                      size_t                      numConstraints,
-                     const std::vector<atom_id> &iatom,
+                     const std::vector<int>     &iatom,
                      const std::vector<real>    &constrainedDistances,
                      const std::vector<real>    &inverseMasses,
                      const std::vector<real>    &positions)
@@ -174,7 +174,7 @@ class ShakeTest : public ::testing::Test
                 {
                     // Check that the topology refers to atoms that have masses and positions
                     assert(iatom[i*constraintStride + j] >= 0);
-                    assert(iatom[i*constraintStride + j] < static_cast<atom_id>(numAtoms));
+                    assert(iatom[i*constraintStride + j] < static_cast<int>(numAtoms));
                 }
             }
             std::vector<real> distanceSquaredTolerances;
@@ -244,7 +244,7 @@ TEST_F(ShakeTest, ConstrainsOneBond)
     int                  numAtoms       = 2;
     int                  numConstraints = 1;
 
-    std::vector<atom_id> iatom;
+    std::vector<int>     iatom;
     iatom.push_back(-1); // unused
     iatom.push_back(0);  // i atom index
     iatom.push_back(1);  // j atom index
@@ -265,7 +265,7 @@ TEST_F(ShakeTest, ConstrainsTwoDisjointBonds)
     int                  numAtoms       = 4;
     int                  numConstraints = 2;
 
-    std::vector<atom_id> iatom;
+    std::vector<int>     iatom;
     iatom.push_back(-1); // unused
     iatom.push_back(0);  // i atom index
     iatom.push_back(1);  // j atom index
@@ -291,7 +291,7 @@ TEST_F(ShakeTest, ConstrainsTwoBondsWithACommonAtom)
     int                  numAtoms       = 3;
     int                  numConstraints = 2;
 
-    std::vector<atom_id> iatom;
+    std::vector<int>     iatom;
     iatom.push_back(-1); // unused
     iatom.push_back(0);  // i atom index
     iatom.push_back(1);  // j atom index
@@ -317,7 +317,7 @@ TEST_F(ShakeTest, ConstrainsThreeBondsWithCommonAtoms)
     int                  numAtoms       = 4;
     int                  numConstraints = 3;
 
-    std::vector<atom_id> iatom;
+    std::vector<int>     iatom;
     iatom.push_back(-1); // unused
     iatom.push_back(0);  // i atom index
     iatom.push_back(1);  // j atom index
index 8b2f712c5d84d5cbf981043441149de62a73b46c..479c849125902fc8691ff1525c4161356c767164 100644 (file)
@@ -616,7 +616,7 @@ static void spread_vsite3(t_iatom ia[], real a, real b,
                           t_pbc *pbc, t_graph *g)
 {
     rvec    fi, fj, fk, dx;
-    atom_id av, ai, aj, ak;
+    int     av, ai, aj, ak;
     ivec    di;
     int     siv, sij, sik;
 
@@ -906,7 +906,7 @@ static void spread_vsite3OUT(t_iatom ia[], real a, real b, real c,
 {
     rvec    xvi, xij, xik, fv, fj, fk;
     real    cfx, cfy, cfz;
-    atom_id av, ai, aj, ak;
+    int     av, ai, aj, ak;
     ivec    di;
     int     svi, sji, ski;
 
@@ -996,7 +996,7 @@ static void spread_vsite4FD(t_iatom ia[], real a, real b, real c,
 {
     real    d, invl, fproj, a1;
     rvec    xvi, xij, xjk, xjl, xix, fv, temp;
-    atom_id av, ai, aj, ak, al;
+    int     av, ai, aj, ak, al;
     ivec    di;
     int     svi, sji, skj, slj, m;
 
index 7962ba78b733b4f8199c15374392de092ba32cfc..30f67a617435652ca88fd81c4b2016d653d4c067 100644 (file)
  *
  ************************************************************/
 
-static void add_gbond(t_graph *g, atom_id a0, atom_id a1)
+static void add_gbond(t_graph *g, int a0, int a1)
 {
     int         i;
-    atom_id     inda0, inda1;
+    int         inda0, inda1;
     gmx_bool    bFound;
 
     inda0  = a0 - g->at_start;
@@ -316,7 +316,7 @@ static gmx_bool determine_graph_parts(t_graph *g, int *part)
 {
     int      i, e;
     int      nchanged;
-    atom_id  at_i, *at_i2;
+    int      at_i, *at_i2;
     gmx_bool bMultiPart;
 
     /* Initialize the part array with all entries different */
index c37a2fde5ebc9a6446a2d7c5227a86612facf007..192a0dac8d10046105fef81f36e8e83833b3e7fe 100644 (file)
@@ -40,7 +40,6 @@
 #include <stdio.h>
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
@@ -62,7 +61,7 @@ typedef struct t_graph {
     int          at_start;  /* The first connected atom in this graph       */
     int          at_end;    /* The last+1 connected atom in this graph      */
     int         *nedge;     /* For each node the number of edges            */
-    atom_id    **edge;      /* For each node, the actual edges (bidirect.)  */
+    int        **edge;      /* For each node, the actual edges (bidirect.)  */
     gmx_bool     bScrewPBC; /* Screw boundary conditions                    */
     ivec        *ishift;    /* Shift for each particle                      */
     int          negc;
index 6bc0e54a3d5dcf17d72b14c8404cafdfa3f471c9..8686937215fe198bfed6f41d42b3ae43aca9d0aa 100644 (file)
@@ -70,7 +70,7 @@ typedef struct
 
     int           nat_loc;    /* Number of local pull atoms */
     int           nalloc_loc; /* Allocation size for ind_loc and weight_loc */
-    atom_id      *ind_loc;    /* Local pull indices */
+    int          *ind_loc;    /* Local pull indices */
     real         *weight_loc; /* Weights for the local indices */
 
     real          mwscale;    /* mass*weight scaling factor 1/sum w m */
index 4aa2e0c5c5b558597bb9df5c73ecc01b81a477a3..f01d4399da1375f3c96de4fe98e93a6c1e8d3569 100644 (file)
@@ -128,15 +128,15 @@ typedef struct gmx_enfrot
 /* Global enforced rotation data for a single rotation group                  */
 typedef struct gmx_enfrotgrp
 {
-    real     degangle;      /* Rotation angle in degrees                      */
-    matrix   rotmat;        /* Rotation matrix                                */
-    atom_id *ind_loc;       /* Local rotation indices                         */
-    int      nat_loc;       /* Number of local group atoms                    */
-    int      nalloc_loc;    /* Allocation size for ind_loc and weight_loc     */
-
-    real     V;             /* Rotation potential for this rotation group     */
-    rvec    *f_rot_loc;     /* Array to store the forces on the local atoms
-                               resulting from enforced rotation potential     */
+    real     degangle;   /* Rotation angle in degrees                      */
+    matrix   rotmat;     /* Rotation matrix                                */
+    int     *ind_loc;    /* Local rotation indices                         */
+    int      nat_loc;    /* Number of local group atoms                    */
+    int      nalloc_loc; /* Allocation size for ind_loc and weight_loc     */
+
+    real     V;          /* Rotation potential for this rotation group     */
+    rvec    *f_rot_loc;  /* Array to store the forces on the local atoms
+                            resulting from enforced rotation potential     */
 
     /* Collective coordinates for the whole rotation group */
     real  *xc_ref_length;   /* Length of each x_rotref vector after x_rotref
index ff0a842de2e732987d14f3b021a8b149181e314b..e1bdf4f221e86142ad477963925772bf3fcba06c 100644 (file)
@@ -52,7 +52,7 @@
 #include "gromacs/utility/fatalerror.h"
 
 int
-gmx_calc_cog(t_topology * /* top */, rvec x[], int nrefat, atom_id index[], rvec xout)
+gmx_calc_cog(t_topology * /* top */, rvec x[], int nrefat, int index[], rvec xout)
 {
     int                 m, ai;
 
@@ -78,7 +78,7 @@ gmx_calc_cog(t_topology * /* top */, rvec x[], int nrefat, atom_id index[], rvec
  * mass are calculated, and hence a topology with masses is required.
  */
 int
-gmx_calc_com(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout)
+gmx_calc_com(t_topology *top, rvec x[], int nrefat, int index[], rvec xout)
 {
     int                 m, j, ai;
     real                mass, mtot;
@@ -113,7 +113,7 @@ gmx_calc_com(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout)
  * \returns    0 on success, EINVAL if \p top is NULL.
  */
 int
-gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout)
+gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, int index[], rvec fout)
 {
     int                 m, j, ai;
     real                mass, mtot;
@@ -140,7 +140,7 @@ gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout
 }
 
 int
-gmx_calc_com_f(t_topology * /* top */, rvec f[], int nrefat, atom_id index[], rvec fout)
+gmx_calc_com_f(t_topology * /* top */, rvec f[], int nrefat, int index[], rvec fout)
 {
     clear_rvec(fout);
     for (int m = 0; m < nrefat; ++m)
@@ -166,7 +166,7 @@ gmx_calc_com_f(t_topology * /* top */, rvec f[], int nrefat, atom_id index[], rv
  * Other parameters are passed unmodified to these functions.
  */
 int
-gmx_calc_comg(t_topology *top, rvec x[], int nrefat, atom_id index[],
+gmx_calc_comg(t_topology *top, rvec x[], int nrefat, int index[],
               bool bMass, rvec xout)
 {
     if (bMass)
@@ -194,7 +194,7 @@ gmx_calc_comg(t_topology *top, rvec x[], int nrefat, atom_id index[],
  * Other parameters are passed unmodified to these functions.
  */
 int
-gmx_calc_comg_f(t_topology *top, rvec f[], int nrefat, atom_id index[],
+gmx_calc_comg_f(t_topology *top, rvec f[], int nrefat, int index[],
                 bool bMass, rvec fout)
 {
     if (bMass)
@@ -221,7 +221,7 @@ gmx_calc_comg_f(t_topology *top, rvec f[], int nrefat, atom_id index[],
  */
 int
 gmx_calc_cog_pbc(t_topology *top, rvec x[], t_pbc *pbc,
-                 int nrefat, atom_id index[], rvec xout)
+                 int nrefat, int index[], rvec xout)
 {
     const real          tol = 1e-4;
     bool                bChanged;
@@ -278,7 +278,7 @@ gmx_calc_cog_pbc(t_topology *top, rvec x[], t_pbc *pbc,
  */
 int
 gmx_calc_com_pbc(t_topology *top, rvec x[], t_pbc *pbc,
-                 int nrefat, atom_id index[], rvec xout)
+                 int nrefat, int index[], rvec xout)
 {
     const real          tol = 1e-4;
     bool                bChanged;
@@ -353,7 +353,7 @@ gmx_calc_com_pbc(t_topology *top, rvec x[], t_pbc *pbc,
  */
 int
 gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc,
-                  int nrefat, atom_id index[], bool bMass, rvec xout)
+                  int nrefat, int index[], bool bMass, rvec xout)
 {
     if (bMass)
     {
@@ -367,7 +367,7 @@ gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc,
 
 
 int
-gmx_calc_cog_block(t_topology * /* top */, rvec x[], t_block *block, atom_id index[],
+gmx_calc_cog_block(t_topology * /* top */, rvec x[], t_block *block, int index[],
                    rvec xout[])
 {
     int                 b, i, ai;
@@ -398,7 +398,7 @@ gmx_calc_cog_block(t_topology * /* top */, rvec x[], t_block *block, atom_id ind
  * mass are calculated, and hence a topology with masses is required.
  */
 int
-gmx_calc_com_block(t_topology *top, rvec x[], t_block *block, atom_id index[],
+gmx_calc_com_block(t_topology *top, rvec x[], t_block *block, int index[],
                    rvec xout[])
 {
     int                 b, i, ai, d;
@@ -438,7 +438,7 @@ gmx_calc_com_block(t_topology *top, rvec x[], t_block *block, atom_id index[],
  * \returns    0 on success, EINVAL if \p top is NULL.
  */
 int
-gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[],
+gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block, int index[],
                      rvec fout[])
 {
     int                 b, i, ai, d;
@@ -470,7 +470,7 @@ gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[],
 }
 
 int
-gmx_calc_com_f_block(t_topology * /* top */, rvec f[], t_block *block, atom_id index[],
+gmx_calc_com_f_block(t_topology * /* top */, rvec f[], t_block *block, int index[],
                      rvec fout[])
 {
     for (int b = 0; b < block->nr; ++b)
@@ -502,7 +502,7 @@ gmx_calc_com_f_block(t_topology * /* top */, rvec f[], t_block *block, atom_id i
  * Other parameters are passed unmodified to these functions.
  */
 int
-gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block, atom_id index[],
+gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block, int index[],
                     bool bMass, rvec xout[])
 {
     if (bMass)
@@ -530,7 +530,7 @@ gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block, atom_id index[],
  * Other parameters are passed unmodified to these functions.
  */
 int
-gmx_calc_comg_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[],
+gmx_calc_comg_f_block(t_topology *top, rvec f[], t_block *block, int index[],
                       bool bMass, rvec fout[])
 {
     if (bMass)
index 0c51fa49ba522adb79e5f97631a6018fed7bd52f..be219a51e0b1115e8e310ef4052f64fe98921dfa 100644 (file)
@@ -75,7 +75,6 @@
 #define GMX_SELECTION_CENTEROFMASS_H
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 
 struct t_block;
 struct t_blocka;
@@ -93,13 +92,13 @@ struct t_topology;
  * \returns    0 on success.
  */
 int
-gmx_calc_cog(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout);
+gmx_calc_cog(t_topology *top, rvec x[], int nrefat, int index[], rvec xout);
 /** Calculate a single center of mass. */
 int
-gmx_calc_com(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout);
+gmx_calc_com(t_topology *top, rvec x[], int nrefat, int index[], rvec xout);
 /** Calculate force on a single center of geometry. */
 int
-gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout);
+gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, int index[], rvec fout);
 /*! \brief
  * Calculate force on a single center of mass.
  *
@@ -111,28 +110,28 @@ gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout
  * \returns    0 on success.
  */
 int
-gmx_calc_com_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout);
+gmx_calc_com_f(t_topology *top, rvec f[], int nrefat, int index[], rvec fout);
 /** Calculate a single center of mass/geometry. */
 int
-gmx_calc_comg(t_topology *top, rvec x[], int nrefat, atom_id index[],
+gmx_calc_comg(t_topology *top, rvec x[], int nrefat, int index[],
               bool bMass, rvec xout);
 /** Calculate force on a single center of mass/geometry. */
 int
-gmx_calc_comg_f(t_topology *top, rvec f[], int nrefat, atom_id index[],
+gmx_calc_comg_f(t_topology *top, rvec f[], int nrefat, int index[],
                 bool bMass, rvec fout);
 
 /** Calculate a single center of geometry iteratively, taking PBC into account. */
 int
 gmx_calc_cog_pbc(t_topology *top, rvec x[], t_pbc *pbc,
-                 int nrefat, atom_id index[], rvec xout);
+                 int nrefat, int index[], rvec xout);
 /** Calculate a single center of mass iteratively, taking PBC into account. */
 int
 gmx_calc_com_pbc(t_topology *top, rvec x[], t_pbc *pbc,
-                 int nrefat, atom_id index[], rvec xout);
+                 int nrefat, int index[], rvec xout);
 /** Calculate a single center of mass/geometry iteratively with PBC. */
 int
 gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc,
-                  int nrefat, atom_id index[], bool bMass, rvec xout);
+                  int nrefat, int index[], bool bMass, rvec xout);
 
 /*! \brief
  * Calculate centers of geometry for a blocked index.
@@ -146,15 +145,15 @@ gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc,
  */
 int
 gmx_calc_cog_block(t_topology *top, rvec x[], t_block *block,
-                   atom_id index[], rvec xout[]);
+                   int index[], rvec xout[]);
 /** Calculate centers of mass for a blocked index. */
 int
 gmx_calc_com_block(t_topology *top, rvec x[], t_block *block,
-                   atom_id index[], rvec xout[]);
+                   int index[], rvec xout[]);
 /** Calculate forces on centers of geometry for a blocked index. */
 int
 gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block,
-                     atom_id index[], rvec fout[]);
+                     int index[], rvec fout[]);
 /*! \brief
  * Calculate forces on centers of mass for a blocked index.
  *
@@ -167,15 +166,15 @@ gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block,
  */
 int
 gmx_calc_com_f_block(t_topology *top, rvec f[], t_block *block,
-                     atom_id index[], rvec fout[]);
+                     int index[], rvec fout[]);
 /** Calculate centers of mass/geometry for a blocked index. */
 int
 gmx_calc_comg_block(t_topology *top, rvec x[], t_block *block,
-                    atom_id index[], bool bMass, rvec xout[]);
+                    int index[], bool bMass, rvec xout[]);
 /** Calculate forces on centers of mass/geometry for a blocked index. */
 int
 gmx_calc_comg_f_block(t_topology *top, rvec f[], t_block *block,
-                      atom_id index[], bool bMass, rvec fout[]);
+                      int index[], bool bMass, rvec fout[]);
 /** Calculate centers of mass/geometry for a set of blocks; */
 int
 gmx_calc_comg_blocka(t_topology *top, rvec x[], t_blocka *block,
index 8aecd065e7ed9199bc4e74abb0a4d0d4e245aab9..742d05c2ec39a6477cb6be740361fe3df034f4c9 100644 (file)
@@ -333,7 +333,7 @@ gmx_ana_index_clear(gmx_ana_index_t *g)
  * No copy if \p index is made.
  */
 void
-gmx_ana_index_set(gmx_ana_index_t *g, int isize, atom_id *index, int nalloc)
+gmx_ana_index_set(gmx_ana_index_t *g, int isize, int *index, int nalloc)
 {
     g->isize        = isize;
     g->index        = index;
@@ -479,11 +479,11 @@ gmx_ana_index_check_range(gmx_ana_index_t *g, int natoms)
 static int
 cmp_atomid(const void *a, const void *b)
 {
-    if (*(atom_id *)a < *(atom_id *)b)
+    if (*(int *)a < *(int *)b)
     {
         return -1;
     }
-    if (*(atom_id *)a > *(atom_id *)b)
+    if (*(int *)a > *(int *)b)
     {
         return 1;
     }
index 9572a9b1bd036c22a61a24dd948c77f8bd3613ef..28c3620daa378d2700381f63b408faa148d5059b 100644 (file)
@@ -65,7 +65,6 @@
 
 #include <string>
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/block.h"
 
 namespace gmx
@@ -100,7 +99,7 @@ struct gmx_ana_index_t
     /** Number of atoms. */
     int                 isize;
     /** List of atoms. */
-    atom_id            *index;
+    int                *index;
     /** Number of items allocated for \p index. */
     int                 nalloc_index;
 };
@@ -227,7 +226,7 @@ void
 gmx_ana_index_clear(gmx_ana_index_t *g);
 /** Constructs a \c gmx_ana_index_t from given values. */
 void
-gmx_ana_index_set(gmx_ana_index_t *g, int isize, atom_id *index, int nalloc);
+gmx_ana_index_set(gmx_ana_index_t *g, int isize, int *index, int nalloc);
 /** Creates a simple index group from the first to the \p natoms'th atom. */
 void
 gmx_ana_index_init_simple(gmx_ana_index_t *g, int natoms);
index 65db38ac02a7f3e86aaf01b3d226511751ea35ac..456f78a2db2c41e55bdd711ddee5d1203f0d1ec2 100644 (file)
@@ -126,27 +126,27 @@ typedef struct swap_compartment
  */
 typedef struct swap_group
 {
-    int               nat;                    /**< Number of atoms in the group                    */
-    int               apm;                    /**< Number of atoms in each molecule                */
-    atom_id          *ind;                    /**< Global atom indices of the group                */
-    atom_id          *ind_loc;                /**< Local atom indices of the group                 */
-    int               nat_loc;                /**< Number of local group atoms                     */
-    int               nalloc_loc;             /**< Allocation size for ind_loc                     */
-    rvec             *xc;                     /**< Collective array of group atom positions        */
-    ivec             *xc_shifts;              /**< Current (collective) shifts                     */
-    ivec             *xc_eshifts;             /**< Extra shifts since last DD step                 */
-    rvec             *xc_old;                 /**< Old (collective) positions                      */
-    real             *qc;                     /**< Collective array of charges                     */
-    int              *c_ind_loc;              /**< Position of local atoms in the
-                                                   collective array, [0..nat_loc]                  */
-    real             *m;                      /**< Masses (can be omitted)                         */
-    unsigned char    *comp_from;              /**< (Collective) Stores from which compartment this
-                                                   atom has come. This way we keep track of through
-                                                   which channel an ion permeates (only used for
-                                                   the ion group)                                  */
-    unsigned char    *comp_now;               /**< In which compartment this ion is now            */
-    unsigned char    *channel_label;          /**< Which channel was passed at last by this ion?   */
-    rvec              center;                 /**< Center of the group; COM if masses are used     */
+    int               nat;                /**< Number of atoms in the group                    */
+    int               apm;                /**< Number of atoms in each molecule                */
+    int              *ind;                /**< Global atom indices of the group                */
+    int              *ind_loc;            /**< Local atom indices of the group                 */
+    int               nat_loc;            /**< Number of local group atoms                     */
+    int               nalloc_loc;         /**< Allocation size for ind_loc                     */
+    rvec             *xc;                 /**< Collective array of group atom positions        */
+    ivec             *xc_shifts;          /**< Current (collective) shifts                     */
+    ivec             *xc_eshifts;         /**< Extra shifts since last DD step                 */
+    rvec             *xc_old;             /**< Old (collective) positions                      */
+    real             *qc;                 /**< Collective array of charges                     */
+    int              *c_ind_loc;          /**< Position of local atoms in the
+                                               collective array, [0..nat_loc]                  */
+    real             *m;                  /**< Masses (can be omitted)                         */
+    unsigned char    *comp_from;          /**< (Collective) Stores from which compartment this
+                                               atom has come. This way we keep track of through
+                                               which channel an ion permeates (only used for
+                                               the ion group)                                  */
+    unsigned char    *comp_now;           /**< In which compartment this ion is now            */
+    unsigned char    *channel_label;      /**< Which channel was passed at last by this ion?   */
+    rvec              center;             /**< Center of the group; COM if masses are used     */
 } t_group;
 
 
@@ -1026,8 +1026,8 @@ static void check_swap_groups(t_swap *s, int nat, gmx_bool bVerbose)
 {
     t_group  *g;
     int       i, j;
-    atom_id  *nGroup    = NULL; /* This array counts for each atom in the MD system to
-                                   how many swap groups it belongs (should be 0 or 1!) */
+    int      *nGroup    = NULL; /* This array counts for each atom in the MD system to
+                                       how many swap groups it belongs (should be 0 or 1!) */
     int       ind       = -1;
     int       nMultiple = 0;    /* Number of atoms belonging to multiple groups */
 
index a576c18bd255f3e387ca2929996ec1caa3497724..a1c7806d4d0635a0bafd83841c7c61279a1e0527 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/legacyheaders/types/state.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/random/random.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/topology.h"
@@ -63,7 +62,7 @@
 
 #define RANGECHK(i, n) if ((i) >= (n)) gmx_fatal(FARGS, "Your index file contains atomnumbers (e.g. %d)\nthat are larger than the number of atoms in the tpr file (%d)", (i), (n))
 
-static gmx_bool *bKeepIt(int gnx, int natoms, atom_id index[])
+static gmx_bool *bKeepIt(int gnx, int natoms, int index[])
 {
     gmx_bool *b;
     int       i;
@@ -78,9 +77,9 @@ static gmx_bool *bKeepIt(int gnx, int natoms, atom_id index[])
     return b;
 }
 
-static atom_id *invind(int gnx, int natoms, atom_id index[])
+static int *invind(int gnx, int natoms, int index[])
 {
-    atom_id *inv;
+    int     *inv;
     int      i;
 
     snew(inv, natoms);
@@ -96,7 +95,7 @@ static atom_id *invind(int gnx, int natoms, atom_id index[])
 static void reduce_block(gmx_bool bKeep[], t_block *block,
                          const char *name)
 {
-    atom_id *index;
+    int     *index;
     int      i, j, newi, newj;
 
     snew(index, block->nr);
@@ -124,10 +123,10 @@ static void reduce_block(gmx_bool bKeep[], t_block *block,
     block->nr    = newi;
 }
 
-static void reduce_blocka(atom_id invindex[], gmx_bool bKeep[], t_blocka *block,
+static void reduce_blocka(int invindex[], gmx_bool bKeep[], t_blocka *block,
                           const char *name)
 {
-    atom_id *index, *a;
+    int     *index, *a;
     int      i, j, k, newi, newj;
 
     snew(index, block->nr);
@@ -160,7 +159,7 @@ static void reduce_blocka(atom_id invindex[], gmx_bool bKeep[], t_blocka *block,
     block->nra   = newj;
 }
 
-static void reduce_rvec(int gnx, atom_id index[], rvec vv[])
+static void reduce_rvec(int gnx, int index[], rvec vv[])
 {
     rvec *ptr;
     int   i;
@@ -177,7 +176,7 @@ static void reduce_rvec(int gnx, atom_id index[], rvec vv[])
     sfree(ptr);
 }
 
-static void reduce_atom(int gnx, atom_id index[], t_atom atom[], char ***atomname,
+static void reduce_atom(int gnx, int index[], t_atom atom[], char ***atomname,
                         int *nres, t_resinfo *resinfo)
 {
     t_atom    *ptr;
@@ -217,7 +216,7 @@ static void reduce_atom(int gnx, atom_id index[], t_atom atom[], char ***atomnam
     sfree(rinfo);
 }
 
-static void reduce_ilist(atom_id invindex[], gmx_bool bKeep[],
+static void reduce_ilist(int invindex[], gmx_bool bKeep[],
                          t_ilist *il, int nratoms, const char *name)
 {
     t_iatom *ia;
@@ -258,12 +257,12 @@ static void reduce_ilist(atom_id invindex[], gmx_bool bKeep[],
     }
 }
 
-static void reduce_topology_x(int gnx, atom_id index[],
+static void reduce_topology_x(int gnx, int index[],
                               gmx_mtop_t *mtop, rvec x[], rvec v[])
 {
     t_topology   top;
     gmx_bool    *bKeep;
-    atom_id     *invindex;
+    int         *invindex;
     int          i;
 
     top      = gmx_mtop_t_to_t_topology(mtop);
@@ -310,7 +309,7 @@ static void reduce_topology_x(int gnx, atom_id index[],
     mtop->natoms                 = top.atoms.nr;
 }
 
-static void zeroq(atom_id index[], gmx_mtop_t *mtop)
+static void zeroq(int index[], gmx_mtop_t *mtop)
 {
     int mt, i;
 
@@ -368,7 +367,7 @@ int gmx_convert_tpr(int argc, char *argv[])
     matrix            newbox;
     int               gnx;
     char             *grpname;
-    atom_id          *index = NULL;
+    int              *index = NULL;
     int               nre;
     gmx_enxnm_t      *enm     = NULL;
     t_enxframe       *fr_ener = NULL;
index b8aee023f5e80abefd3a8fd7da7d1889a50a940e..e84a9da319e85f1922f8eb07ce20085477eb1dcb 100644 (file)
@@ -36,7 +36,6 @@ file(GLOB TOPOLOGY_SOURCES *.cpp)
 set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TOPOLOGY_SOURCES} PARENT_SCOPE)
 
 gmx_install_headers(
-    atom_id.h
     atomprop.h
     atoms.h
     block.h
diff --git a/src/gromacs/topology/atom_id.h b/src/gromacs/topology/atom_id.h
deleted file mode 100644 (file)
index 8c866c1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 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.
- *
- * 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_TOPOLOGY_ATOM_ID_H
-#define GMX_TOPOLOGY_ATOM_ID_H
-
-typedef int         atom_id;      /* To indicate an atoms id         */
-#define NO_ATID     (atom_id)(~0) /* Use this to indicate invalid atid */
-
-#endif
index 8a3592175d6ba83f7cccc5f4bafd2fc95046ee86..196c661b7b25769cb0771d11a721d28020aa358d 100644 (file)
 #ifndef GMX_TOPOLOGY_BLOCK_H
 #define GMX_TOPOLOGY_BLOCK_H
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/* the block structure points into an array (usually of atom_ids).
+/* the block structure points into an array (usually of ints).
    It is a list of starting indices for objects of consecutive ids, such
    as molecules.
    For example, if this block denotes molecules, then the first molecule
@@ -55,16 +54,16 @@ extern "C" {
 typedef struct t_block
 {
     int      nr;           /* The number of blocks          */
-    atom_id *index;        /* Array of indices (dim: nr+1)  */
+    int     *index;        /* Array of indices (dim: nr+1)  */
     int      nalloc_index; /* The allocation size for index */
 } t_block;
 
 typedef struct t_blocka
 {
     int      nr;    /* The number of blocks              */
-    atom_id *index; /* Array of indices in a (dim: nr+1) */
+    int     *index; /* Array of indices in a (dim: nr+1) */
     int      nra;   /* The number of atoms               */
-    atom_id *a;     /* Array of atom numbers in each group  */
+    int     *a;     /* Array of atom numbers in each group  */
     /* (dim: nra)                           */
     /* Block i (0<=i<nr) runs from          */
     /* index[i] to index[i+1]-1. There will */
index 6a566f6a65b32594ede8d94501e4b5f5646f6ca2..07f7c10753831f16d2f687c6c1dff48e2ec7ac64 100644 (file)
@@ -38,7 +38,6 @@
 #define GMX_TOPOLOGY_IDEF_H
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/real.h"
 
 #ifdef __cplusplus
@@ -53,7 +52,7 @@ extern "C" {
 #define NR_CBTDIHS   6
 #define NR_FOURDIHS     4
 
-typedef atom_id t_iatom;
+typedef int t_iatom;
 
 /* this MUST correspond to the
    t_interaction_function[F_NRE] in gmxlib/ifunc.c */
index e3017779ef20edfef646e371a7f9f42e8cfc1a38..1c407dc8858002ffaf9fa5e32842f5bceefbb727 100644 (file)
@@ -120,7 +120,7 @@ void write_index(const char *outf, t_blocka *b, char **gnames, gmx_bool bDuplica
     gmx_fio_fclose(out);
 }
 
-void add_grp(t_blocka *b, char ***gnames, int nra, atom_id a[], const char *name)
+void add_grp(t_blocka *b, char ***gnames, int nra, int a[], const char *name)
 {
     int i;
 
@@ -139,7 +139,7 @@ void add_grp(t_blocka *b, char ***gnames, int nra, atom_id a[], const char *name
 
 /* compare index in `a' with group in `b' at `index',
    when `index'<0 it is relative to end of `b' */
-static gmx_bool grp_cmp(t_blocka *b, int nra, atom_id a[], int index)
+static gmx_bool grp_cmp(t_blocka *b, int nra, int a[], int index)
 {
     int i;
 
@@ -201,11 +201,11 @@ p_status(const char *const *restype, int nres,
 }
 
 
-static atom_id *
+static int *
 mk_aid(t_atoms *atoms, const char ** restype, const char * typestring, int *nra, gmx_bool bMatch)
-/* Make an array of atom_ids for all atoms with residuetypes matching typestring, or the opposite if bMatch is false */
+/* Make an array of ints for all atoms with residuetypes matching typestring, or the opposite if bMatch is false */
 {
-    atom_id *a;
+    int     *a;
     int      i;
     int      res;
 
@@ -239,7 +239,7 @@ static void analyse_other(const char ** restype, t_atoms *atoms,
     restp_t *restp = NULL;
     char   **attp  = NULL;
     char    *rname, *aname;
-    atom_id *aid, *aaid;
+    int     *aid, *aaid;
     int      i, j, k, l, resind, naid, naaid, natp, nrestp = 0;
 
     for (i = 0; (i < atoms->nres); i++)
@@ -407,7 +407,7 @@ static void analyse_prot(const char ** restype, t_atoms *atoms,
     const int   num_index_groups = asize(constructing_data);
 
     int         n, j;
-    atom_id    *aid;
+    int        *aid;
     int         nra, npres;
     gmx_bool    match;
     char        ndx_name[STRLEN], *atnm;
@@ -577,7 +577,7 @@ void analyse(t_atoms *atoms, t_blocka *gb, char ***gn, gmx_bool bASK, gmx_bool b
 {
     gmx_residuetype_t*rt = NULL;
     char             *resnm;
-    atom_id          *aid;
+    int              *aid;
     const char    **  restype;
     int               nra;
     int               i, k;
@@ -729,7 +729,7 @@ void analyse(t_atoms *atoms, t_blocka *gb, char ***gn, gmx_bool bASK, gmx_bool b
 }
 
 
-void check_index(char *gname, int n, atom_id index[], char *traj, int natoms)
+void check_index(char *gname, int n, int index[], char *traj, int natoms)
 {
     int i;
 
@@ -939,7 +939,7 @@ static int qgroup(int *a, int ngrps, char **grpname)
 }
 
 static void rd_groups(t_blocka *grps, char **grpname, char *gnames[],
-                      int ngrps, int isize[], atom_id *index[], int grpnr[])
+                      int ngrps, int isize[], int *index[], int grpnr[])
 {
     int i, j, gnr1;
 
@@ -982,7 +982,7 @@ static void rd_groups(t_blocka *grps, char **grpname, char *gnames[],
 }
 
 void rd_index(const char *statfile, int ngrps, int isize[],
-              atom_id *index[], char *grpnames[])
+              int *index[], char *grpnames[])
 {
     char    **gnames;
     t_blocka *grps;
@@ -998,7 +998,7 @@ void rd_index(const char *statfile, int ngrps, int isize[],
 }
 
 void rd_index_nrs(char *statfile, int ngrps, int isize[],
-                  atom_id *index[], char *grpnames[], int grpnr[])
+                  int *index[], char *grpnames[], int grpnr[])
 {
     char    **gnames;
     t_blocka *grps;
@@ -1013,7 +1013,7 @@ void rd_index_nrs(char *statfile, int ngrps, int isize[],
 }
 
 void get_index(t_atoms *atoms, const char *fnm, int ngrps,
-               int isize[], atom_id *index[], char *grpnames[])
+               int isize[], int *index[], char *grpnames[])
 {
     char    ***gnames;
     t_blocka  *grps = NULL;
index ce87595d28bd8fd45b93df2ff002415a5ce232ed..d21ead00a36c2c92f6c915caeace27479413a939 100644 (file)
@@ -39,7 +39,6 @@
 
 #include <stdio.h>
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
@@ -49,7 +48,7 @@ extern "C" {
 struct t_atoms;
 struct t_blocka;
 
-void check_index(char *gname, int n, atom_id index[],
+void check_index(char *gname, int n, int index[],
                  char *traj, int natoms);
 /* Checks if any index is smaller than zero or larger than natoms,
  * if so a fatal_error is given with the gname (if gname=NULL, "Index" is used)
@@ -60,7 +59,7 @@ struct t_blocka *init_index(const char *gfile, char ***grpname);
 /* Lower level routine than the next */
 
 void rd_index(const char *statfile, int ngrps, int isize[],
-              atom_id *index[], char *grpnames[]);
+              int *index[], char *grpnames[]);
 /* Assume the group file is generated, so the
  * format need not be user-friendly. The format is:
  * nr of groups, total nr of atoms
@@ -68,7 +67,7 @@ void rd_index(const char *statfile, int ngrps, int isize[],
  *
  * The function opens a file, reads ngrps groups, asks the
  * user for group numbers, and puts the resulting sizes in
- * isize, the atom_id s in index and the names of
+ * isize, the int s in index and the names of
  * the groups in grpnames.
  *
  * It is also assumed, that when ngrps groups are requested
@@ -77,11 +76,11 @@ void rd_index(const char *statfile, int ngrps, int isize[],
  */
 
 void rd_index_nrs(char *statfile, int ngrps, int isize[],
-                  atom_id *index[], char *grpnames[], int grpnr[]);
+                  int *index[], char *grpnames[], int grpnr[]);
 /* the same but also reads the number of the selected group*/
 
 void get_index(struct t_atoms *atoms, const char *fnm, int ngrps,
-               int isize[], atom_id *index[], char *grpnames[]);
+               int isize[], int *index[], char *grpnames[]);
 /* Does the same as rd_index, but if the fnm pointer is NULL it
  * will not read from fnm, but it will make default index groups
  * for the atoms in *atoms.
@@ -91,7 +90,7 @@ typedef struct {
     int               maxframe;
     char            **grpname;
     struct t_blocka  *clust;
-    atom_id          *inv_clust;
+    int              *inv_clust;
 } t_cluster_ndx;
 
 t_cluster_ndx *cluster_index(FILE *fplog, const char *ndx);
@@ -100,7 +99,7 @@ t_cluster_ndx *cluster_index(FILE *fplog, const char *ndx);
 void write_index(const char *outf, struct t_blocka *b, char **gnames, gmx_bool bDuplicate, int natoms);
 /* Writes index blocks to outf (writes an indexfile) */
 
-void add_grp(struct t_blocka *b, char ***gnames, int nra, atom_id a[], const char *name);
+void add_grp(struct t_blocka *b, char ***gnames, int nra, int a[], const char *name);
 /* Ads group a with name name to block b and namelist gnames */
 
 void analyse(struct t_atoms *atoms, struct t_blocka *gb, char ***gn,
index 9ef722b89daf1f2d0062c34d79b4cb97db03a76d..3e5e6c069da559b4e2a9a16ef6835df8e9c7d18b 100644 (file)
 
 #include "invblock.h"
 
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
-atom_id *make_invblock(const t_block *block, int nr)
+int *make_invblock(const t_block *block, int nr)
 {
     int      i, j;
-    atom_id *invblock;
+    int     *invblock;
 
     snew(invblock, nr+1);
     /* Mark unused numbers */
     for (i = 0; i <= nr; i++)
     {
-        invblock[i] = NO_ATID;
+        invblock[i] = -1;
     }
     for (i = 0; (i < block->nr); i++)
     {
         for (j = block->index[i]; (j < block->index[i+1]); j++)
         {
-            if (invblock[j] == NO_ATID)
+            if (invblock[j] == -1)
             {
                 invblock[j] = i;
             }
@@ -74,22 +73,22 @@ atom_id *make_invblock(const t_block *block, int nr)
     return invblock;
 }
 
-atom_id *make_invblocka(const t_blocka *block, int nr)
+int *make_invblocka(const t_blocka *block, int nr)
 {
     int      i, j;
-    atom_id *invblock;
+    int     *invblock;
 
     snew(invblock, nr+1);
     /* Mark unused numbers */
     for (i = 0; i <= nr; i++)
     {
-        invblock[i] = NO_ATID;
+        invblock[i] = -1;
     }
     for (i = 0; (i < block->nr); i++)
     {
         for (j = block->index[i]; (j < block->index[i+1]); j++)
         {
-            if (invblock[block->a[j]] == NO_ATID)
+            if (invblock[block->a[j]] == -1)
             {
                 invblock[block->a[j]] = i;
             }
index 225f3beec87e9f9adf6b3ab501384f1a6ade3927..875d72ec172e0783e6532271b632e3f7cc2aaa57 100644 (file)
 #ifndef GMX_TOPOLOGY_INVBLOCK_H
 #define GMX_TOPOLOGY_INVBLOCK_H
 
-#include "gromacs/topology/atom_id.h"
 
 struct t_block;
 struct t_blocka;
 
-atom_id *make_invblock(const struct t_block *block, int nr);
+int *make_invblock(const struct t_block *block, int nr);
 /* Inverse the block structure. nr is the maximum entry in the inversed
  * array, and therefore the dimension of the returned array
  */
 
-atom_id *make_invblocka(const struct t_blocka *block, int nr);
+int *make_invblocka(const struct t_blocka *block, int nr);
 /* Inverse the block structure. nr is the maximum entry in the inversed
  * array, and therefore the dimension of the returned array
  */
index a60a96ccc8cc5372c72d431e72461d10ee48b092..4fb4b53d809e9c334983016f5b2387abab4a474c 100644 (file)
@@ -93,9 +93,9 @@ namespace
 struct t_conect
 {
     //! Index of the second nearest neighbor dot.
-    atom_id  aa;
+    int      aa;
     //! Index of the nearest neighbor dot.
-    atom_id  ab;
+    int      ab;
     //! Squared distance to `aa`.
     real     d2a;
     //! Squared distance to `ab`.
@@ -110,14 +110,14 @@ struct t_conect
  * \param[in]     j  Index of the other surface dot to add to the array.
  * \param[in]     d2 Squared distance between `i` and `j`.
  */
-void add_rec(t_conect c[], atom_id i, atom_id j, real d2)
+void add_rec(t_conect c[], int i, int j, real d2)
 {
-    if (c[i].aa == NO_ATID)
+    if (c[i].aa == -1)
     {
         c[i].aa  = j;
         c[i].d2a = d2;
     }
-    else if (c[i].ab == NO_ATID)
+    else if (c[i].ab == -1)
     {
         c[i].ab  = j;
         c[i].d2b = d2;
@@ -167,7 +167,7 @@ void do_conect(const char *fn, int n, rvec x[])
     snew(c, n);
     for (i = 0; (i < n); i++)
     {
-        c[i].aa = c[i].ab = NO_ATID;
+        c[i].aa = c[i].ab = -1;
     }
 
     for (i = 0; (i < n); i++)
@@ -183,7 +183,7 @@ void do_conect(const char *fn, int n, rvec x[])
     fp = gmx_ffopen(fn, "a");
     for (i = 0; (i < n); i++)
     {
-        if ((c[i].aa == NO_ATID) || (c[i].ab == NO_ATID))
+        if ((c[i].aa == -1) || (c[i].ab == -1))
         {
             fprintf(stderr, "Warning dot %d has no conections\n", i+1);
         }
index bd681525db1bfc44993e91ca2999d733e01588cc..e5173c8665ed06945c70663b002bae679e823b28 100644 (file)
@@ -555,7 +555,7 @@ nsc_dclm_pbc(const rvec *coords, const ConstArrayRef<real> &radius, int nat,
              real *value_of_area, real **at_area,
              real *value_of_vol,
              real **lidots, int *nu_dots,
-             atom_id index[], AnalysisNeighborhood *nb,
+             int index[], AnalysisNeighborhood *nb,
              const t_pbc *pbc)
 {
     const real dotarea = FOURPI/(real) n_dot;
@@ -799,7 +799,7 @@ void SurfaceAreaCalculator::setCalculateSurfaceDots(bool bDots)
 
 void SurfaceAreaCalculator::calculate(
         const rvec *x, const t_pbc *pbc,
-        int nat, atom_id index[], int flags, real *area, real *volume,
+        int nat, int index[], int flags, real *area, real *volume,
         real **at_area, real **lidots, int *n_dots) const
 {
     flags |= impl_->flags_;
index 19b3f00e2266dd0081e743d79691bc5a7f8b28ae..4a530d5dd8e718f07b1481fd6a9c226968b49840 100644 (file)
@@ -38,7 +38,6 @@
 #define GMX_TRAJECTORYANALYSIS_SURFACEAREA_H
 
 #include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/classhelpers.h"
 #include "gromacs/utility/real.h"
@@ -169,7 +168,7 @@ class SurfaceAreaCalculator
          * outputs.
          */
         void calculate(const rvec *x, const t_pbc *pbc,
-                       int nat, atom_id index[], int flags, real *area,
+                       int nat, int index[], int flags, real *area,
                        real *volume, real **at_area,
                        real **lidots, int *n_dots) const;
 
index 3c0471be7a216bb6e4799434a83822f0113ef6e1..75d4646d075c87bf3e3b26bf7dd9db72fe288cb6 100644 (file)
 
 /* information about scaling center */
 typedef struct {
-    rvec      xmin;       /* smallest coordinates of all embedded molecules */
-    rvec      xmax;       /* largest coordinates of all embedded molecules */
-    rvec     *geom_cent;  /* scaling center of each independent molecule to embed */
-    int       pieces;     /* number of molecules to embed independently */
-    int      *nidx;       /* n atoms for every independent embedded molecule (index in subindex) */
-    atom_id **subindex;   /* atomids for independent molecule *
-                           * atoms of piece i run from subindex[i][0] to subindex[i][nidx[i]] */
+    rvec      xmin;      /* smallest coordinates of all embedded molecules */
+    rvec      xmax;      /* largest coordinates of all embedded molecules */
+    rvec     *geom_cent; /* scaling center of each independent molecule to embed */
+    int       pieces;    /* number of molecules to embed independently */
+    int      *nidx;      /* n atoms for every independent embedded molecule (index in subindex) */
+    int     **subindex;  /* atomids for independent molecule *
+                          * atoms of piece i run from subindex[i][0] to subindex[i][nidx[i]] */
 } pos_ins_t;
 
 /* variables needed in do_md */
@@ -379,7 +379,7 @@ static int init_mem_at(mem_t *mem_p, gmx_mtop_t *mtop, rvec *r, matrix box, pos_
     t_block *mem_a;
     real     z, zmin, zmax, mem_area;
     gmx_bool bNew;
-    atom_id *mol_id;
+    int     *mol_id;
     int      type = 0, block = 0;
 
     nmol  = count = 0;
@@ -691,7 +691,7 @@ static void rm_group(gmx_groups_t *groups, gmx_mtop_t *mtop, rm_t *rm_p, t_state
 {
     int             i, j, k, n, rm, mol_id, at, block;
     rvec           *x_tmp, *v_tmp;
-    atom_id        *list, *new_mols;
+    int            *list, *new_mols;
     unsigned char  *new_egrp[egcNR];
     gmx_bool        bRM;
     int             RMmolblock;
index 85a64b2b1923ff5311391cc94e0ace27c5e12b93..a600774032cdca3b9c6d24203794d30f4f31a646 100644 (file)
@@ -65,7 +65,7 @@
 #include "3dview.h"
 #include "nmol.h"
 
-static void add_object(t_manager *man, eObject eO, atom_id ai, atom_id aj)
+static void add_object(t_manager *man, eObject eO, int ai, int aj)
 {
     srenew(man->obj, ++man->nobj);
     man->obj[man->nobj-1].eO    = eO;
@@ -140,7 +140,7 @@ static void add_bpl(t_manager *man, t_idef *idef, bool bB[])
     }
 }
 
-static atom_id which_atom(t_manager *man, int x, int y)
+static int which_atom(t_manager *man, int x, int y)
 {
 #define DELTA 5
     int  i;
@@ -152,19 +152,19 @@ static atom_id which_atom(t_manager *man, int x, int y)
         {
             if (man->bVis[i])
             {
-                return (atom_id) i;
+                return (int) i;
             }
         }
     }
-    return NO_ATID;
+    return -1;
 }
 
 static void do_label(t_x11 *x11, t_manager *man, int x, int y, bool bSet)
 {
-    atom_id         ai;
+    int             ai;
     unsigned long   col;
 
-    if ((ai = which_atom(man, x, y)) != NO_ATID)
+    if ((ai = which_atom(man, x, y)) != -1)
     {
         x = man->ix[ai][XX];
         y = man->ix[ai][YY];
@@ -278,7 +278,7 @@ void set_file(t_x11 *x11, t_manager *man, const char *trajectory,
     {
         if (!bB[i])
         {
-            add_object(man, eOSingle, (atom_id) i, 0);
+            add_object(man, eOSingle, (int) i, 0);
         }
     }
     sfree(bB);
@@ -702,7 +702,7 @@ void done_man(t_x11 *x11, t_manager *man)
 void do_filter(t_x11 *x11, t_manager *man, t_filter *filter)
 {
     int      i;
-    atom_id  j;
+    int      j;
 
     for (i = 0; (i < man->natom); i++)
     {
index 9a12d45d13a969dbfbdd3fa4bcd8abb8660b1109..f5a7d551fc8b1cd72dfb9697edfece0db5634924 100644 (file)
@@ -88,7 +88,7 @@ typedef struct {
     eObject           eO;     /* The type of object                    */
     eVisible          eV;     /* Visibility status of the object       */
     unsigned long     color;  /* The color (only when eV==evSpecial)    */
-    atom_id           ai, aj; /* The atom_id for i (and j if bond)     */
+    int               ai, aj; /* The int for i (and j if bond) */
     real              z;      /* The Z-coordinate for depht cueing     */
 } t_object;
 
index c9b48493deed5728e822f16933e71f15f59ac30d..a2c605462985fe3bbe886df287dbd0526ea5f1a5 100644 (file)
@@ -50,7 +50,7 @@
 
 #define MSIZE 4
 
-static void ps_draw_atom(t_psdata ps, atom_id ai, iv2 vec2[], char **atomnm[])
+static void ps_draw_atom(t_psdata ps, int ai, iv2 vec2[], char **atomnm[])
 {
     int xi, yi;
 
@@ -97,7 +97,7 @@ static bool local_pbc_dx(rvec x1, rvec x2)
 }
 
 static void ps_draw_bond(t_psdata ps,
-                         atom_id ai, atom_id aj, iv2 vec2[],
+                         int ai, int aj, iv2 vec2[],
                          rvec x[], char **atomnm[])
 {
     char    *ic, *jc;
index 3633b79e34bc2c4c50bd20a07e644cb603d5a253..42ef86b6f9e2962974f9593114aa8a730db76494 100644 (file)
@@ -176,7 +176,7 @@ void done_mw(t_x11 *x11, t_molwin *mw)
 }
 
 static void draw_atom(Display *disp, Window w, GC gc,
-                      atom_id ai, iv2 vec2[], unsigned long col[], int size[],
+                      int ai, iv2 vec2[], unsigned long col[], int size[],
                       bool bBall, bool bPlus)
 {
     int xi, yi;
@@ -240,7 +240,7 @@ static bool local_pbc_dx(rvec x1, rvec x2)
 }
 
 static void draw_bond(Display *disp, Window w, GC gc,
-                      atom_id ai, atom_id aj, iv2 vec2[],
+                      int ai, int aj, iv2 vec2[],
                       rvec x[], unsigned long col[], int size[], bool bBalls)
 {
     unsigned long   ic, jc;
@@ -331,7 +331,7 @@ void z_fill(t_manager *man, real *zz)
 int filter_vis(t_manager *man)
 {
     int          i, nobj, nvis, nhide;
-    atom_id      ai;
+    int          ai;
     bool         bAdd, *bVis;
     t_object    *obj;
     t_object    *newobj;