Gromacs  2027.0-dev-20261008-fb846ce5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
gmx::anonymous_namespace{grompp.cpp} Namespace Reference

Classes

struct  ComSumContents
 Struct containing the quantities calculated by sumComForRestraints. More...
 

Functions

int rm_interactions (InteractionFunction ftype, ArrayRef< MoleculeInformation > mols)
 
int check_atom_names (const char *fn1, const char *fn2, gmx_mtop_t *mtop, const t_atoms *at, const MDLogger &logger)
 
void check_bonds_timestep (const gmx_mtop_t *mtop, double dt, WarningHandler *wi)
 
void clearSpecialParticleVelocities (const bool bGenVel, const t_inputrec &ir, const gmx_mtop_t &mtop, ArrayRef< RVec > v)
 Zeroes velocity components for special particles. More...
 
void check_shells_inputrec (gmx_mtop_t *mtop, t_inputrec *ir, WarningHandler *wi)
 
int nint_ftype (gmx_mtop_t *mtop, ArrayRef< const MoleculeInformation > mi, InteractionFunction ftype)
 
void renumber_moltypes (gmx_mtop_t *sys, std::vector< MoleculeInformation > *molinfo)
 
void molinfo2mtop (ArrayRef< const MoleculeInformation > mi, gmx_mtop_t *mtop)
 
void new_status (const char *topfile, const std::optional< std::filesystem::path > &topppfile, const char *confin, t_gromppopts *opts, t_inputrec *ir, gmx_bool bZero, bool bGenVel, bool bVerbose, t_state *state, PreprocessingAtomTypes *atypes, gmx_mtop_t *sys, std::vector< MoleculeInformation > *mi, std::unique_ptr< MoleculeInformation > *intermolecular_interactions, EnumerationArray< InteractionFunction, InteractionsOfType > &interactions, CombinationRule *comb, double *reppow, real *fudgeQQ, gmx_bool bMorse, WarningHandler *wi, const MDLogger &logger)
 
void copy_state (const char *slog, t_trxframe *fr, bool bReadVel, t_state *state, double *use_time)
 
void cont_status (const char *slog, const std::optional< std::filesystem::path > &ener, bool bNeedVel, bool bGenVel, real fr_time, t_inputrec *ir, t_state *state, gmx_mtop_t *sys, const gmx_output_env_t *oenv, const MDLogger &logger)
 
void read_posres (gmx_mtop_t *mtop, ArrayRef< const MoleculeInformation > molinfo, gmx_bool bTopB, const char *fn, RefCoordScaling rc_scaling, PbcType pbcType, WarningHandler *wi)
 
std::vector< ComSumContents > sumComForRestraints (ArrayRef< const RVec > positionRestraintCoordinates, const MoleculeBlockIndices &inds, ArrayRef< const unsigned char > groupInds, const int numGroups, const t_atoms &atoms)
 Sum mass and mass*position of restrained atoms.
 
void subComFromRestraints (ArrayRef< const RVec > comPerGroup, const MoleculeBlockIndices &inds, ArrayRef< const unsigned char > groupInds, const PbcType pbcType, ArrayRef< RVec > positionRestraintCoordinates)
 Subtracts COM position from position restraints.
 
std::vector< RVec > calcPosresCom (gmx_mtop_t *mtop, const bool haveTopologyB, PbcType pbcType, const matrix box, const MDLogger &logger)
 Computes the center of mass of restrained atoms and subtracts it from restrain coordinates. More...
 
void gen_posres (gmx_mtop_t *mtop, ArrayRef< const MoleculeInformation > mi, const char *fnA, const char *fnB, RefCoordScaling rc_scaling, PbcType pbcType, WarningHandler *wi)
 
void set_wall_atomtype (PreprocessingAtomTypes *at, t_gromppopts *opts, t_inputrec *ir, WarningHandler *wi, const MDLogger &logger)
 
int nrdf_internal (const t_atoms *atoms)
 
void spline1d (double dx, const double *y, int n, double *u, double *y2)
 
void interpolate1d (double xmin, double dx, const double *ya, const double *y2a, double x, double *y, double *y1)
 
CmapGrids fillCmapGrids (ArrayRef< const CmapInteractionType > cmapTypes)
 
int count_constraints (const gmx_mtop_t *mtop, ArrayRef< const MoleculeInformation > mi, WarningHandler *wi)
 
real calc_temp (const gmx_mtop_t *mtop, const t_inputrec *ir, rvec *v)
 
real get_max_reference_temp (const t_inputrec *ir, WarningHandler *wi)
 
void checkForUnboundAtoms (const gmx_moltype_t *molt, gmx_bool bVerbose, WarningHandler *wi, const MDLogger &logger)
 
void checkForUnboundAtoms (const gmx_mtop_t *mtop, gmx_bool bVerbose, WarningHandler *wi, const MDLogger &logger)
 
bool haveDecoupledModeInMol (const gmx_moltype_t &molt, ArrayRef< const t_iparams > iparams, real massFactorThreshold)
 Checks if there are decoupled modes in moleculetype molt. More...
 
void checkDecoupledModeAccuracy (const gmx_mtop_t *mtop, const t_inputrec *ir, WarningHandler *wi)
 Checks if the Verlet buffer and constraint accuracy is sufficient for decoupled dynamic modes. More...
 
void set_verlet_buffer (const gmx_mtop_t *mtop, t_inputrec *ir, real buffer_temp, ArrayRef< const RVec > coordinates, matrix box, WarningHandler *wi, const MDLogger &logger)
 
std::tuple< real, int, int > maxNonPerturbedExclusionDistance (const gmx_mtop_t &mtop, const bool useFep, const PbcType pbcType, ArrayRef< const RVec > x, const matrix box)
 
void checkExclusionDistances (const gmx_mtop_t &mtop, const t_inputrec &ir, ArrayRef< const RVec > x, const matrix box, const MDLogger &logger, WarningHandler *wi)
 
void deformInitFlow (t_state *state, const matrix deform)
 Add the velocity profile of deform to the velocities in state.
 

Function Documentation

std::vector<RVec> gmx::anonymous_namespace{grompp.cpp}::calcPosresCom ( gmx_mtop_t *  mtop,
const bool  haveTopologyB,
PbcType  pbcType,
const matrix  box,
const MDLogger &  logger 
)

Computes the center of mass of restrained atoms and subtracts it from restrain coordinates.

mtop contains the restraint reference coordinates which are shifted by the COM.

Number of specified groups for independent COM scaling.

Subtract COM from posres positions

void gmx::anonymous_namespace{grompp.cpp}::checkDecoupledModeAccuracy ( const gmx_mtop_t *  mtop,
const t_inputrec *  ir,
WarningHandler *  wi 
)

Checks if the Verlet buffer and constraint accuracy is sufficient for decoupled dynamic modes.

When decoupled modes are present and the accuracy in insufficient, this routine issues a warning if the accuracy is insufficient.

void gmx::anonymous_namespace{grompp.cpp}::clearSpecialParticleVelocities ( const bool  bGenVel,
const t_inputrec &  ir,
const gmx_mtop_t &  mtop,
ArrayRef< RVec >  v 
)

Zeroes velocity components for special particles.

Shells and virtual sites have their degrees of freedom constructed from other particles and thus do not have velocity. Particles with frozen dimensions likewise do not have velocities. These should be zeroed during grompp, so users cannot be concerned over observing a non-zero velocity, and if they see one it's a bug.

The implementation is fairly efficient even for an enormous system, but many simulations have none of these special atom types and would waste time here. If we need to optimize, then we can make the previous code count the numbers of such particles and then we would know in advance whether we need to do such clearing.

bool gmx::anonymous_namespace{grompp.cpp}::haveDecoupledModeInMol ( const gmx_moltype_t &  molt,
ArrayRef< const t_iparams >  iparams,
real  massFactorThreshold 
)

Checks if there are decoupled modes in moleculetype molt.

The specific decoupled modes this routine check for are angle modes where the two bonds are constrained and the atoms a both ends are only involved in a single constraint; the mass of the two atoms needs to differ by more than massFactorThreshold.