#include "hackblock.h"
-void add_param(InteractionTypeParameters *ps,
+void add_param(InteractionsOfType *ps,
int ai,
int aj,
gmx::ArrayRef<const real> c,
std::vector<int> atoms = {ai, aj};
std::vector<real> forceParm(c.begin(), c.end());
- ps->interactionTypes.emplace_back(InteractionType(atoms, forceParm, s ? s : ""));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm, s ? s : ""));
}
-void add_imp_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al, real c0, real c1,
+void add_imp_param(InteractionsOfType *ps, int ai, int aj, int ak, int al, real c0, real c1,
const char *s)
{
std::vector<int> atoms = {ai, aj, ak, al};
std::vector<real> forceParm = {c0, c1};
- ps->interactionTypes.emplace_back(InteractionType(atoms, forceParm, s ? s : ""));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm, s ? s : ""));
}
-void add_dih_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al, real c0, real c1,
+void add_dih_param(InteractionsOfType *ps, int ai, int aj, int ak, int al, real c0, real c1,
real c2, const char *s)
{
std::vector<int> atoms = {ai, aj, ak, al};
std::vector<real> forceParm = {c0, c1, c2};
- ps->interactionTypes.emplace_back(InteractionType(atoms, forceParm, s ? s : ""));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm, s ? s : ""));
}
-void add_cmap_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al, int am, const char *s)
+void add_cmap_param(InteractionsOfType *ps, int ai, int aj, int ak, int al, int am, const char *s)
{
std::vector<int> atoms = {ai, aj, ak, al, am};
- ps->interactionTypes.emplace_back(InteractionType(atoms, {}, s ? s : ""));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, {}, s ? s : ""));
}
-void add_vsite2_atoms(InteractionTypeParameters *ps, int ai, int aj, int ak)
+void add_vsite2_atoms(InteractionsOfType *ps, int ai, int aj, int ak)
{
std::vector<int> atoms = {ai, aj, ak};
- ps->interactionTypes.emplace_back(InteractionType(atoms, {}));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, {}));
}
-void add_vsite2_param(InteractionTypeParameters *ps, int ai, int aj, int ak, real c0)
+void add_vsite2_param(InteractionsOfType *ps, int ai, int aj, int ak, real c0)
{
std::vector<int> atoms = {ai, aj, ak};
std::vector<real> forceParm = {c0};
- ps->interactionTypes.emplace_back(InteractionType(atoms, forceParm));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm));
}
-void add_vsite3_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al,
+void add_vsite3_param(InteractionsOfType *ps, int ai, int aj, int ak, int al,
real c0, real c1)
{
std::vector<int> atoms = {ai, aj, ak, al};
std::vector<real> forceParm = {c0, c1};
- ps->interactionTypes.emplace_back(InteractionType(atoms, forceParm));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm));
}
-void add_vsite3_atoms(InteractionTypeParameters *ps, int ai, int aj, int ak, int al, bool bSwapParity)
+void add_vsite3_atoms(InteractionsOfType *ps, int ai, int aj, int ak, int al, bool bSwapParity)
{
std::vector<int> atoms = {ai, aj, ak, al};
- ps->interactionTypes.emplace_back(InteractionType(atoms, {}));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, {}));
if (bSwapParity)
{
}
}
-void add_vsite4_atoms(InteractionTypeParameters *ps, int ai, int aj, int ak, int al, int am)
+void add_vsite4_atoms(InteractionsOfType *ps, int ai, int aj, int ak, int al, int am)
{
std::vector<int> atoms = {ai, aj, ak, al, am};
- ps->interactionTypes.emplace_back(InteractionType(atoms, {}));
+ ps->interactionTypes.emplace_back(InteractionOfType(atoms, {}));
}
int search_jtype(const PreprocessResidue &localPpResidue, const char *name, bool bNterm)
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/real.h"
-struct InteractionTypeParameters;
+struct InteractionsOfType;
struct PreprocessResidue;
-void add_param(InteractionTypeParameters *ps,
+void add_param(InteractionsOfType *ps,
int ai,
int aj,
gmx::ArrayRef<const real> c,
const char *s);
-void add_imp_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al,
+void add_imp_param(InteractionsOfType *ps, int ai, int aj, int ak, int al,
real c0, real c1, const char *s);
-void add_dih_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al,
+void add_dih_param(InteractionsOfType *ps, int ai, int aj, int ak, int al,
real c0, real c1, real c2, const char *s);
-void add_cmap_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al, int am,
+void add_cmap_param(InteractionsOfType *ps, int ai, int aj, int ak, int al, int am,
const char *s);
-void add_vsite2_atoms(InteractionTypeParameters *ps, int ai, int aj, int ak);
+void add_vsite2_atoms(InteractionsOfType *ps, int ai, int aj, int ak);
-void add_vsite3_atoms(InteractionTypeParameters *ps, int ai, int aj, int ak, int al,
+void add_vsite3_atoms(InteractionsOfType *ps, int ai, int aj, int ak, int al,
bool bSwapParity);
-void add_vsite2_param(InteractionTypeParameters *ps, int ai, int aj, int ak, real c0);
+void add_vsite2_param(InteractionsOfType *ps, int ai, int aj, int ak, real c0);
-void add_vsite3_param(InteractionTypeParameters *ps, int ai, int aj, int ak, int al,
+void add_vsite3_param(InteractionsOfType *ps, int ai, int aj, int ak, int al,
real c0, real c1);
-void add_vsite4_atoms(InteractionTypeParameters *ps, int ai, int aj, int ak, int al,
+void add_vsite4_atoms(InteractionsOfType *ps, int ai, int aj, int ak, int al,
int am);
int search_jtype(const PreprocessResidue &localPpResidue, const char *name, bool bFirstRes);
}
}
-static void enter_function(const InteractionTypeParameters *p, t_functype ftype, int comb, real reppow,
+static void enter_function(const InteractionsOfType *p, t_functype ftype, int comb, real reppow,
gmx_ffparams_t *ffparams, InteractionList *il,
bool bNB, bool bAppend)
{
}
}
-void convertInteractionTypeParameters(int atnr, gmx::ArrayRef<const InteractionTypeParameters> nbtypes,
- gmx::ArrayRef<const MoleculeInformation> mi,
- const MoleculeInformation *intermolecular_interactions,
- int comb, double reppow, real fudgeQQ,
- gmx_mtop_t *mtop)
+void convertInteractionsOfType(int atnr, gmx::ArrayRef<const InteractionsOfType> nbtypes,
+ gmx::ArrayRef<const MoleculeInformation> mi,
+ const MoleculeInformation *intermolecular_interactions,
+ int comb, double reppow, real fudgeQQ,
+ gmx_mtop_t *mtop)
{
int i;
unsigned long flags;
{
molt->ilist[i].iatoms.clear();
- gmx::ArrayRef<const InteractionTypeParameters> plist = mi[mt].plist;
+ gmx::ArrayRef<const InteractionsOfType> interactions = mi[mt].interactions;
flags = interaction_function[i].flags;
if ((i != F_LJ) && (i != F_BHAM) && ((flags & IF_BOND) ||
(flags & IF_VSITE) ||
(flags & IF_CONSTRAINT)))
{
- enter_function(&(plist[i]), static_cast<t_functype>(i), comb, reppow,
+ enter_function(&(interactions[i]), static_cast<t_functype>(i), comb, reppow,
ffp, &molt->ilist[i],
FALSE, (i == F_POSRES || i == F_FBPOSRES));
}
{
(*mtop->intermolecular_ilist)[i].iatoms.clear();
- gmx::ArrayRef<const InteractionTypeParameters> plist = intermolecular_interactions->plist;
+ gmx::ArrayRef<const InteractionsOfType> interactions = intermolecular_interactions->interactions;
- if (!plist[i].interactionTypes.empty())
+ if (!interactions[i].interactionTypes.empty())
{
flags = interaction_function[i].flags;
/* For intermolecular interactions we (currently)
}
else
{
- enter_function(&(plist[i]), static_cast<t_functype>(i), comb, reppow,
+ enter_function(&(interactions[i]), static_cast<t_functype>(i), comb, reppow,
ffp, &(*mtop->intermolecular_ilist)[i],
FALSE, FALSE);
struct gmx_mtop_t;
struct MoleculeInformation;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
-void convertInteractionTypeParameters(int atnr, gmx::ArrayRef<const InteractionTypeParameters> nbtypes,
- gmx::ArrayRef<const MoleculeInformation> mi,
- const MoleculeInformation *intermolecular_interactions,
- int comb, double reppow, real fudgeQQ,
- gmx_mtop_t *mtop);
+void convertInteractionsOfType(int atnr, gmx::ArrayRef<const InteractionsOfType> nbtypes,
+ gmx::ArrayRef<const MoleculeInformation> mi,
+ const MoleculeInformation *intermolecular_interactions,
+ int comb, double reppow, real fudgeQQ,
+ gmx_mtop_t *mtop);
#endif
#include "resall.h"
#define DIHEDRAL_WAS_SET_IN_RTP 0
-static bool was_dihedral_set_in_rtp(const InteractionType &dih)
+static bool was_dihedral_set_in_rtp(const InteractionOfType &dih)
{
// This is a bad way to check this, but I don't know how to make this better now.
gmx::ArrayRef<const real> forceParam = dih.forceParam();
return forceParam[MAXFORCEPARAM-1] == DIHEDRAL_WAS_SET_IN_RTP;
}
-typedef bool (*peq)(const InteractionType &p1, const InteractionType &p2);
+typedef bool (*peq)(const InteractionOfType &p1, const InteractionOfType &p2);
-static bool acomp(const InteractionType &a1, const InteractionType &a2)
+static bool acomp(const InteractionOfType &a1, const InteractionOfType &a2)
{
int ac;
}
}
-static bool pcomp(const InteractionType &a1, const InteractionType &a2)
+static bool pcomp(const InteractionOfType &a1, const InteractionOfType &a2)
{
int pc;
}
}
-static bool dcomp(const InteractionType &d1, const InteractionType &d2)
+static bool dcomp(const InteractionOfType &d1, const InteractionOfType &d2)
{
int dc;
}
-static bool is_dihedral_on_same_bond(const InteractionType &p1, const InteractionType &p2)
+static bool is_dihedral_on_same_bond(const InteractionOfType &p1, const InteractionOfType &p2)
{
return ((p1.aj() == p2.aj()) && (p1.ak() == p2.ak())) ||
((p1.aj() == p2.ak()) && (p1.ak() == p2.aj()));
}
-static bool preq(const InteractionType &p1, const InteractionType &p2)
+static bool preq(const InteractionOfType &p1, const InteractionOfType &p2)
{
return (p1.ai() == p2.ai()) && (p1.aj() == p2.aj());
}
-static void rm2par(std::vector<InteractionType> *p, peq eq)
+static void rm2par(std::vector<InteractionOfType> *p, peq eq)
{
if (p->empty())
{
}
}
-static void cppar(gmx::ArrayRef<const InteractionType> types,
- gmx::ArrayRef<InteractionTypeParameters> plist,
- int ftype)
+static void cppar(gmx::ArrayRef<const InteractionOfType> types,
+ gmx::ArrayRef<InteractionsOfType> plist,
+ int ftype)
{
/* Keep old stuff */
for (const auto &type : types)
}
}
-static bool idcomp(const InteractionType &a, const InteractionType &b)
+static bool idcomp(const InteractionOfType &a, const InteractionOfType &b)
{
int d;
}
}
-static void sort_id(gmx::ArrayRef<InteractionType> ps)
+static void sort_id(gmx::ArrayRef<InteractionOfType> ps)
{
if (ps.size() > 1)
{
/* Clean up the dihedrals (both generated and read from the .rtp
* file). */
-static std::vector<InteractionType> clean_dih(gmx::ArrayRef<const InteractionType> dih,
- gmx::ArrayRef<const InteractionType> improper,
- t_atoms *atoms, bool bKeepAllGeneratedDihedrals,
- bool bRemoveDihedralIfWithImproper)
+static std::vector<InteractionOfType> clean_dih(gmx::ArrayRef<const InteractionOfType> dih,
+ gmx::ArrayRef<const InteractionOfType> improper,
+ t_atoms *atoms, bool bKeepAllGeneratedDihedrals,
+ bool bRemoveDihedralIfWithImproper)
{
/* Construct the list of the indices of the dihedrals
* (i.e. generated or read) that might be kept. */
- std::vector < std::pair < InteractionType, int>> newDihedrals;
+ std::vector < std::pair < InteractionOfType, int>> newDihedrals;
if (bKeepAllGeneratedDihedrals)
{
fprintf(stderr, "Keeping all generated dihedrals\n");
int i = 0;
for (const auto &dihedral : dih)
{
- newDihedrals.emplace_back(std::pair<InteractionType, int>(dihedral, i++));
+ newDihedrals.emplace_back(std::pair<InteractionOfType, int>(dihedral, i++));
}
}
else
dihedral == dih.begin() ||
!is_dihedral_on_same_bond(*dihedral, *(dihedral-1)))
{
- newDihedrals.emplace_back(std::pair<InteractionType, int>(*dihedral, i++));
+ newDihedrals.emplace_back(std::pair<InteractionOfType, int>(*dihedral, i++));
}
}
}
dihedral = newDihedrals.erase(dihedral);
}
}
- std::vector<InteractionType> finalDihedrals;
+ std::vector<InteractionOfType> finalDihedrals;
finalDihedrals.reserve(newDihedrals.size());
for (const auto ¶m : newDihedrals)
{
return finalDihedrals;
}
-static std::vector<InteractionType> get_impropers(t_atoms *atoms,
- gmx::ArrayRef<MoleculePatchDatabase> globalPatches,
- bool bAllowMissing)
+static std::vector<InteractionOfType> get_impropers(t_atoms *atoms,
+ gmx::ArrayRef<MoleculePatchDatabase> globalPatches,
+ bool bAllowMissing)
{
- std::vector<InteractionType> improper;
+ std::vector<InteractionOfType> improper;
/* Add all the impropers from the residue database to the list. */
int start = 0;
if (!bStop)
{
/* Not broken out */
- improper.emplace_back(InteractionType(ai, {}, bondeds.s));
+ improper.emplace_back(InteractionOfType(ai, {}, bondeds.s));
}
}
while ((start < atoms->nr) && (atoms->atom[start].resind == i))
/* Generate pairs, angles and dihedrals from .rtp settings */
void gen_pad(t_nextnb *nnb, t_atoms *atoms, gmx::ArrayRef<const PreprocessResidue> rtpFFDB,
- gmx::ArrayRef<InteractionTypeParameters> plist, t_excls excls[], gmx::ArrayRef<MoleculePatchDatabase> globalPatches,
+ gmx::ArrayRef<InteractionsOfType> plist, t_excls excls[], gmx::ArrayRef<MoleculePatchDatabase> globalPatches,
bool bAllowMissing)
{
/* These are the angles, dihedrals and pairs that we generate
* from the bonds. The ones that are already there from the rtp file
* will be retained.
*/
- std::vector<InteractionType> ang;
- std::vector<InteractionType> dih;
- std::vector<InteractionType> pai;
- std::vector<InteractionType> improper;
+ std::vector<InteractionOfType> ang;
+ std::vector<InteractionOfType> dih;
+ std::vector<InteractionOfType> pai;
+ std::vector<InteractionOfType> improper;
- std::array<std::string, 4> anm;
+ std::array<std::string, 4> anm;
if (!globalPatches.empty())
{
}
while (res < maxres);
}
- ang.push_back(InteractionType(atomNumbers, {}, name));
+ ang.push_back(InteractionOfType(atomNumbers, {}, name));
}
/* Generate every dihedral, 1-4 exclusion and 1-4 interaction
only once */
if the dihedral was in the rtp list.
*/
nFound++;
- dih.push_back(InteractionType(atomNumbers, {}, name));
+ dih.push_back(InteractionOfType(atomNumbers, {}, name));
dih.back().setForceParameter(MAXFORCEPARAM-1, DIHEDRAL_WAS_SET_IN_RTP);
}
}
if (nFound == 0)
{
std::vector<int> atoms = {i, j1, k1, l1};
- dih.push_back(InteractionType(atoms, {}, ""));
+ dih.push_back(InteractionOfType(atoms, {}, ""));
}
int nbd = nb_dist(nnb, i, l1);
!(is_hydro(atoms, i1) && is_hydro(atoms, i2)))
{
std::vector<int> atoms = {i1, i2};
- pai.push_back(InteractionType(atoms, {}, ""));
+ pai.push_back(InteractionOfType(atoms, {}, ""));
}
}
}
{
bondeds.match = true;
/* Incrementing nang means we save this angle */
- ang.push_back(InteractionType(atomNumbers, {}, bondeds.s));
+ ang.push_back(InteractionOfType(atomNumbers, {}, bondeds.s));
}
}
{
bondeds.match = true;
/* Incrementing ndih means we save this dihedral */
- dih.push_back(InteractionType(atomNumbers, {}, bondeds.s));
+ dih.push_back(InteractionOfType(atomNumbers, {}, bondeds.s));
}
}
}
struct t_excls;
struct MoleculePatchDatabase;
struct t_nextnb;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
struct PreprocessResidue;
void generate_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]);
void gen_pad(t_nextnb *nnb,
t_atoms *atoms,
gmx::ArrayRef<const PreprocessResidue> rtpFFDB,
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> plist,
t_excls excls[],
gmx::ArrayRef<MoleculePatchDatabase> globalPatches,
bool bAllowMissing);
}
-static void count_bonds(int atom, InteractionTypeParameters *psb, char ***atomname,
+static void count_bonds(int atom, InteractionsOfType *psb, char ***atomname,
int *nrbonds, int *nrHatoms, int Hatoms[], int *Heavy,
int *nrheavies, int heavies[])
{
return mass;
}
-static void my_add_param(InteractionTypeParameters *plist, int ai, int aj, real b)
+static void my_add_param(InteractionsOfType *plist, int ai, int aj, real b)
{
static real c[MAXFORCEPARAM] =
{ NOTSET, NOTSET, NOTSET, NOTSET, NOTSET, NOTSET };
add_param(plist, ai, aj, c, nullptr);
}
-static void add_vsites(gmx::ArrayRef<InteractionTypeParameters> plist, int vsite_type[],
+static void add_vsites(gmx::ArrayRef<InteractionsOfType> plist, int vsite_type[],
int Heavy, int nrHatoms, int Hatoms[],
int nrheavies, int heavies[])
{
/* get cos(alpha) when a, b and c are given: */
#define acosrule(a, b, c) ( (gmx::square(b)+gmx::square(c)-gmx::square(a))/(2*(b)*(c)) )
-static int gen_vsites_6ring(t_atoms *at, int *vsite_type[], gmx::ArrayRef<InteractionTypeParameters> plist,
+static int gen_vsites_6ring(t_atoms *at, int *vsite_type[], gmx::ArrayRef<InteractionsOfType> plist,
int nrfound, int *ats, real bond_cc, real bond_ch,
real xcom, bool bDoZ)
{
return nvsite;
}
-static int gen_vsites_phe(t_atoms *at, int *vsite_type[], gmx::ArrayRef<InteractionTypeParameters> plist,
+static int gen_vsites_phe(t_atoms *at, int *vsite_type[], gmx::ArrayRef<InteractionsOfType> plist,
int nrfound, int *ats, gmx::ArrayRef<const VirtualSiteTopology> vsitetop)
{
real bond_cc, bond_ch;
t_symtab *symtab, int *nadd,
gmx::ArrayRef<const gmx::RVec> x, int *cgnr[],
t_atoms *at, int *vsite_type[],
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> plist,
int nrfound, int *ats, int add_shift,
gmx::ArrayRef<const VirtualSiteTopology> vsitetop)
{
t_symtab *symtab, int *nadd,
gmx::ArrayRef<const gmx::RVec> x, int *cgnr[],
t_atoms *at, int *vsite_type[],
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> plist,
int nrfound, int *ats, int add_shift,
gmx::ArrayRef<const VirtualSiteTopology> vsitetop)
{
}
static int gen_vsites_his(t_atoms *at, int *vsite_type[],
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> plist,
int nrfound, int *ats, gmx::ArrayRef<const VirtualSiteTopology> vsitetop)
{
int nvsite, i;
void do_vsites(gmx::ArrayRef<const PreprocessResidue> rtpFFDB, PreprocessingAtomTypes *atype,
t_atoms *at, t_symtab *symtab,
std::vector<gmx::RVec> *x,
- gmx::ArrayRef<InteractionTypeParameters> plist, int *vsite_type[], int *cgnr[],
+ gmx::ArrayRef<InteractionsOfType> plist, int *vsite_type[], int *cgnr[],
real mHmult, bool bVsiteAromatics,
const char *ffdir)
{
/* now renumber all the interactions because of the added atoms */
for (int ftype = 0; ftype < F_NRE; ftype++)
{
- InteractionTypeParameters *params = &(plist[ftype]);
+ InteractionsOfType *params = &(plist[ftype]);
if (debug)
{
fprintf(debug, "Renumbering %zu %s\n", params->size(),
newAtomNumber.emplace_back(o2n[atomNumbers[j]]);
}
}
- *parm = InteractionType(newAtomNumber, parm->forceParam(), parm->interactionTypeName());
+ *parm = InteractionOfType(newAtomNumber, parm->forceParam(), parm->interactionTypeName());
if (debug)
{
fprintf(debug, "\n");
}
}
/* sort constraint parameters */
- InteractionTypeParameters *params = &(plist[F_CONSTRNC]);
+ InteractionsOfType *params = &(plist[F_CONSTRNC]);
for (auto &type : params->interactionTypes)
{
type.sortAtomIds();
fprintf(stderr, "Added %zu new constraints\n", plist[F_CONSTRNC].size());
}
-void do_h_mass(InteractionTypeParameters *psb, int vsite_type[], t_atoms *at, real mHmult,
+void do_h_mass(InteractionsOfType *psb, int vsite_type[], t_atoms *at, real mHmult,
bool bDeuterate)
{
/* loop over all atoms */
class PreprocessingAtomTypes;
struct t_atoms;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
struct PreprocessResidue;
struct t_symtab;
void do_vsites(gmx::ArrayRef<const PreprocessResidue> rtpFFDB, PreprocessingAtomTypes *atype,
t_atoms *at, t_symtab *symtab, std::vector<gmx::RVec> *x,
- gmx::ArrayRef<InteractionTypeParameters> plist, int *dummy_type[], int *cgnr[],
+ gmx::ArrayRef<InteractionsOfType> plist, int *dummy_type[], int *cgnr[],
real mHmult, bool bVSiteAromatics,
const char *ffdir);
-void do_h_mass(InteractionTypeParameters *psb, int vsite_type[], t_atoms *at, real mHmult,
+void do_h_mass(InteractionsOfType *psb, int vsite_type[], t_atoms *at, real mHmult,
bool bDeuterate);
#endif
struct AtomTypeData
{
//! Explicit constructor.
- AtomTypeData(const t_atom &a,
- char **name,
- const InteractionType &nb,
- const int bondAtomType,
- const int atomNumber) :
+ AtomTypeData(const t_atom &a,
+ char **name,
+ const InteractionOfType &nb,
+ const int bondAtomType,
+ const int atomNumber) :
atom_(a), name_(name), nb_(nb),
bondAtomType_(bondAtomType),
atomNumber_(atomNumber)
{
}
//! Actual atom data.
- t_atom atom_;
+ t_atom atom_;
//! Atom name.
- char **name_;
+ char **name_;
//! Nonbonded data.
- InteractionType nb_;
+ InteractionOfType nb_;
//! Bonded atomtype for the type.
- int bondAtomType_;
+ int bondAtomType_;
//! Atom number for the atom type.
- int atomNumber_;
+ int atomNumber_;
};
class PreprocessingAtomTypes::Impl
PreprocessingAtomTypes::~PreprocessingAtomTypes()
{}
-int PreprocessingAtomTypes::addType(t_symtab *tab,
- const t_atom &a,
- const std::string &name,
- const InteractionType &nb,
- int bondAtomType,
- int atomNumber)
+int PreprocessingAtomTypes::addType(t_symtab *tab,
+ const t_atom &a,
+ const std::string &name,
+ const InteractionOfType &nb,
+ int bondAtomType,
+ int atomNumber)
{
int position = atomTypeFromName(name);
if (position == NOTSET)
}
}
-int PreprocessingAtomTypes::setType(int nt,
- t_symtab *tab,
- const t_atom &a,
- const std::string &name,
- const InteractionType &nb,
- int bondAtomType,
- int atomNumber)
+int PreprocessingAtomTypes::setType(int nt,
+ t_symtab *tab,
+ const t_atom &a,
+ const std::string &name,
+ const InteractionOfType &nb,
+ int bondAtomType,
+ int atomNumber)
{
if (!isSet(nt))
{
fprintf (out, "\n");
}
-static int search_atomtypes(const PreprocessingAtomTypes *ga,
- int *n,
- gmx::ArrayRef<int> typelist,
- int thistype,
- gmx::ArrayRef<const InteractionType> interactionTypes,
- int ftype)
+static int search_atomtypes(const PreprocessingAtomTypes *ga,
+ int *n,
+ gmx::ArrayRef<int> typelist,
+ int thistype,
+ gmx::ArrayRef<const InteractionOfType> interactionTypes,
+ int ftype)
{
int nn = *n;
int nrfp = NRFP(ftype);
return i;
}
-void PreprocessingAtomTypes::renumberTypes(gmx::ArrayRef<InteractionTypeParameters> plist,
+void PreprocessingAtomTypes::renumberTypes(gmx::ArrayRef<InteractionsOfType> plist,
gmx_mtop_t *mtop,
int *wall_atomtype,
bool bVerbose)
/* We now have a list of unique atomtypes in typelist */
/* Renumber nlist */
- std::vector<InteractionType> nbsnew;
+ std::vector<InteractionOfType> nbsnew;
for (int i = 0; (i < nat); i++)
{
int mi = typelist[i];
for (int j = 0; (j < nat); j++)
{
- int mj = typelist[j];
- const InteractionType &interactionType = plist[ftype].interactionTypes[ntype*mi+mj];
+ int mj = typelist[j];
+ const InteractionOfType &interactionType = plist[ftype].interactionTypes[ntype*mi+mj];
nbsnew.emplace_back(interactionType.atoms(), interactionType.forceParam(), interactionType.interactionTypeName());
}
new_types.push_back(impl_->types[mi]);
struct gmx_mtop_t;
struct t_atom;
struct t_atomtypes;
-class InteractionType;
-struct InteractionTypeParameters;
+class InteractionOfType;
+struct InteractionsOfType;
struct t_symtab;
/*! \libinternal \brief
* \param[in] atomNumber Atomic number of the entry.
* \returns Number of the type set or NOTSET
*/
- int setType(int nt,
- t_symtab *tab,
- const t_atom &a,
- const std::string &name,
- const InteractionType &nb,
- int bondAtomType,
- int atomNumber);
+ int setType(int nt,
+ t_symtab *tab,
+ const t_atom &a,
+ const std::string &name,
+ const InteractionOfType &nb,
+ int bondAtomType,
+ int atomNumber);
/*! \brief
* Add new atom type to database.
* \param[in] atomNumber Atomic number of the entry.
* \returns Number of entries in database.
*/
- int addType(t_symtab *tab,
- const t_atom &a,
- const std::string &name,
- const InteractionType &nb,
- int bondAtomType,
- int atomNumber);
+ int addType(t_symtab *tab,
+ const t_atom &a,
+ const std::string &name,
+ const InteractionOfType &nb,
+ int bondAtomType,
+ int atomNumber);
/*! \brief
* Renumber existing atom type entries.
* \param[inout] wallAtomType Atom types of wall atoms, which may also be renumbered
* \param[in] verbose If we want to print additional info.
*/
- void renumberTypes(gmx::ArrayRef<InteractionTypeParameters> plist,
+ void renumberTypes(gmx::ArrayRef<InteractionsOfType> plist,
gmx_mtop_t *mtop,
int *wallAtomType,
bool verbose);
}
-static void add_b(InteractionTypeParameters *bonds, int *nrf, sortable *s)
+static void add_b(InteractionsOfType *bonds, int *nrf, sortable *s)
{
int i = 0;
for (const auto &bond : bonds->interactionTypes)
}
}
-void gen_nnb(t_nextnb *nnb, gmx::ArrayRef<InteractionTypeParameters> plist)
+void gen_nnb(t_nextnb *nnb, gmx::ArrayRef<InteractionsOfType> plist)
{
sortable *s;
int nrbonds, nrf;
void generate_excl (int nrexcl,
int nratoms,
- gmx::ArrayRef<InteractionTypeParameters> plist, t_nextnb *nnb, t_blocka *excl)
+ gmx::ArrayRef<InteractionsOfType> plist, t_nextnb *nnb, t_blocka *excl)
{
if (nrexcl < 0)
{
#include "gromacs/utility/arrayref.h"
struct t_blocka;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
struct t_nextnb
{
#define print_nnb(nnb, s)
#endif
-void gen_nnb(t_nextnb *nnb, gmx::ArrayRef<InteractionTypeParameters> plist);
+void gen_nnb(t_nextnb *nnb, gmx::ArrayRef<InteractionsOfType> plist);
/* Generate a t_nextnb structure from bond information.
* With the structure you can either generate exclusions
* or generate angles and dihedrals. The structure must be
*/
void generate_excl (int nrexcl, int nratoms,
- gmx::ArrayRef<InteractionTypeParameters> plist, t_nextnb *nnb, t_blocka *excl);
+ gmx::ArrayRef<InteractionsOfType> plist, t_nextnb *nnb, t_blocka *excl);
/* Generate an exclusion block from bonds and constraints in
* plist.
*/
#include "gromacs/utility/snprintf.h"
/* TODO The implementation details should move to their own source file. */
-InteractionType::InteractionType(gmx::ArrayRef<const int> atoms,
- gmx::ArrayRef<const real> params,
- const std::string &name)
+InteractionOfType::InteractionOfType(gmx::ArrayRef<const int> atoms,
+ gmx::ArrayRef<const real> params,
+ const std::string &name)
: atoms_(atoms.begin(), atoms.end()),
interactionTypeName_(name)
{
}
}
-const int &InteractionType::ai() const
+const int &InteractionOfType::ai() const
{
GMX_RELEASE_ASSERT(!atoms_.empty(), "Need to have at least one atom set");
return atoms_[0];
}
-const int &InteractionType::aj() const
+const int &InteractionOfType::aj() const
{
GMX_RELEASE_ASSERT(atoms_.size() > 1, "Need to have at least two atoms set");
return atoms_[1];
}
-const int &InteractionType::ak() const
+const int &InteractionOfType::ak() const
{
GMX_RELEASE_ASSERT(atoms_.size() > 2, "Need to have at least three atoms set");
return atoms_[2];
}
-const int &InteractionType::al() const
+const int &InteractionOfType::al() const
{
GMX_RELEASE_ASSERT(atoms_.size() > 3, "Need to have at least four atoms set");
return atoms_[3];
}
-const int &InteractionType::am() const
+const int &InteractionOfType::am() const
{
GMX_RELEASE_ASSERT(atoms_.size() > 4, "Need to have at least five atoms set");
return atoms_[4];
}
-const real &InteractionType::c0() const
+const real &InteractionOfType::c0() const
{
return forceParam_[0];
}
-const real &InteractionType::c1() const
+const real &InteractionOfType::c1() const
{
return forceParam_[1];
}
-const real &InteractionType::c2() const
+const real &InteractionOfType::c2() const
{
return forceParam_[2];
}
-const std::string &InteractionType::interactionTypeName() const
+const std::string &InteractionOfType::interactionTypeName() const
{
return interactionTypeName_;
}
-void InteractionType::sortBondAtomIds()
+void InteractionOfType::sortBondAtomIds()
{
if (aj() < ai())
{
}
}
-void InteractionType::sortAngleAtomIds()
+void InteractionOfType::sortAngleAtomIds()
{
if (ak() < ai())
{
}
}
-void InteractionType::sortDihedralAtomIds()
+void InteractionOfType::sortDihedralAtomIds()
{
if (al() < ai())
{
}
}
-void InteractionType::sortAtomIds()
+void InteractionOfType::sortAtomIds()
{
if (isBond())
{
}
};
-void InteractionType::setForceParameter(int pos, real value)
+void InteractionOfType::setForceParameter(int pos, real value)
{
GMX_RELEASE_ASSERT(pos < MAXFORCEPARAM, "Can't set parameter beyond the maximum number of parameters");
forceParam_[pos] = value;
/* For all the molecule types */
for (auto &mol : mols)
{
- n += mol.plist[ifunc].size();
- mol.plist[ifunc].interactionTypes.clear();
+ n += mol.interactions[ifunc].size();
+ mol.interactions[ifunc].interactionTypes.clear();
}
return n;
}
int nint = 0;
for (const gmx_molblock_t &molb : mtop->molblock)
{
- nint += molb.nmol*mi[molb.type].plist[ftype].size();
+ nint += molb.nmol*mi[molb.type].interactions[ftype].size();
}
return nint;
PreprocessingAtomTypes *atypes, gmx_mtop_t *sys,
std::vector<MoleculeInformation> *mi,
std::unique_ptr<MoleculeInformation> *intermolecular_interactions,
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> interactions,
int *comb, double *reppow, real *fudgeQQ,
gmx_bool bMorse,
warninp *wi)
/* TOPOLOGY processing */
sys->name = do_top(bVerbose, topfile, topppfile, opts, bZero, &(sys->symtab),
- plist, comb, reppow, fudgeQQ,
+ interactions, comb, reppow, fudgeQQ,
atypes, mi, intermolecular_interactions,
ir,
&molblock,
for (gmx_molblock_t &molb : mtop->molblock)
{
nat_molb = molb.nmol*mtop->moltype[molb.type].atoms.nr;
- const InteractionTypeParameters *pr = &(molinfo[molb.type].plist[F_POSRES]);
- const InteractionTypeParameters *prfb = &(molinfo[molb.type].plist[F_FBPOSRES]);
+ const InteractionsOfType *pr = &(molinfo[molb.type].interactions[F_POSRES]);
+ const InteractionsOfType *prfb = &(molinfo[molb.type].interactions[F_FBPOSRES]);
if (pr->size() > 0 || prfb->size() > 0)
{
atom = mtop->moltype[molb.type].atoms.atom;
for (const gmx_molblock_t &molb : mtop->molblock)
{
count_mol = 0;
- gmx::ArrayRef<const InteractionTypeParameters> plist = mi[molb.type].plist;
+ gmx::ArrayRef<const InteractionsOfType> interactions = mi[molb.type].interactions;
for (int i = 0; i < F_NRE; i++)
{
if (i == F_SETTLE)
{
- count_mol += 3*plist[i].size();
+ count_mol += 3*interactions[i].size();
}
else if (interaction_function[i].flags & IF_CONSTRAINT)
{
- count_mol += plist[i].size();
+ count_mol += interactions[i].size();
}
}
warning_error(wi, warn_buf);
}
- std::array<InteractionTypeParameters, F_NRE> plist;
- gmx_mtop_t sys;
- PreprocessingAtomTypes atypes;
+ std::array<InteractionsOfType, F_NRE> interactions;
+ gmx_mtop_t sys;
+ PreprocessingAtomTypes atypes;
if (debug)
{
pr_symtab(debug, 0, "Just opened", &sys.symtab);
new_status(fn, opt2fn_null("-pp", NFILE, fnm), opt2fn("-c", NFILE, fnm),
opts, ir, bZero, bGenVel, bVerbose, &state,
&atypes, &sys, &mi, &intermolecular_interactions,
- plist, &comb, &reppow, &fudgeQQ,
+ interactions, &comb, &reppow, &fudgeQQ,
opts->bMorse,
wi);
for (size_t mt = 0; mt < sys.moltype.size(); mt++)
{
nvsite +=
- set_vsites(bVerbose, &sys.moltype[mt].atoms, &atypes, mi[mt].plist);
+ set_vsites(bVerbose, &sys.moltype[mt].atoms, &atypes, mi[mt].interactions);
}
/* now throw away all obsolete bonds, angles and dihedrals: */
/* note: constraints are ALWAYS removed */
{
for (size_t mt = 0; mt < sys.moltype.size(); mt++)
{
- clean_vsite_bondeds(mi[mt].plist, sys.moltype[mt].atoms.nr, bRmVSBds);
+ clean_vsite_bondeds(mi[mt].interactions, sys.moltype[mt].atoms.nr, bRmVSBds);
}
}
}
/* If we are using CMAP, setup the pre-interpolation grid */
- if (plist[F_CMAP].ncmap() > 0)
+ if (interactions[F_CMAP].ncmap() > 0)
{
- init_cmap_grid(&sys.ffparams.cmap_grid, plist[F_CMAP].cmapAngles, plist[F_CMAP].cmakeGridSpacing);
- setup_cmap(plist[F_CMAP].cmakeGridSpacing, plist[F_CMAP].cmapAngles, plist[F_CMAP].cmap, &sys.ffparams.cmap_grid);
+ init_cmap_grid(&sys.ffparams.cmap_grid, interactions[F_CMAP].cmapAngles, interactions[F_CMAP].cmakeGridSpacing);
+ setup_cmap(interactions[F_CMAP].cmakeGridSpacing, interactions[F_CMAP].cmapAngles, interactions[F_CMAP].cmap, &sys.ffparams.cmap_grid);
}
set_wall_atomtype(&atypes, opts, ir, wi);
if (bRenum)
{
- atypes.renumberTypes(plist, &sys, ir->wall_atomtype, bVerbose);
+ atypes.renumberTypes(interactions, &sys, ir->wall_atomtype, bVerbose);
}
if (ir->implicit_solvent)
}
const int ntype = atypes.size();
- convertInteractionTypeParameters(ntype, plist, mi, intermolecular_interactions.get(),
- comb, reppow, fudgeQQ, &sys);
+ convertInteractionsOfType(ntype, interactions, mi, intermolecular_interactions.get(),
+ comb, reppow, fudgeQQ, &sys);
if (debug)
{
- pr_symtab(debug, 0, "After converInteractionTypeParameters", &sys.symtab);
+ pr_symtab(debug, 0, "After converInteractionsOfType", &sys.symtab);
}
/* set ptype to VSite for virtual sites */
#include "gromacs/utility/real.h"
/*! \libinternal \brief
- * Describes a single parameter in a force field.
+ * Describes an interaction of a given type, plus its parameters.
*/
-class InteractionType
+class InteractionOfType
{
public:
//! Constructor that initializes vectors.
- InteractionType(gmx::ArrayRef<const int> atoms,
- gmx::ArrayRef<const real> params,
- const std::string &name = "");
+ InteractionOfType(gmx::ArrayRef<const int> atoms,
+ gmx::ArrayRef<const real> params,
+ const std::string &name = "");
/*!@{*/
//! Access the individual elements set for the parameter.
const int &ai() const;
* lists of interactions of a given type in a [moleculetype]
* topology file definition.
*/
-struct InteractionTypeParameters
+struct InteractionsOfType
{ // NOLINT (clang-analyzer-optin.performance.Padding)
//! The different parameters in the system.
- std::vector<InteractionType> interactionTypes;
+ std::vector<InteractionOfType> interactionTypes;
//! CMAP grid spacing.
- int cmakeGridSpacing = -1;
+ int cmakeGridSpacing = -1;
//! Number of cmap angles.
- int cmapAngles = -1;
+ int cmapAngles = -1;
//! CMAP grid data.
- std::vector<real> cmap;
+ std::vector<real> cmap;
//! The five atomtypes followed by a number that identifies the type.
- std::vector<int> cmapAtomTypes;
+ std::vector<int> cmapAtomTypes;
//! Number of parameters.
size_t size() const { return interactionTypes.size(); }
t_block mols;
//! Exclusions in the molecule.
t_blocka excls;
- //! Parameters in old style.
- std::array<InteractionTypeParameters, F_NRE> plist;
+ //! Interactions of a defined type.
+ std::array<InteractionsOfType, F_NRE> interactions;
/*! \brief
* Initializer.
}
int nm2type(int nnm, t_nm2type nm2t[], t_symtab *tab, t_atoms *atoms,
- PreprocessingAtomTypes *atype, int *nbonds, InteractionTypeParameters *bonds)
+ PreprocessingAtomTypes *atype, int *nbonds, InteractionsOfType *bonds)
{
int cur = 0;
#define prev (1-cur)
{
atoms->atom[i].qB = alpha;
atoms->atom[i].m = atoms->atom[i].mB = mm;
- k = atype->addType(tab, atoms->atom[i], type, InteractionType({}, {}),
+ k = atype->addType(tab, atoms->atom[i], type, InteractionOfType({}, {}),
atoms->atom[i].type, atomnr);
}
atoms->atom[i].type = k;
class PreprocessingAtomTypes;
struct t_atoms;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
struct t_symtab;
struct t_nm2type
/* Dump the database for debugging. Can be reread by the program */
int nm2type(int nnm, t_nm2type nm2t[], t_symtab *tab, t_atoms *atoms,
- PreprocessingAtomTypes *atype, int *nbonds, InteractionTypeParameters *bond);
+ PreprocessingAtomTypes *atype, int *nbonds, InteractionsOfType *bond);
/* Try to determine the atomtype (force field dependent) for the atoms
* with help of the bond list
*/
void write_top(FILE *out, const char *pr, const char *molname,
t_atoms *at, bool bRTPresname,
- int bts[], gmx::ArrayRef<const InteractionTypeParameters> plist, t_excls excls[],
+ int bts[], gmx::ArrayRef<const InteractionsOfType> plist, t_excls excls[],
PreprocessingAtomTypes *atype, int *cgnr, int nrexcl)
/* NOTE: nrexcl is not the size of *excl! */
{
-static void do_ssbonds(InteractionTypeParameters *ps, t_atoms *atoms,
+static void do_ssbonds(InteractionsOfType *ps, t_atoms *atoms,
gmx::ArrayRef<const DisulfideBond> ssbonds, bool bAllowMissing)
{
for (const auto &bond : ssbonds)
}
}
-static void at2bonds(InteractionTypeParameters *psb, gmx::ArrayRef<MoleculePatchDatabase> globalPatches,
+static void at2bonds(InteractionsOfType *psb, gmx::ArrayRef<MoleculePatchDatabase> globalPatches,
t_atoms *atoms,
gmx::ArrayRef<const gmx::RVec> x,
real long_bond_dist, real short_bond_dist)
}
}
-static bool pcompar(const InteractionType &a, const InteractionType &b)
+static bool pcompar(const InteractionOfType &a, const InteractionOfType &b)
{
int d;
}
}
-static void clean_bonds(InteractionTypeParameters *ps)
+static void clean_bonds(InteractionsOfType *ps)
{
if (ps->size() > 0)
{
}
#define NUM_CMAP_ATOMS 5
-static void gen_cmap(InteractionTypeParameters *psb, gmx::ArrayRef<const PreprocessResidue> usedPpResidues, t_atoms *atoms)
+static void gen_cmap(InteractionsOfType *psb, gmx::ArrayRef<const PreprocessResidue> usedPpResidues, t_atoms *atoms)
{
int residx;
const char *ptr;
bool bDeuterate, bool bChargeGroups, bool bCmap,
bool bRenumRes, bool bRTPresname)
{
- std::array<InteractionTypeParameters, F_NRE> plist;
+ std::array<InteractionsOfType, F_NRE> plist;
t_excls *excls;
t_nextnb nnb;
int *cgnr;
struct t_excls;
struct MoleculePatchDatabase;
struct t_mols;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
struct t_resinfo;
struct PreprocessResidue;
struct DisulfideBond;
void write_top(FILE *out, const char *pr, const char *molname,
t_atoms *at, bool bRTPresname,
- int bts[], gmx::ArrayRef<const InteractionTypeParameters> plist, t_excls excls[],
+ int bts[], gmx::ArrayRef<const InteractionsOfType> plist, t_excls excls[],
PreprocessingAtomTypes *atype, int *cgnr, int nrexcl);
/* NOTE: nrexcl is not the size of *excl! */
if (sscanf(buf, "%s%lf", name, &m) == 2)
{
a->m = m;
- at.addType(tab, *a, name, InteractionType({}, {}), 0, 0);
+ at.addType(tab, *a, name, InteractionOfType({}, {}), 0, 0);
fprintf(stderr, "\rAtomtype %d", ++nratt);
fflush(stderr);
}
done_symtab(&symtab_);
}
protected:
- PreprocessingAtomTypes atypes_;
- t_symtab symtab_;
- t_atom atom_;
- InteractionType nb_;
+ PreprocessingAtomTypes atypes_;
+ t_symtab symtab_;
+ t_atom atom_;
+ InteractionOfType nb_;
};
TEST_F(PreprocessingAtomTypesTest, EmptyOnCreate)
{
if ((interaction_function[bb].flags & IF_BTYPE) && (bb != F_MORSE))
{
- int nrharm = mol.plist[bb].size();
+ int nrharm = mol.interactions[bb].size();
/* Now loop over the harmonics, trying to convert them */
- for (auto harmonic = mol.plist[bb].interactionTypes.begin();
- harmonic != mol.plist[bb].interactionTypes.end(); )
+ for (auto harmonic = mol.interactions[bb].interactionTypes.begin();
+ harmonic != mol.interactions[bb].interactionTypes.end(); )
{
int ni = harmonic->ai();
int nj = harmonic->aj();
real beta = std::sqrt(kb/(2*edis));
std::vector<int> atoms = {ni, nj};
std::vector<real> forceParam = {b0, edis, beta};
- mol.plist[F_MORSE].interactionTypes.emplace_back(
- InteractionType(atoms, forceParam));
- harmonic = mol.plist[bb].interactionTypes.erase(harmonic);
+ mol.interactions[F_MORSE].interactionTypes.emplace_back(
+ InteractionOfType(atoms, forceParam));
+ harmonic = mol.interactions[bb].interactionTypes.erase(harmonic);
}
else
{
}
}
- int newHarmonics = mol.plist[bb].size();
+ int newHarmonics = mol.interactions[bb].size();
fprintf(stderr, "Converted %d out of %d %s to morse bonds for mol %d\n",
nrharm-newHarmonics, nrharm, interaction_function[bb].name, i);
}
#define OPENDIR '[' /* starting sign for directive */
#define CLOSEDIR ']' /* ending sign for directive */
-static void gen_pairs(const InteractionTypeParameters &nbs, InteractionTypeParameters *pairs, real fudge, int comb)
+static void gen_pairs(const InteractionsOfType &nbs, InteractionsOfType *pairs, real fudge, int comb)
{
real scaling;
int ntp = nbs.size();
forceParam[j] = scaling*existingParam[j];
forceParam[nrfp+j] = scaling*existingParam[j];
}
- pairs->interactionTypes.emplace_back(InteractionType(atomNumbers, forceParam));
+ pairs->interactionTypes.emplace_back(InteractionOfType(atomNumbers, forceParam));
i++;
}
}
PreprocessingAtomTypes *atypes,
std::vector<MoleculeInformation> *molinfo,
std::unique_ptr<MoleculeInformation> *intermolecular_interactions,
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> interactions,
int *combination_rule,
double *reppow,
t_gromppopts *opts,
*reppow = 12.0; /* Default value for repulsion power */
/* Init the number of CMAP torsion angles and grid spacing */
- plist[F_CMAP].cmakeGridSpacing = 0;
- plist[F_CMAP].cmapAngles = 0;
+ interactions[F_CMAP].cmakeGridSpacing = 0;
+ interactions[F_CMAP].cmapAngles = 0;
bWarn_copy_A_B = bFEP;
break;
case Directive::d_bondtypes:
- push_bt(d, plist, 2, nullptr, &bondAtomType, pline, wi);
+ push_bt(d, interactions, 2, nullptr, &bondAtomType, pline, wi);
break;
case Directive::d_constrainttypes:
- push_bt(d, plist, 2, nullptr, &bondAtomType, pline, wi);
+ push_bt(d, interactions, 2, nullptr, &bondAtomType, pline, wi);
break;
case Directive::d_pairtypes:
if (bGenPairs)
}
else
{
- push_bt(d, plist, 2, atypes, nullptr, pline, wi);
+ push_bt(d, interactions, 2, atypes, nullptr, pline, wi);
}
break;
case Directive::d_angletypes:
- push_bt(d, plist, 3, nullptr, &bondAtomType, pline, wi);
+ push_bt(d, interactions, 3, nullptr, &bondAtomType, pline, wi);
break;
case Directive::d_dihedraltypes:
/* Special routine that can read both 2 and 4 atom dihedral definitions. */
- push_dihedraltype(d, plist, &bondAtomType, pline, wi);
+ push_dihedraltype(d, interactions, &bondAtomType, pline, wi);
break;
case Directive::d_nonbond_params:
break;
case Directive::d_cmaptypes:
- push_cmaptype(d, plist, 5, atypes, &bondAtomType, pline, wi);
+ push_cmaptype(d, interactions, 5, atypes, &bondAtomType, pline, wi);
break;
case Directive::d_moleculetype:
}
ntype = atypes->size();
ncombs = (ntype*(ntype+1))/2;
- generate_nbparams(*combination_rule, nb_funct, &(plist[nb_funct]), atypes, wi);
- ncopy = copy_nbparams(nbparam, nb_funct, &(plist[nb_funct]),
+ generate_nbparams(*combination_rule, nb_funct, &(interactions[nb_funct]), atypes, wi);
+ ncopy = copy_nbparams(nbparam, nb_funct, &(interactions[nb_funct]),
ntype);
fprintf(stderr, "Generated %d of the %d non-bonded parameter combinations\n", ncombs-ncopy, ncombs);
free_nbparam(nbparam, ntype);
if (bGenPairs)
{
- gen_pairs((plist[nb_funct]), &(plist[F_LJ14]), fudgeLJ, *combination_rule);
- ncopy = copy_nbparams(pair, nb_funct, &(plist[F_LJ14]),
+ gen_pairs((interactions[nb_funct]), &(interactions[F_LJ14]), fudgeLJ, *combination_rule);
+ ncopy = copy_nbparams(pair, nb_funct, &(interactions[F_LJ14]),
ntype);
fprintf(stderr, "Generated %d of the %d 1-4 parameter combinations\n", ncombs-ncopy, ncombs);
free_nbparam(pair, ntype);
case Directive::d_pairs:
GMX_RELEASE_ASSERT(mi0, "Need to have a valid MoleculeInformation object to work on");
- push_bond(d, plist, mi0->plist, &(mi0->atoms), atypes, pline, FALSE,
+ push_bond(d, interactions, mi0->interactions, &(mi0->atoms), atypes, pline, FALSE,
bGenPairs, *fudgeQQ, bZero, &bWarn_copy_A_B, wi);
break;
case Directive::d_pairs_nb:
GMX_RELEASE_ASSERT(mi0, "Need to have a valid MoleculeInformation object to work on");
- push_bond(d, plist, mi0->plist, &(mi0->atoms), atypes, pline, FALSE,
+ push_bond(d, interactions, mi0->interactions, &(mi0->atoms), atypes, pline, FALSE,
FALSE, 1.0, bZero, &bWarn_copy_A_B, wi);
break;
case Directive::d_water_polarization:
case Directive::d_thole_polarization:
GMX_RELEASE_ASSERT(mi0, "Need to have a valid MoleculeInformation object to work on");
- push_bond(d, plist, mi0->plist, &(mi0->atoms), atypes, pline, TRUE,
+ push_bond(d, interactions, mi0->interactions, &(mi0->atoms), atypes, pline, TRUE,
bGenPairs, *fudgeQQ, bZero, &bWarn_copy_A_B, wi);
break;
case Directive::d_cmap:
GMX_RELEASE_ASSERT(mi0, "Need to have a valid MoleculeInformation object to work on");
- push_cmap(d, plist, mi0->plist, &(mi0->atoms), atypes, pline, wi);
+ push_cmap(d, interactions, mi0->interactions, &(mi0->atoms), atypes, pline, wi);
break;
case Directive::d_vsitesn:
GMX_RELEASE_ASSERT(mi0, "Need to have a valid MoleculeInformation object to work on");
- push_vsitesn(d, mi0->plist, &(mi0->atoms), pline, wi);
+ push_vsitesn(d, mi0->interactions, &(mi0->atoms), pline, wi);
break;
case Directive::d_exclusions:
GMX_ASSERT(!exclusionBlocks.empty(), "exclusionBlocks must always be allocated so exclusions can be processed");
t_nextnb nnb;
generate_excl(mi0->nrexcl,
mi0->atoms.nr,
- mi0->plist,
+ mi0->interactions,
&nnb,
&(mi0->excls));
gmx::mergeExclusions(&(mi0->excls), exclusionBlocks[whichmol]);
- make_shake(mi0->plist, &mi0->atoms, opts->nshake);
+ make_shake(mi0->interactions, &mi0->atoms, opts->nshake);
done_nnb(&nnb);
convert_moltype_couple(mi0, dcatt, *fudgeQQ,
opts->couple_lam0, opts->couple_lam1,
opts->bCoupleIntra,
- nb_funct, &(plist[nb_funct]), wi);
+ nb_funct, &(interactions[nb_funct]), wi);
}
stupid_fill_block(&mi0->mols, mi0->atoms.nr, TRUE);
mi0->bProcessed = TRUE;
t_gromppopts *opts,
bool bZero,
t_symtab *symtab,
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> interactions,
int *combination_rule,
double *repulsion_power,
real *fudgeQQ,
title = read_topol(topfile, tmpfile, opts->define, opts->include,
symtab, atypes,
molinfo, intermolecular_interactions,
- plist, combination_rule, repulsion_power,
+ interactions, combination_rule, repulsion_power,
opts, fudgeQQ, molblock,
ffParametrizedWithHBondConstraints,
ir->efep != efepNO, bZero,
struct t_gromppopts;
struct t_inputrec;
struct MoleculeInformation;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
struct t_symtab;
struct warninp;
enum struct GmxQmmmMode;
t_gromppopts *opts,
bool bZero,
t_symtab *symtab,
- gmx::ArrayRef<InteractionTypeParameters> plist,
+ gmx::ArrayRef<InteractionsOfType> plist,
int *combination_rule,
double *repulsion_power,
real *fudgeQQ,
void generate_nbparams(int comb,
int ftype,
- InteractionTypeParameters *plist,
+ InteractionsOfType *interactions,
PreprocessingAtomTypes *atypes,
warninp *wi)
{
/* Lean mean shortcuts */
nr = atypes->size();
nrfp = NRFP(ftype);
- plist->interactionTypes.clear();
+ interactions->interactionTypes.clear();
std::array<real, MAXFORCEPARAM> forceParam = {NOTSET};
/* Fill the matrix with force parameters */
c = std::sqrt(ci * cj);
forceParam[nf] = c;
}
- plist->interactionTypes.emplace_back(InteractionType({}, forceParam));
+ interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
}
}
break;
forceParam[0] *= -1;
}
forceParam[1] = std::sqrt(ci1*cj1);
- plist->interactionTypes.emplace_back(InteractionType({}, forceParam));
+ interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
}
}
forceParam[0] *= -1;
}
forceParam[1] = std::sqrt(ci1*cj1);
- plist->interactionTypes.emplace_back(InteractionType({}, forceParam));
+ interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
}
}
forceParam[1] = 2.0/(1/bi+1/bj);
}
forceParam[2] = std::sqrt(ci2 * cj2);
- plist->interactionTypes.emplace_back(InteractionType({}, forceParam));
+ interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
}
}
}
/*! \brief Used to temporarily store the explicit non-bonded parameter
- * combinations, which will be copied to InteractionTypeParameters. */
+ * combinations, which will be copied to InteractionsOfType. */
struct t_nbparam
{
//! Has this combination been set.
}
}
-int copy_nbparams(t_nbparam **param, int ftype, InteractionTypeParameters *plist, int nr)
+int copy_nbparams(t_nbparam **param, int ftype, InteractionsOfType *interactions, int nr)
{
int nrfp, ncopy;
{
for (int f = 0; f < nrfp; f++)
{
- plist->interactionTypes[nr*i+j].setForceParameter(f, param[i][j].c[f]);
- plist->interactionTypes[nr*j+i].setForceParameter(f, param[i][j].c[f]);
+ interactions->interactionTypes[nr*i+j].setForceParameter(f, param[i][j].c[f]);
+ interactions->interactionTypes[nr*j+i].setForceParameter(f, param[i][j].c[f]);
}
ncopy++;
}
forceParam[i] = c[i];
}
- InteractionType interactionType({}, forceParam, "");
+ InteractionOfType interactionType({}, forceParam, "");
batype_nr = bondAtomType->addBondAtomType(symtab, btype);
std::equal(a.begin(), a.end(), b.rbegin()));
}
-static void push_bondtype(InteractionTypeParameters *bt,
- const InteractionType &b,
- int nral,
- int ftype,
- bool bAllowRepeat,
- const char *line,
- warninp *wi)
+static void push_bondtype(InteractionsOfType *bt,
+ const InteractionOfType &b,
+ int nral,
+ int ftype,
+ bool bAllowRepeat,
+ const char *line,
+ warninp *wi)
{
int nr = bt->size();
int nrfp = NRFP(ftype);
{
/* fill the arrays up and down */
bt->interactionTypes.emplace_back(
- InteractionType(b.atoms(), b.forceParam(), b.interactionTypeName()));
+ InteractionOfType(b.atoms(), b.forceParam(), b.interactionTypeName()));
/* need to store force values because they might change below */
std::vector<real> forceParam(b.forceParam().begin(), b.forceParam().end());
{
atoms.emplace_back(*oldAtom);
}
- bt->interactionTypes.emplace_back(InteractionType(atoms, forceParam, b.interactionTypeName()));
+ bt->interactionTypes.emplace_back(InteractionOfType(atoms, forceParam, b.interactionTypeName()));
}
}
void push_bt(Directive d,
- gmx::ArrayRef<InteractionTypeParameters> bt,
+ gmx::ArrayRef<InteractionsOfType> bt,
int nral,
PreprocessingAtomTypes *at,
PreprocessingBondAtomType *bondAtomType,
{
forceParam[i] = c[i];
}
- push_bondtype (&(bt[ftype]), InteractionType(atoms, forceParam), nral, ftype, FALSE, line, wi);
+ push_bondtype (&(bt[ftype]), InteractionOfType(atoms, forceParam), nral, ftype, FALSE, line, wi);
}
-void push_dihedraltype(Directive d, gmx::ArrayRef<InteractionTypeParameters> bt,
+void push_dihedraltype(Directive d, gmx::ArrayRef<InteractionsOfType> bt,
PreprocessingBondAtomType *bondAtomType, char *line,
warninp *wi)
{
/* Always use 4 atoms here, since we created two wildcard atoms
* if there wasn't of them 4 already.
*/
- push_bondtype (&(bt[ftype]), InteractionType(atoms, forceParam), 4, ftype, bAllowRepeat, line, wi);
+ push_bondtype (&(bt[ftype]), InteractionOfType(atoms, forceParam), 4, ftype, bAllowRepeat, line, wi);
}
void
push_cmaptype(Directive d,
- gmx::ArrayRef<InteractionTypeParameters> bt,
+ gmx::ArrayRef<InteractionsOfType> bt,
int nral,
PreprocessingAtomTypes *atomtypes,
PreprocessingBondAtomType *bondAtomType,
std::array<real, MAXFORCEPARAM> forceParam = {NOTSET};
/* Push the bond to the bondlist */
- push_bondtype (&(bt[ftype]), InteractionType(atoms, forceParam), nral, ftype, FALSE, line, wi);
+ push_bondtype (&(bt[ftype]), InteractionOfType(atoms, forceParam), nral, ftype, FALSE, line, wi);
}
}
}
-static bool default_nb_params(int ftype, gmx::ArrayRef<InteractionTypeParameters> bt, t_atoms *at,
- InteractionType *p, int c_start, bool bB, bool bGenPairs)
+static bool default_nb_params(int ftype, gmx::ArrayRef<InteractionsOfType> bt, t_atoms *at,
+ InteractionOfType *p, int c_start, bool bB, bool bGenPairs)
{
- int ti, tj, ntype;
- bool bFound;
- InteractionType *pi = nullptr;
- int nr = bt[ftype].size();
- int nral = NRAL(ftype);
- int nrfp = interaction_function[ftype].nrfpA;
- int nrfpB = interaction_function[ftype].nrfpB;
+ int ti, tj, ntype;
+ bool bFound;
+ InteractionOfType *pi = nullptr;
+ int nr = bt[ftype].size();
+ int nral = NRAL(ftype);
+ int nrfp = interaction_function[ftype].nrfpA;
+ int nrfpB = interaction_function[ftype].nrfpB;
if ((!bB && nrfp == 0) || (bB && nrfpB == 0))
{
return bFound;
}
-static bool default_cmap_params(gmx::ArrayRef<InteractionTypeParameters> bondtype,
+static bool default_cmap_params(gmx::ArrayRef<InteractionsOfType> bondtype,
t_atoms *at, PreprocessingAtomTypes *atypes,
- InteractionType *p, bool bB,
+ InteractionOfType *p, bool bB,
int *cmap_type, int *nparam_def,
warninp *wi)
{
/* Returns the number of exact atom type matches, i.e. non wild-card matches,
* returns -1 when there are no matches at all.
*/
-static int natom_match(const InteractionType &pi,
+static int natom_match(const InteractionOfType &pi,
int type_i, int type_j, int type_k, int type_l,
const PreprocessingAtomTypes* atypes)
{
}
}
-static int findNumberOfDihedralAtomMatches(const InteractionType ¤tParamFromParameterArray,
- const InteractionType ¶meterToAdd,
- const t_atoms *at,
- const PreprocessingAtomTypes *atypes,
- bool bB)
+static int findNumberOfDihedralAtomMatches(const InteractionOfType ¤tParamFromParameterArray,
+ const InteractionOfType ¶meterToAdd,
+ const t_atoms *at,
+ const PreprocessingAtomTypes *atypes,
+ bool bB)
{
if (bB)
{
}
}
-static std::vector<InteractionType>::iterator
-defaultInteractionTypeParameters(int ftype, gmx::ArrayRef<InteractionTypeParameters> bt,
- t_atoms *at, PreprocessingAtomTypes *atypes,
- const InteractionType &p, bool bB,
- int *nparam_def)
+static std::vector<InteractionOfType>::iterator
+defaultInteractionsOfType(int ftype, gmx::ArrayRef<InteractionsOfType> bt,
+ t_atoms *at, PreprocessingAtomTypes *atypes,
+ const InteractionOfType &p, bool bB,
+ int *nparam_def)
{
int nparam_found;
int nrfpA = interaction_function[ftype].nrfpA;
-void push_bond(Directive d, gmx::ArrayRef<InteractionTypeParameters> bondtype,
- gmx::ArrayRef<InteractionTypeParameters> bond,
+void push_bond(Directive d, gmx::ArrayRef<InteractionsOfType> bondtype,
+ gmx::ArrayRef<InteractionsOfType> bond,
t_atoms *at, PreprocessingAtomTypes *atypes, char *line,
bool bBonded, bool bGenPairs, real fudgeQQ,
bool bZero, bool *bWarn_copy_A_B,
/* Get force params for normal and free energy perturbation
* studies, as determined by types!
*/
- InteractionType param(atoms, forceParam, "");
+ InteractionOfType param(atoms, forceParam, "");
- std::vector<InteractionType>::iterator foundAParameter = bondtype[ftype].interactionTypes.end();
- std::vector<InteractionType>::iterator foundBParameter = bondtype[ftype].interactionTypes.end();
+ std::vector<InteractionOfType>::iterator foundAParameter = bondtype[ftype].interactionTypes.end();
+ std::vector<InteractionOfType>::iterator foundBParameter = bondtype[ftype].interactionTypes.end();
if (bBonded)
{
- foundAParameter = defaultInteractionTypeParameters(ftype,
- bondtype,
- at,
- atypes,
- param,
- FALSE,
- &nparam_defA);
+ foundAParameter = defaultInteractionsOfType(ftype,
+ bondtype,
+ at,
+ atypes,
+ param,
+ FALSE,
+ &nparam_defA);
if (foundAParameter != bondtype[ftype].interactionTypes.end())
{
/* Copy the A-state and B-state default parameters. */
{
bFoundA = true;
}
- foundBParameter = defaultInteractionTypeParameters(ftype,
- bondtype,
- at,
- atypes,
- param,
- TRUE,
- &nparam_defB);
+ foundBParameter = defaultInteractionsOfType(ftype,
+ bondtype,
+ at,
+ atypes,
+ param,
+ TRUE,
+ &nparam_defB);
if (foundBParameter != bondtype[ftype].interactionTypes.end())
{
/* Copy only the B-state default parameters */
}
}
-void push_cmap(Directive d, gmx::ArrayRef<InteractionTypeParameters> bondtype,
- gmx::ArrayRef<InteractionTypeParameters> bond,
+void push_cmap(Directive d, gmx::ArrayRef<InteractionsOfType> bondtype,
+ gmx::ArrayRef<InteractionsOfType> bond,
t_atoms *at, PreprocessingAtomTypes *atypes, char *line,
warninp *wi)
{
{
atoms.emplace_back(aa[j]-1);
}
- std::array<real, MAXFORCEPARAM> forceParam = {0.0};
- InteractionType param(atoms, forceParam, "");
+ std::array<real, MAXFORCEPARAM> forceParam = {0.0};
+ InteractionOfType param(atoms, forceParam, "");
/* Get the cmap type for this cmap angle */
bFound = default_cmap_params(bondtype, at, atypes, ¶m, FALSE, &cmap_type, &ncmap_params, wi);
-void push_vsitesn(Directive d, gmx::ArrayRef<InteractionTypeParameters> bond,
+void push_vsitesn(Directive d, gmx::ArrayRef<InteractionsOfType> bond,
t_atoms *at, char *line,
warninp *wi)
{
forceParam[0] = nj;
forceParam[1] = weight[j]/weight_tot;
/* Put the values in the appropriate arrays */
- add_param_to_list (&bond[ftype], InteractionType(atoms, forceParam));
+ add_param_to_list (&bond[ftype], InteractionOfType(atoms, forceParam));
}
sfree(atc);
atom.ptype = eptAtom;
std::array<real, MAXFORCEPARAM> forceParam = {0.0};
- nr = at->addType(symtab, atom, "decoupled", InteractionType({}, forceParam, ""), -1, 0);
+ nr = at->addType(symtab, atom, "decoupled", InteractionOfType({}, forceParam, ""), -1, 0);
/* Add space in the non-bonded parameters matrix */
realloc_nb_params(at, nbparam, pair);
return nr;
}
-static void convert_pairs_to_pairsQ(gmx::ArrayRef<InteractionTypeParameters> plist,
+static void convert_pairs_to_pairsQ(gmx::ArrayRef<InteractionsOfType> interactions,
real fudgeQQ, t_atoms *atoms)
{
/* Add the pair list to the pairQ list */
- std::vector<InteractionType> paramnew;
+ std::vector<InteractionOfType> paramnew;
- gmx::ArrayRef<const InteractionType> paramp1 = plist[F_LJ14].interactionTypes;
- gmx::ArrayRef<const InteractionType> paramp2 = plist[F_LJC14_Q].interactionTypes;
+ gmx::ArrayRef<const InteractionOfType> paramp1 = interactions[F_LJ14].interactionTypes;
+ gmx::ArrayRef<const InteractionOfType> paramp2 = interactions[F_LJC14_Q].interactionTypes;
/* Fill in the new F_LJC14_Q array with the old one. NOTE:
it may be possible to just ADD the converted F_LJ14 array
fudgeQQ, atoms->atom[param.ai()].q, atoms->atom[param.aj()].q,
param.c0(), param.c1()
};
- paramnew.emplace_back(InteractionType(param.atoms(), forceParam, ""));
+ paramnew.emplace_back(InteractionOfType(param.atoms(), forceParam, ""));
}
/* now assign the new data to the F_LJC14_Q structure */
- plist[F_LJC14_Q].interactionTypes = paramnew;
+ interactions[F_LJC14_Q].interactionTypes = paramnew;
/* Empty the LJ14 pairlist */
- plist[F_LJ14].interactionTypes.clear();
+ interactions[F_LJ14].interactionTypes.clear();
}
-static void generate_LJCpairsNB(MoleculeInformation *mol, int nb_funct, InteractionTypeParameters *nbp, warninp *wi)
+static void generate_LJCpairsNB(MoleculeInformation *mol, int nb_funct, InteractionsOfType *nbp, warninp *wi)
{
int n, ntype;
t_atom *atom;
nbp->interactionTypes[ntype*atom[i].type+atom[j].type].c0(),
nbp->interactionTypes[ntype*atom[i].type+atom[j].type].c1()
};
- add_param_to_list(&mol->plist[F_LJC_PAIRS_NB], InteractionType(atoms, forceParam));
+ add_param_to_list(&mol->interactions[F_LJC_PAIRS_NB], InteractionOfType(atoms, forceParam));
}
}
}
void convert_moltype_couple(MoleculeInformation *mol, int atomtype_decouple, real fudgeQQ,
int couple_lam0, int couple_lam1,
- bool bCoupleIntra, int nb_funct, InteractionTypeParameters *nbp,
+ bool bCoupleIntra, int nb_funct, InteractionsOfType *nbp,
warninp *wi)
{
- convert_pairs_to_pairsQ(mol->plist, fudgeQQ, &mol->atoms);
+ convert_pairs_to_pairsQ(mol->interactions, fudgeQQ, &mol->atoms);
if (!bCoupleIntra)
{
generate_LJCpairsNB(mol, nb_funct, nbp, wi);
struct t_block;
struct MoleculeInformation;
struct t_nbparam;
-class InteractionType;
-struct InteractionTypeParameters;
+class InteractionOfType;
+struct InteractionsOfType;
struct PreprocessResidue;
struct warninp;
struct ExclusionBlock;
} // namespace gmx
-void generate_nbparams(int comb, int funct, InteractionTypeParameters *plist,
+void generate_nbparams(int comb, int funct, InteractionsOfType *plist,
PreprocessingAtomTypes *atype,
warninp *wi);
t_nbparam ***nbparam, t_nbparam ***pair,
warninp *wi);
-void push_bt(Directive d, gmx::ArrayRef<InteractionTypeParameters> bt, int nral,
+void push_bt(Directive d, gmx::ArrayRef<InteractionsOfType> bt, int nral,
PreprocessingAtomTypes *at, PreprocessingBondAtomType *bat, char *line,
warninp *wi);
-void push_dihedraltype(Directive d, gmx::ArrayRef<InteractionTypeParameters> bt,
+void push_dihedraltype(Directive d, gmx::ArrayRef<InteractionsOfType> bt,
PreprocessingBondAtomType *bat, char *line,
warninp *wi);
-void push_cmaptype(Directive d, gmx::ArrayRef<InteractionTypeParameters> bt, int nral, PreprocessingAtomTypes *at,
+void push_cmaptype(Directive d, gmx::ArrayRef<InteractionsOfType> bt, int nral, PreprocessingAtomTypes *at,
PreprocessingBondAtomType *bat, char *line,
warninp *wi);
int *lastcg,
warninp *wi);
-void push_bond(Directive d, gmx::ArrayRef<InteractionTypeParameters> bondtype,
- gmx::ArrayRef<InteractionTypeParameters> bond,
+void push_bond(Directive d, gmx::ArrayRef<InteractionsOfType> bondtype,
+ gmx::ArrayRef<InteractionsOfType> bond,
t_atoms *at, PreprocessingAtomTypes *atype, char *line,
bool bBonded, bool bGenPairs, real fudgeQQ,
bool bZero, bool *bWarn_copy_A_B,
warninp *wi);
void push_cmap(Directive d,
- gmx::ArrayRef<InteractionTypeParameters> bondtype,
- gmx::ArrayRef<InteractionTypeParameters> bond,
+ gmx::ArrayRef<InteractionsOfType> bondtype,
+ gmx::ArrayRef<InteractionsOfType> bond,
t_atoms *at, PreprocessingAtomTypes *atype, char *line,
warninp *wi);
-void push_vsitesn(Directive d, gmx::ArrayRef<InteractionTypeParameters> bond,
+void push_vsitesn(Directive d, gmx::ArrayRef<InteractionsOfType> bond,
t_atoms *at, char *line,
warninp *wi);
void push_excl(char *line, gmx::ArrayRef<gmx::ExclusionBlock> b2, warninp *wi);
-int copy_nbparams(t_nbparam **param, int ftype, InteractionTypeParameters *plist, int nr);
+int copy_nbparams(t_nbparam **param, int ftype, InteractionsOfType *plist, int nr);
void free_nbparam(t_nbparam **param, int nr);
real fudgeQQ,
int couple_lam0, int couple_lam1,
bool bCoupleIntra,
- int nb_funct, InteractionTypeParameters *nbp,
+ int nb_funct, InteractionsOfType *nbp,
warninp *wi);
/* Setup mol such that the B-state has no interaction with the rest
* of the system, but full interaction with itself.
return nh;
}
-void make_shake(gmx::ArrayRef<InteractionTypeParameters> plist, t_atoms *atoms, int nshake)
+void make_shake(gmx::ArrayRef<InteractionsOfType> plist, t_atoms *atoms, int nshake)
{
char ***info = atoms->atomname;
real b_ij, b_jk;
{
if (interaction_function[ftype].flags & IF_BTYPE)
{
- InteractionTypeParameters *bonds = &(plist[ftype]);
+ InteractionsOfType *bonds = &(plist[ftype]);
for (int ftype_a = 0; (gmx::ssize(*bonds) > 0 && ftype_a < F_NRE); ftype_a++)
{
if (interaction_function[ftype_a].flags & IF_ATYPE)
{
- InteractionTypeParameters *pr = &(plist[ftype_a]);
+ InteractionsOfType *pr = &(plist[ftype_a]);
for (auto parm = pr->interactionTypes.begin(); parm != pr->interactionTypes.end(); )
{
- const InteractionType *ang = &(*parm);
+ const InteractionOfType *ang = &(*parm);
#ifdef DEBUG
printf("Angle: %d-%d-%d\n", ang->ai(), ang->aj(), ang->ak());
#endif
printf("p: %d, q: %d, dist: %12.5e\n", atomNumbers[0],
atomNumbers[1], forceParm[0]);
#endif
- add_param_to_list (&(plist[F_CONSTR]), InteractionType(atomNumbers, forceParm));
+ add_param_to_list (&(plist[F_CONSTR]), InteractionOfType(atomNumbers, forceParm));
/* move the last bond to this position */
*parm = *(pr->interactionTypes.end() - 1);
pr->interactionTypes.erase(pr->interactionTypes.end() - 1);
{
if (interaction_function[ftype].flags & IF_BTYPE)
{
- InteractionTypeParameters *pr = &(plist[ftype]);
+ InteractionsOfType *pr = &(plist[ftype]);
for (auto parm = pr->interactionTypes.begin(); parm != pr->interactionTypes.end(); )
{
if ( (nshake != eshHBONDS) ||
/* append this bond to the shake list */
std::vector<int> atomNumbers = {parm->ai(), parm->aj()};
std::vector<real> forceParm = { parm->c0(), parm->c2()};
- add_param_to_list (&(plist[F_CONSTR]), InteractionType(atomNumbers, forceParm));
+ add_param_to_list (&(plist[F_CONSTR]), InteractionOfType(atomNumbers, forceParm));
parm = pr->interactionTypes.erase(parm);
}
else
#include "gromacs/utility/arrayref.h"
struct t_atoms;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
-void make_shake (gmx::ArrayRef<InteractionTypeParameters> plist, t_atoms *atoms, int nshake);
+void make_shake (gmx::ArrayRef<InteractionsOfType> plist, t_atoms *atoms, int nshake);
#endif
/* UTILITIES */
-void add_param_to_list(InteractionTypeParameters *list, const InteractionType &b)
+void add_param_to_list(InteractionsOfType *list, const InteractionOfType &b)
{
list->interactionTypes.emplace_back(b);
}
/* PRINTING STRUCTURES */
static void print_bt(FILE *out, Directive d, PreprocessingAtomTypes *at,
- int ftype, int fsubtype, gmx::ArrayRef<const InteractionTypeParameters> plist,
+ int ftype, int fsubtype, gmx::ArrayRef<const InteractionsOfType> plist,
bool bFullDih)
{
/* This dihp is a DIRTY patch because the dih-types do not use
int nral, nrfp;
bool bDih = false, bSwapParity;
- const InteractionTypeParameters *bt = &(plist[ftype]);
+ const InteractionsOfType *bt = &(plist[ftype]);
if (bt->size() == 0)
{
}
void print_bondeds(FILE *out, int natoms, Directive d,
- int ftype, int fsubtype, gmx::ArrayRef<const InteractionTypeParameters> plist)
+ int ftype, int fsubtype, gmx::ArrayRef<const InteractionsOfType> plist)
{
t_symtab stab;
t_atom *a;
{
char buf[12];
sprintf(buf, "%4d", (i+1));
- atype.addType(&stab, *a, buf, InteractionType({}, {}), 0, 0);
+ atype.addType(&stab, *a, buf, InteractionOfType({}, {}), 0, 0);
}
print_bt(out, d, &atype, ftype, fsubtype, plist, TRUE);
struct t_blocka;
struct t_excls;
struct MoleculeInformation;
-class InteractionType;
-struct InteractionTypeParameters;
+class InteractionOfType;
+struct InteractionsOfType;
/* UTILITIES */
int name2index(char *str, char ***typenames, int ntypes);
-void add_param_to_list(InteractionTypeParameters *list, const InteractionType &b);
+void add_param_to_list(InteractionsOfType *list, const InteractionOfType &b);
bool bRTPresname);
void print_bondeds(FILE *out, int natoms, Directive d,
- int ftype, int fsubtype, gmx::ArrayRef<const InteractionTypeParameters> plist);
+ int ftype, int fsubtype, gmx::ArrayRef<const InteractionsOfType> plist);
void print_excl(FILE *out, int natoms, t_excls excls[]);
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/strconvert.h"
+#include "hackblock.h"
#include "resall.h"
typedef struct {
struct VsiteBondParameter
{
- VsiteBondParameter(int ftype, const InteractionType &type)
- : ftype_(ftype), type_(type)
+ VsiteBondParameter(int ftype, const InteractionOfType &vsiteInteraction)
+ : ftype_(ftype), vsiteInteraction_(vsiteInteraction)
{}
- int ftype_;
- const InteractionType &type_;
+ int ftype_;
+ const InteractionOfType &vsiteInteraction_;
};
struct Atom2VsiteBond
}
static void enter_bonded(int nratoms, int *nrbonded, t_mybonded **bondeds,
- const InteractionType &type)
+ const InteractionOfType &type)
{
srenew(*bondeds, *nrbonded+1);
{
for (auto &vsite : at2vb[atoms[k]].vSiteBondedParameters)
{
- int ftype = vsite.ftype_;
- const InteractionType &type = vsite.type_;
- int nrcheck = vsite_bond_nrcheck(ftype);
+ int ftype = vsite.ftype_;
+ const InteractionOfType &type = vsite.vsiteInteraction_;
+ int nrcheck = vsite_bond_nrcheck(ftype);
/* abuse nrcheck to see if we're adding bond, angle or idih */
switch (nrcheck)
{
}
static std::vector<Atom2VsiteBond>
-make_at2vsitebond(int natoms, gmx::ArrayRef<InteractionTypeParameters> plist)
+make_at2vsitebond(int natoms, gmx::ArrayRef<InteractionsOfType> plist)
{
bool *bVSI;
}
static std::vector<Atom2VsiteConnection>
-make_at2vsitecon(int natoms, gmx::ArrayRef<InteractionTypeParameters> plist)
+make_at2vsitecon(int natoms, gmx::ArrayRef<InteractionsOfType> plist)
{
std::vector<bool> bVSI(natoms);
std::vector<Atom2VsiteConnection> at2vc(natoms);
}
}
-static void printInteractionType(FILE *fp, int ftype, int i, const InteractionType &type)
+static void printInteractionOfType(FILE *fp, int ftype, int i, const InteractionOfType &type)
{
static int pass = 0;
static int prev_ftype = NOTSET;
}
static bool calc_vsite3_param(PreprocessingAtomTypes *atypes,
- InteractionType *param, t_atoms *at,
+ InteractionOfType *param, t_atoms *at,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles )
{
return bError;
}
-static bool calc_vsite3fd_param(InteractionType *param,
+static bool calc_vsite3fd_param(InteractionOfType *param,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles)
{
return bError;
}
-static bool calc_vsite3fad_param(InteractionType *param,
+static bool calc_vsite3fad_param(InteractionOfType *param,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles)
{
}
static bool calc_vsite3out_param(PreprocessingAtomTypes *atypes,
- InteractionType *param, t_atoms *at,
+ InteractionOfType *param, t_atoms *at,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles)
{
return bError;
}
-static bool calc_vsite4fd_param(InteractionType *param,
+static bool calc_vsite4fd_param(InteractionOfType *param,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles)
{
static bool
-calc_vsite4fdn_param(InteractionType *param,
+calc_vsite4fdn_param(InteractionOfType *param,
int nrbond, t_mybonded *bonds,
int nrang, t_mybonded *angles)
{
int set_vsites(bool bVerbose, t_atoms *atoms, PreprocessingAtomTypes *atypes,
- gmx::ArrayRef<InteractionTypeParameters> plist)
+ gmx::ArrayRef<InteractionsOfType> plist)
{
int ftype;
int nvsite, nrbond, nrang, nridih, nrset;
if (debug)
{
fprintf(debug, "bSet=%s ", gmx::boolToString(bSet));
- printInteractionType(debug, ftype, i, plist[ftype].interactionTypes[i]);
+ printInteractionOfType(debug, ftype, i, plist[ftype].interactionTypes[i]);
}
if (!bSet)
{
}
-typedef struct {
- int ftype, parnr;
-} t_pindex;
+/*! \brief
+ * Convenience typedef for linking function type to parameter numbers.
+ *
+ * The entries in this datastructure are valid if the particle participates in
+ * a virtual site interaction and has a valid vsite function type other than VSITEN.
+ * \todo Change to remove empty constructor when gmx::compat::optional is available.
+ */
+class VsiteAtomMapping
+{
+ public:
+ //! Only construct with all information in place or nothing
+ VsiteAtomMapping(int functionType, int interactionIndex)
+ : functionType_(functionType), interactionIndex_(interactionIndex)
+ {}
+ VsiteAtomMapping()
+ : functionType_(-1), interactionIndex_(-1)
+ {}
+ //! Get function type.
+ const int &functionType() const { return functionType_; }
+ //! Get parameter number.
+ const int &interactionIndex() const { return interactionIndex_; };
+ private:
+ //! Function type for the linked parameter.
+ int functionType_;
+ //! The linked parameter.
+ int interactionIndex_;
+};
-static void check_vsite_constraints(gmx::ArrayRef<InteractionTypeParameters> plist,
+static void check_vsite_constraints(gmx::ArrayRef<InteractionsOfType> plist,
int cftype, const int vsite_type[])
{
int n = 0;
}
}
-static void clean_vsite_bonds(gmx::ArrayRef<InteractionTypeParameters> plist, t_pindex pindex[],
+static void clean_vsite_bonds(gmx::ArrayRef<InteractionsOfType> plist,
+ gmx::ArrayRef<const VsiteAtomMapping> pindex,
int cftype, const int vsite_type[])
{
int ftype, nOut;
int nconverted, nremoved;
int oatom, at1, at2;
bool bKeep, bRemove, bAllFD;
- InteractionTypeParameters *ps;
+ InteractionsOfType *ps;
if (cftype == F_CONNBONDS)
{
if (vsite_type[atom] != NOTSET && vsite_type[atom] != F_VSITEN)
{
nvsite++;
- bool bThisFD = ( (pindex[atom].ftype == F_VSITE3FD ) ||
- (pindex[atom].ftype == F_VSITE3FAD) ||
- (pindex[atom].ftype == F_VSITE4FD ) ||
- (pindex[atom].ftype == F_VSITE4FDN ) );
- bool bThisOUT = ( (pindex[atom].ftype == F_VSITE3OUT) &&
+ bool bThisFD = ( (pindex[atom].functionType() == F_VSITE3FD ) ||
+ (pindex[atom].functionType() == F_VSITE3FAD) ||
+ (pindex[atom].functionType() == F_VSITE4FD ) ||
+ (pindex[atom].functionType() == F_VSITE4FDN ) );
+ bool bThisOUT = ( (pindex[atom].functionType() == F_VSITE3OUT) &&
((interaction_function[cftype].flags & IF_CONSTRAINT) != 0u) );
bAllFD = bAllFD && bThisFD;
if (bThisFD || bThisOUT)
{
oatom = atoms[1-k]; /* the other atom */
if (vsite_type[oatom] == NOTSET &&
- oatom == plist[pindex[atom].ftype].interactionTypes[pindex[atom].parnr].aj())
+ oatom == plist[pindex[atom].functionType()].interactionTypes[pindex[atom].interactionIndex()].aj())
{
/* if the other atom isn't a vsite, and it is AI */
bRemove = true;
/* TODO This would be nicer to implement with
a C++ "vector view" class" with an
STL-container-like interface. */
- vsnral = NRAL(pindex[atom].ftype) - 1;
- first_atoms = plist[pindex[atom].ftype].interactionTypes[pindex[atom].parnr].atoms().data() + 1;
+ vsnral = NRAL(pindex[atom].functionType()) - 1;
+ first_atoms = plist[pindex[atom].functionType()].interactionTypes[pindex[atom].interactionIndex()].atoms().data() + 1;
}
else
{
GMX_ASSERT(first_atoms != nullptr, "nvsite > 1 must have first_atoms != NULL");
/* if it is not the first then
check if this vsite is constructed from the same atoms */
- if (vsnral == NRAL(pindex[atom].ftype)-1)
+ if (vsnral == NRAL(pindex[atom].functionType())-1)
{
for (int m = 0; (m < vsnral) && !bKeep; m++)
{
const int *atoms;
bool bPresent = false;
- atoms = plist[pindex[atom].ftype].interactionTypes[pindex[atom].parnr].atoms().data() + 1;
+ atoms = plist[pindex[atom].functionType()].interactionTypes[pindex[atom].interactionIndex()].atoms().data() + 1;
for (int n = 0; (n < vsnral) && !bPresent; n++)
{
if (atoms[m] == first_atoms[n])
}
}
-static void clean_vsite_angles(gmx::ArrayRef<InteractionTypeParameters> plist, t_pindex pindex[],
+static void clean_vsite_angles(gmx::ArrayRef<InteractionsOfType> plist,
+ gmx::ArrayRef<VsiteAtomMapping> pindex,
int cftype, const int vsite_type[],
gmx::ArrayRef<const Atom2VsiteConnection> at2vc)
{
int atom, at1, at2;
- InteractionTypeParameters *ps;
+ InteractionsOfType *ps;
ps = &(plist[cftype]);
int oldSize = ps->size();
if (vsite_type[atom] != NOTSET && vsite_type[atom] != F_VSITEN)
{
nvsite++;
- bAll3FAD = bAll3FAD && (pindex[atom].ftype == F_VSITE3FAD);
+ bAll3FAD = bAll3FAD && (pindex[atom].functionType() == F_VSITE3FAD);
if (nvsite == 1)
{
/* store construction atoms of first vsite */
- vsnral = NRAL(pindex[atom].ftype) - 1;
- first_atoms = plist[pindex[atom].ftype].interactionTypes[pindex[atom].parnr].atoms().data() + 1;
+ vsnral = NRAL(pindex[atom].functionType()) - 1;
+ first_atoms = plist[pindex[atom].functionType()].interactionTypes[pindex[atom].interactionIndex()].atoms().data() + 1;
}
else
{
GMX_ASSERT(vsnral != 0, "If we've seen a vsite before, we know how many constructing atoms it had");
GMX_ASSERT(first_atoms != nullptr, "If we've seen a vsite before, we know what its first atom index was");
/* check if this vsite is constructed from the same atoms */
- if (vsnral == NRAL(pindex[atom].ftype)-1)
+ if (vsnral == NRAL(pindex[atom].functionType())-1)
{
for (int m = 0; (m < vsnral) && !bKeep; m++)
{
const int *subAtoms;
bool bPresent = false;
- subAtoms = plist[pindex[atom].ftype].interactionTypes[pindex[atom].parnr].atoms().data() + 1;
+ subAtoms = plist[pindex[atom].functionType()].interactionTypes[pindex[atom].interactionIndex()].atoms().data() + 1;
for (int n = 0; (n < vsnral) && !bPresent; n++)
{
if (subAtoms[m] == first_atoms[n])
}
}
-static void clean_vsite_dihs(gmx::ArrayRef<InteractionTypeParameters> plist, t_pindex pindex[],
+static void clean_vsite_dihs(gmx::ArrayRef<InteractionsOfType> plist,
+ gmx::ArrayRef<const VsiteAtomMapping> pindex,
int cftype, const int vsite_type[])
{
- InteractionTypeParameters *ps;
+ InteractionsOfType *ps;
ps = &(plist[cftype]);
if (nvsite == 0)
{
/* store construction atoms of first vsite */
- vsnral = NRAL(pindex[atom].ftype) - 1;
- first_atoms = plist[pindex[atom].ftype].interactionTypes[pindex[atom].parnr].atoms().data() + 1;
+ vsnral = NRAL(pindex[atom].functionType()) - 1;
+ first_atoms = plist[pindex[atom].functionType()].interactionTypes[pindex[atom].interactionIndex()].atoms().data() + 1;
}
else
{
GMX_ASSERT(vsnral != 0, "If we've seen a vsite before, we know how many constructing atoms it had");
GMX_ASSERT(first_atoms != nullptr, "If we've seen a vsite before, we know what its first atom index was");
/* check if this vsite is constructed from the same atoms */
- if (vsnral == NRAL(pindex[atom].ftype)-1)
+ if (vsnral == NRAL(pindex[atom].functionType())-1)
{
for (int m = 0; (m < vsnral) && !bKeep; m++)
{
const int *subAtoms;
bool bPresent = false;
- subAtoms = plist[pindex[atom].ftype].interactionTypes[pindex[atom].parnr].atoms().data() + 1;
+ subAtoms = plist[pindex[atom].functionType()].interactionTypes[pindex[atom].interactionIndex()].atoms().data() + 1;
for (int n = 0; (n < vsnral) && !bPresent; n++)
{
if (subAtoms[m] == first_atoms[n])
}
}
-void clean_vsite_bondeds(gmx::ArrayRef<InteractionTypeParameters> plist, int natoms, bool bRmVSiteBds)
+// TODO use gmx::compat::optional for pindex.
+void clean_vsite_bondeds(gmx::ArrayRef<InteractionsOfType> plist, int natoms, bool bRmVSiteBds)
{
- int nvsite, vsite;
- int *vsite_type;
- t_pindex *pindex;
- std::vector<Atom2VsiteConnection> at2vc;
+ int nvsite, vsite;
+ int *vsite_type;
+ std::vector<VsiteAtomMapping> pindex;
+ std::vector<Atom2VsiteConnection> at2vc;
- pindex = nullptr; /* avoid warnings */
/* make vsite_type array */
snew(vsite_type, natoms);
for (int i = 0; i < natoms; i++)
/* Make a reverse list to avoid ninteractions^2 operations */
at2vc = make_at2vsitecon(natoms, plist);
- snew(pindex, natoms);
+ pindex.resize(natoms);
for (int ftype = 0; ftype < F_NRE; ftype++)
{
/* Here we skip VSITEN. In neary all practical use cases this
if ((interaction_function[ftype].flags & IF_VSITE) &&
ftype != F_VSITEN)
{
- for (int parnr = 0; (parnr < gmx::ssize(plist[ftype])); parnr++)
+ for (int interactionIndex = 0;
+ interactionIndex < gmx::ssize(plist[ftype]);
+ interactionIndex++)
{
- int k = plist[ftype].interactionTypes[parnr].ai();
- pindex[k].ftype = ftype;
- pindex[k].parnr = parnr;
+ int k = plist[ftype].interactionTypes[interactionIndex].ai();
+ pindex[k] = VsiteAtomMapping(ftype, interactionIndex);
}
}
}
}
}
- sfree(pindex);
sfree(vsite_type);
}
class PreprocessingAtomTypes;
struct gmx_moltype_t;
struct t_atoms;
-struct InteractionTypeParameters;
+struct InteractionsOfType;
int set_vsites(bool bVerbose, t_atoms *atoms, PreprocessingAtomTypes *atype,
- gmx::ArrayRef<InteractionTypeParameters> plist);
+ gmx::ArrayRef<InteractionsOfType> plist);
/* set parameters for virtual sites, return number of virtual sites */
void set_vsites_ptype(bool bVerbose, gmx_moltype_t *molt);
*
* Throw away all obsolete bonds, angles and dihedrals.
* Throw away all constraints. */
-void clean_vsite_bondeds(gmx::ArrayRef<InteractionTypeParameters> ps, int natoms, bool bRmVSiteBds);
+void clean_vsite_bondeds(gmx::ArrayRef<InteractionsOfType> ps, int natoms, bool bRmVSiteBds);
#endif
}
static void mk_bonds(int nnm, t_nm2type nmt[],
- t_atoms *atoms, const rvec x[], InteractionTypeParameters *bond, int nbond[],
+ t_atoms *atoms, const rvec x[], InteractionsOfType *bond, int nbond[],
bool bPBC, matrix box)
{
int i, j;
{
forceParam[0] = std::sqrt(dx2);
std::vector<int> atoms = {i, j};
- add_param_to_list (bond, InteractionType(atoms, forceParam));
+ add_param_to_list (bond, InteractionOfType(atoms, forceParam));
nbond[i]++;
nbond[j]++;
}
static void set_atom_type(PreprocessingAtomTypes *atypes,
t_symtab *tab,
t_atoms *atoms,
- InteractionTypeParameters *bonds,
+ InteractionsOfType *bonds,
int *nbonds,
int nnm,
t_nm2type nm2t[])
atypes->size());
}
-static void lo_set_force_const(InteractionTypeParameters *plist, real c[], int nrfp, bool bRound,
+static void lo_set_force_const(InteractionsOfType *plist, real c[], int nrfp, bool bRound,
bool bDih, bool bParam)
{
double cc;
forceParam[j] = c[j];
forceParam[nrfp+j] = c[j];
}
- param = InteractionType(param.atoms(), forceParam);
+ param = InteractionOfType(param.atoms(), forceParam);
}
}
-static void set_force_const(gmx::ArrayRef<InteractionTypeParameters> plist, real kb, real kt, real kp, bool bRound,
+static void set_force_const(gmx::ArrayRef<InteractionsOfType> plist, real kb, real kt, real kp, bool bRound,
bool bParam)
{
real c[MAXFORCEPARAM];
lo_set_force_const(&plist[F_PDIHS], c, 3, bRound, TRUE, bParam);
}
-static void calc_angles_dihs(InteractionTypeParameters *ang, InteractionTypeParameters *dih, const rvec x[], bool bPBC,
+static void calc_angles_dihs(InteractionsOfType *ang, InteractionsOfType *dih, const rvec x[], bool bPBC,
matrix box)
{
int t1, t2, t3;
}
}
-static void print_pl(FILE *fp, gmx::ArrayRef<const InteractionTypeParameters> plist, int ftp, const char *name,
+static void print_pl(FILE *fp, gmx::ArrayRef<const InteractionsOfType> plist, int ftp, const char *name,
char ***atomname)
{
if (!plist[ftp].interactionTypes.empty())
static void print_rtp(const char *filenm,
const char *title,
t_atoms *atoms,
- gmx::ArrayRef<const InteractionTypeParameters> plist,
+ gmx::ArrayRef<const InteractionsOfType> plist,
PreprocessingAtomTypes *atypes,
int cgnr[])
{
"The atoms to atomtype translation table is incomplete ([TT]atomname2type.n2t[tt] file in the data directory). Please extend it and send the results back to the GROMACS crew."
};
FILE *fp;
- std::array<InteractionTypeParameters, F_NRE> plist;
+ std::array<InteractionsOfType, F_NRE> plist;
t_excls *excls;
t_nextnb nnb;
t_nm2type *nm2t;