#include <cmath>
#include <cstring>
+#include "gromacs/gmxpreprocess/grompp-impl.h"
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/gmxpreprocess/topdirs.h"
#include "gromacs/gmxpreprocess/toputil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
-typedef struct gpp_atomtype {
+struct gpp_atomtype
+{
int nr; /* The number of atomtypes */
t_atom *atom; /* Array of atoms */
char ***atomname; /* Names of the atomtypes */
t_param *nb; /* Nonbonded force default params */
int *bondatomtype; /* The bond_atomtype for each atomtype */
int *atomnumber; /* Atomic number, used for QM/MM */
-} t_gpp_atomtype;
+};
-int get_atomtype_type(const char *str, gpp_atomtype_t ga)
+int get_atomtype_type(const char *str, gpp_atomtype *ga)
{
int i;
return NOTSET;
}
-int get_atomtype_ntypes(gpp_atomtype_t ga)
+int get_atomtype_ntypes(gpp_atomtype *ga)
{
return ga->nr;
}
-char *get_atomtype_name(int nt, gpp_atomtype_t ga)
+char *get_atomtype_name(int nt, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return *(ga->atomname[nt]);
}
-real get_atomtype_massA(int nt, gpp_atomtype_t ga)
+real get_atomtype_massA(int nt, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return ga->atom[nt].m;
}
-real get_atomtype_massB(int nt, gpp_atomtype_t ga)
+real get_atomtype_massB(int nt, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return ga->atom[nt].mB;
}
-real get_atomtype_qA(int nt, gpp_atomtype_t ga)
+real get_atomtype_qA(int nt, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return ga->atom[nt].q;
}
-real get_atomtype_qB(int nt, gpp_atomtype_t ga)
+real get_atomtype_qB(int nt, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return ga->atom[nt].qB;
}
-int get_atomtype_ptype(int nt, gpp_atomtype_t ga)
+int get_atomtype_ptype(int nt, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return ga->bondatomtype[nt];
}
-int get_atomtype_atomnumber(int nt, gpp_atomtype_t ga)
+int get_atomtype_atomnumber(int nt, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return ga->atomnumber[nt];
}
-real get_atomtype_nbparam(int nt, int param, gpp_atomtype_t ga)
+real get_atomtype_nbparam(int nt, int param, gpp_atomtype *ga)
{
if ((nt < 0) || (nt >= ga->nr))
{
return ga->nb[nt].c[param];
}
-gpp_atomtype_t init_atomtype()
+gpp_atomtype *init_atomtype()
{
- gpp_atomtype_t ga;
+ gpp_atomtype *ga;
snew(ga, 1);
return ga;
}
-int set_atomtype(int nt, gpp_atomtype_t ga, t_symtab *tab,
+int set_atomtype(int nt, gpp_atomtype *ga, t_symtab *tab,
t_atom *a, const char *name, t_param *nb,
int bondatomtype, int atomnumber)
{
return nt;
}
-int add_atomtype(gpp_atomtype_t ga, t_symtab *tab,
+int add_atomtype(gpp_atomtype *ga, t_symtab *tab,
t_atom *a, const char *name, t_param *nb,
int bondatomtype, int atomnumber)
{
}
}
-void print_at (FILE * out, gpp_atomtype_t ga)
+void print_at (FILE * out, gpp_atomtype *ga)
{
int i;
t_atom *atom = ga->atom;
fprintf (out, "\n");
}
-void done_atomtype(gpp_atomtype_t ga)
+void done_atomtype(gpp_atomtype *ga)
{
sfree(ga->atom);
sfree(ga->atomname);
sfree(ga);
}
-static int search_atomtypes(gpp_atomtype_t ga, int *n, int typelist[],
+static int search_atomtypes(gpp_atomtype *ga, int *n, int typelist[],
int thistype,
t_param param[], int ftype)
{
void renum_atype(t_params plist[], gmx_mtop_t *mtop,
int *wall_atomtype,
- gpp_atomtype_t ga, bool bVerbose)
+ gpp_atomtype *ga, bool bVerbose)
{
int i, j, k, l, mi, mj, nat, nrfp, ftype, ntype;
t_atoms *atoms;
sfree(typelist);
}
-void copy_atomtype_atomtypes(gpp_atomtype_t ga, t_atomtypes *atomtypes)
+void copy_atomtype_atomtypes(gpp_atomtype *ga, t_atomtypes *atomtypes)
{
int i, ntype;