* ebtsBONDS must be the first, new types can be added to the end
* these *MUST* correspond to the arrays in hackblock.cpp
*/
-enum {
- ebtsBONDS, ebtsANGLES, ebtsPDIHS, ebtsIDIHS, ebtsEXCLS, ebtsCMAP, ebtsNR
+enum
+{
+ ebtsBONDS,
+ ebtsANGLES,
+ ebtsPDIHS,
+ ebtsIDIHS,
+ ebtsEXCLS,
+ ebtsCMAP,
+ ebtsNR
};
//! Names for interaction type entries
-extern const char *btsNames[ebtsNR];
+extern const char* btsNames[ebtsNR];
//! Numbers for atoms in the interactions.
-extern const int btsNiatoms[ebtsNR];
+extern const int btsNiatoms[ebtsNR];
/* if changing any of these structs, make sure that all of the
free/clear/copy/merge_t_* functions stay updated */
* .rtp/.tdb to .top and will be parsed by cpp
* during grompp.
*/
- std::string s;
+ std::string s;
//! Has the entry been found?
- bool match = false;
+ bool match = false;
//! Get name of first atom in bonded interaction.
- const std::string &ai() const { return a[0]; }
+ const std::string& ai() const { return a[0]; }
//! Get name of second atom in bonded interaction..
- const std::string &aj() const { return a[1]; }
+ const std::string& aj() const { return a[1]; }
//! Get name of third atom in bonded interaction.
- const std::string &ak() const { return a[2]; }
+ const std::string& ak() const { return a[2]; }
//! Get name of fourth atom in bonded interaction.
- const std::string &al() const { return a[3]; }
+ const std::string& al() const { return a[3]; }
//! Get name of fifth atom in bonded interaction.
- const std::string &am() const { return a[4]; }
+ const std::string& am() const { return a[4]; }
};
/*! \libinternal \brief
struct BondedInteractionList
{
//! The type of bonded interaction.
- int type = -1;
+ int type = -1;
//! The actual bonded interactions.
std::vector<BondedInteraction> b;
};
struct PreprocessResidue
{
//! Name of the residue.
- std::string resname;
+ std::string resname;
//! The base file name this rtp entry was read from.
- std::string filebase;
+ std::string filebase;
//! Atom data.
- std::vector<t_atom> atom;
+ std::vector<t_atom> atom;
//! Atom names.
- std::vector<char **> atomname;
+ std::vector<char**> atomname;
//! Charge group numbers.
- std::vector<int> cgnr;
+ std::vector<int> cgnr;
//! Delete autogenerated dihedrals or not.
- bool bKeepAllGeneratedDihedrals = false;
+ bool bKeepAllGeneratedDihedrals = false;
//! Number of bonded exclusions.
- int nrexcl = -1;
+ int nrexcl = -1;
//! If Hydrogen only 1-4 interactions should be generated.
- bool bGenerateHH14Interactions = false;
+ bool bGenerateHH14Interactions = false;
//! Delete dihedrals also defined by impropers.
- bool bRemoveDihedralIfWithImproper = false;
+ bool bRemoveDihedralIfWithImproper = false;
//! List of bonded interactions to potentially add.
std::array<BondedInteractionList, ebtsNR> rb;
//! Get number of atoms in residue.
- int natom() const { return atom.size(); }
+ int natom() const { return atom.size(); }
};
//! Declare different types of hacks for later check.
struct MoleculePatch
{
//! Number of new are deleted atoms. NOT always equal to atom.size()!
- int nr;
+ int nr;
//! Old name for entry.
- std::string oname;
+ std::string oname;
//! New name for entry.
- std::string nname;
+ std::string nname;
//! New atom data.
- std::vector<t_atom> atom;
+ std::vector<t_atom> atom;
//! Chargegroup number.
- int cgnr = NOTSET;
+ int cgnr = NOTSET;
//! Type of attachement.
- int tp = 0;
+ int tp = 0;
//! Number of control atoms.
- int nctl = 0;
+ int nctl = 0;
//! Name of control atoms.
std::array<std::string, 4> a;
//! Is an atom to be hacked already present?
- bool bAlreadyPresent = false;
+ bool bAlreadyPresent = false;
//! Are coordinates for a new atom already set?
- bool bXSet = false;
+ bool bXSet = false;
//! New position for hacked atom.
- rvec newx = {NOTSET};
+ rvec newx = { NOTSET };
//! New atom index number after additions.
- int newi = -1;
+ int newi = -1;
/*! \brief
* Get type of hack.
MoleculePatchType type() const;
//! Control atom i name.
- const std::string &ai() const { return a[0]; }
+ const std::string& ai() const { return a[0]; }
//! Control atom j name.
- const std::string &aj() const { return a[1]; }
+ const std::string& aj() const { return a[1]; }
//! Control atom k name.
- const std::string &ak() const { return a[2]; }
+ const std::string& ak() const { return a[2]; }
//! Control atom l name.
- const std::string &al() const { return a[3]; }
+ const std::string& al() const { return a[3]; }
};
/*! \libinternal \brief
* A set of modifications to apply to atoms.
struct MoleculePatchDatabase
{
//! Name of block
- std::string name;
+ std::string name;
//! File that entry was read from.
- std::string filebase;
+ std::string filebase;
//! List of changes to atoms.
- std::vector<MoleculePatch> hack;
+ std::vector<MoleculePatch> hack;
//! List of bonded interactions to potentially add.
- std::array<BondedInteractionList, ebtsNR> rb;
+ std::array<BondedInteractionList, ebtsNR> rb;
//! Number of atoms to modify
- int nhack() const { return hack.size(); }
+ int nhack() const { return hack.size(); }
};
/*!\brief
* \param[inout] globalPatches Block to reset.
* \todo Remove once constructor/destructor takes care of all of this.
*/
-void clearModificationBlock(MoleculePatchDatabase *globalPatches);
+void clearModificationBlock(MoleculePatchDatabase* globalPatches);
/*!\brief
* Copy residue information.
* \param[inout] symtab Symbol table for names.
* \todo Remove once copy can be done directly.
*/
-void copyPreprocessResidues(const PreprocessResidue &s, PreprocessResidue *d, t_symtab *symtab);
+void copyPreprocessResidues(const PreprocessResidue& s, PreprocessResidue* d, t_symtab* symtab);
/*! \brief
* Add bond information in \p s to \p d.
* \returns if bonds were removed at the termini.
*/
bool mergeBondedInteractionList(gmx::ArrayRef<const BondedInteractionList> s,
- gmx::ArrayRef<BondedInteractionList> d,
- bool bMin, bool bPlus);
+ gmx::ArrayRef<BondedInteractionList> d,
+ bool bMin,
+ bool bPlus);
/*! \brief
* Copy all information from datastructure.
* \param[in] s Source information.
* \param[inout] d Destination to copy to.
*/
-void copyModificationBlocks(const MoleculePatchDatabase &s, MoleculePatchDatabase *d);
+void copyModificationBlocks(const MoleculePatchDatabase& s, MoleculePatchDatabase* d);
/*!\brief
* Add the individual modifications in \p s to \p d.
* \param[in] s Source information.
* \param[inout] d Destination to copy to.
*/
-void mergeAtomModifications(const MoleculePatchDatabase &s, MoleculePatchDatabase *d);
+void mergeAtomModifications(const MoleculePatchDatabase& s, MoleculePatchDatabase* d);
//! \copydoc mergeAtomModifications
-void mergeAtomAndBondModifications(const MoleculePatchDatabase &s, MoleculePatchDatabase *d);
+void mergeAtomAndBondModifications(const MoleculePatchDatabase& s, MoleculePatchDatabase* d);
#endif