Gromacs  2026.0-dev-20250215-e896270
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions
gmx::QMMMTopologyPreprocessor Class Reference

#include <gromacs/applied_forces/qmmm/qmmmtopologypreprocessor.h>

+ Inheritance diagram for gmx::QMMMTopologyPreprocessor:

Description

Class implementing gmx_mtop_t QMMM modifications during preprocessing 1) Split QM-containing molecules from other molecules in blocks 2) Nullify charges on all virtual sites consisting of QM only atoms 3) Nullifies charges on all QM atoms 4) Excludes LJ interactions between QM atoms 5) Builds vector with atomic numbers of all atoms 6) Makes F_CONNBOND between atoms within QM region 7) Removes angles and settles containing 2 or more QM atoms 8) Removes dihedrals containing 3 or more QM atoms 9) Builds vector containing pairs of bonded QM - MM atoms (Link frontier)

Public Member Functions

 QMMMTopologyPreprocessor (ArrayRef< const Index > qmIndices)
 Constructor for QMMMTopologyPreprocessor from its parameters. More...
 
void preprocess (gmx_mtop_t *mtop)
 Pocesses mtop topology and prepares atomNumbers_ and linkFrontier_ vectors Builds topInfo_ containing information about topology modifications. More...
 
const QMMMTopologyInfotopInfo () const
 Returns data about modifications made via QMMMTopologyInfo.
 
ArrayRef< const int > atomNumbers () const
 Returns view of atomic numbers for all atoms in the processed topology.
 
ArrayRef< const realatomCharges () const
 Returns view of point charges for all atoms in the processed topology.
 
ArrayRef< const LinkFrontierlinkFrontier () const
 Returns view of the whole Link Frontier for the processed topology.
 

Protected Member Functions

bool isQMAtom (Index globalAtomIndex)
 Retruns true if globalAtomIndex belongs to QM region.
 
void splitQMblocks (gmx_mtop_t *mtop)
 Splits QM containing molecules out of MM blocks in topology Modifies blocks in topology Updates bQMBlock vector containing QM flags of all blocks in modified mtop.
 
void removeQMClassicalCharges (gmx_mtop_t *mtop)
 Removes classical charges from QM atoms Provides data about removed charge via topInfo_.
 
void addQMLJExclusions (gmx_mtop_t *mtop)
 Build exlusion list for LJ interactions between QM atoms.
 
void buildQMMMAtomNumbers (gmx_mtop_t *mtop)
 Builds atomNumbers_ vector Provides data about total number of QM and MM atoms via topInfo_.
 
void modifyQMMMTwoCenterInteractions (gmx_mtop_t *mtop)
 Modifies pairwise bonded interactions Removes any other pairwise bonded interactions between QM-QM atoms Creates F_CONNBOND between QM atoms Any restraints and constraints will be kept Provides data about modifications via topInfo_.
 
void buildQMMMLink (gmx_mtop_t *mtop)
 Builds link_ vector with pairs of atoms indicting broken QM - MM chemical bonds. Also performs search of constrained bonds within QM subsystem.
 
void modifyQMMMThreeCenterInteractions (gmx_mtop_t *mtop)
 Modifies three-centers interactions (i.e. Angles, Settles) Removes any other three-centers bonded interactions including 2 or more QM atoms Any restraints and constraints will be kept Any F_SETTLE containing QM atoms will be converted to the pair of F_CONNBONDS Provides data about modifications via topInfo_.
 
void modifyQMMMFourCenterInteractions (gmx_mtop_t *mtop)
 Modifies four-centers interactions Removes any other four-centers bonded interactions including 3 or more QM atoms Any restraints and constraints will be kept Provides data about modifications via topInfo_.
 
void modifyQMMMVirtualSites (gmx_mtop_t *mtop)
 Removes charge from all virtual sites which are consists of only QM atoms.
 

Constructor & Destructor Documentation

gmx::QMMMTopologyPreprocessor::QMMMTopologyPreprocessor ( ArrayRef< const Index qmIndices)

Constructor for QMMMTopologyPreprocessor from its parameters.

Parameters
[in]qmIndicesArray with global indicies of QM atoms

Member Function Documentation

void gmx::QMMMTopologyPreprocessor::preprocess ( gmx_mtop_t *  mtop)

Pocesses mtop topology and prepares atomNumbers_ and linkFrontier_ vectors Builds topInfo_ containing information about topology modifications.

Parameters
[in,out]mtopTopology that needs to be modified

The documentation for this class was generated from the following files: