Gromacs  2026.0-dev-20241213-9ac17bb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations | Functions
hackblock.h File Reference
#include <cstdio>
#include <array>
#include <string>
#include <vector>
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/utility/enumerationhelpers.h"
+ Include dependency graph for hackblock.h:

Description

Methods to modify atoms during preprocessing.

Classes

class  gmx::ArrayRef< typename >
 STL-like interface to a C array of T (or part of a std container of T). More...
 
struct  BondedInteraction
 Information about single bonded interaction. More...
 
struct  BondedInteractionList
 Accumulation of different bonded types for preprocessing. More...
 
struct  PreprocessResidue
 Information about preprocessing residues. More...
 
struct  MoleculePatch
 Block to modify individual residues. More...
 
struct  MoleculePatchDatabase
 A set of modifications to apply to atoms. More...
 

Enumerations

enum  BondedTypes : int {
  Bonds, Angles, ProperDihedrals, ImproperDihedrals,
  Exclusions, Cmap, Count
}
 Used for reading .rtp/.tdb BondedTypes::Bonds must be the first, new types can be added to the end these MUST correspond to the arrays in hackblock.cpp.
 
enum  MoleculePatchType { MoleculePatchType::Add, MoleculePatchType::Delete, MoleculePatchType::Replace }
 Declare different types of hacks for later check. More...
 

Functions

const char * enumValueToString (BondedTypes enumValue)
 Names for interaction type entries.
 
int enumValueToNumIAtoms (BondedTypes enumValue)
 Numbers for atoms in the interactions.
 
void clearModificationBlock (MoleculePatchDatabase *globalPatches)
 Reset modification block. More...
 
void copyPreprocessResidues (const PreprocessResidue &s, PreprocessResidue *d, t_symtab *symtab)
 Copy residue information. More...
 
bool mergeBondedInteractionList (gmx::ArrayRef< const BondedInteractionList > s, gmx::ArrayRef< BondedInteractionList > d, bool bMin, bool bPlus)
 Add bond information in s to d. More...
 
void copyModificationBlocks (const MoleculePatchDatabase &s, MoleculePatchDatabase *d)
 Copy all information from datastructure. More...
 
void mergeAtomModifications (const MoleculePatchDatabase &s, MoleculePatchDatabase *d)
 Add the individual modifications in s to d. More...
 
void mergeAtomAndBondModifications (const MoleculePatchDatabase &s, MoleculePatchDatabase *d)
 Add the individual modifications in s to d. More...
 

Enumeration Type Documentation

enum MoleculePatchType
strong

Declare different types of hacks for later check.

Enumerator
Add 

Hack adds atom to structure/rtp.

Delete 

Hack deletes atom.

Replace 

Hack replaces atom.

Function Documentation

void clearModificationBlock ( MoleculePatchDatabase globalPatches)

Reset modification block.

Parameters
[in,out]globalPatchesBlock to reset.
Todo:
Remove once constructor/destructor takes care of all of this.
void copyModificationBlocks ( const MoleculePatchDatabase s,
MoleculePatchDatabase d 
)

Copy all information from datastructure.

Parameters
[in]sSource information.
[in,out]dDestination to copy to.
void copyPreprocessResidues ( const PreprocessResidue s,
PreprocessResidue d,
t_symtab *  symtab 
)

Copy residue information.

Parameters
[in]sSource information.
[in]dDestination to copy to.
[in,out]symtabSymbol table for names.
Todo:
Remove once copy can be done directly.
void mergeAtomAndBondModifications ( const MoleculePatchDatabase s,
MoleculePatchDatabase d 
)

Add the individual modifications in s to d.

Parameters
[in]sSource information.
[in,out]dDestination to copy to.
void mergeAtomModifications ( const MoleculePatchDatabase s,
MoleculePatchDatabase d 
)

Add the individual modifications in s to d.

Parameters
[in]sSource information.
[in,out]dDestination to copy to.
bool mergeBondedInteractionList ( gmx::ArrayRef< const BondedInteractionList s,
gmx::ArrayRef< BondedInteractionList d,
bool  bMin,
bool  bPlus 
)

Add bond information in s to d.

Parameters
[in]sSource information to copy.
[in,out]dDestination to copy to.
[in]bMindon't copy bondeds with atoms starting with '-'.
[in]bPlusdon't copy bondeds with atoms starting with '+'.
Returns
if bonds were removed at the termini.