Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
constr.cpp File Reference
#include "gmxpre.h"
#include "constr.h"
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/essentialdynamics/edsam.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/pdbio.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/lincs.h"
#include "gromacs/mdlib/settle.h"
#include "gromacs/mdlib/shake.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/ifunc.h"
#include "gromacs/topology/mtop_lookup.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/pleasecite.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/txtdump.h"
+ Include dependency graph for constr.cpp:

Description

Defines the high-level constraint code.

Author
Berk Hess hess@.nosp@m.kth..nosp@m.se
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Functions

static void gmx::clear_constraint_quantity_nonlocal (gmx_domdec_t *dd, rvec *q)
 Clears constraint quantities for atoms in nonlocal region.
 
void gmx::too_many_constraint_warnings (int eConstrAlg, int warncount)
 Generate a fatal error because of too many LINCS/SETTLE warnings.
 
static void gmx::write_constr_pdb (const char *fn, const char *title, const gmx_mtop_t &mtop, int start, int homenr, const t_commrec *cr, const rvec x[], const matrix box)
 Writes out coordinates.
 
static void gmx::dump_confs (FILE *log, int64_t step, const gmx_mtop_t &mtop, int start, int homenr, const t_commrec *cr, const rvec x[], rvec xprime[], const matrix box)
 Writes out domain contents to help diagnose crashes.
 
FlexibleConstraintTreatment gmx::flexibleConstraintTreatment (bool haveDynamicsIntegrator)
 Returns the flexible constraint treatment depending on whether the integrator is dynamic.
 
template<typename T >
static t_blocka gmx::makeAtomsToConstraintsList (int numAtoms, const T *ilists, const t_iparams *iparams, FlexibleConstraintTreatment flexibleConstraintTreatment)
 Returns a block struct to go from atoms to constraints. More...
 
t_blocka gmx::make_at2con (int numAtoms, const t_ilist *ilist, const t_iparams *iparams, FlexibleConstraintTreatment flexibleConstraintTreatment)
 Returns a block struct to go from atoms to constraints. More...
 
t_blocka gmx::make_at2con (const gmx_moltype_t &moltype, gmx::ArrayRef< const t_iparams > iparams, FlexibleConstraintTreatment flexibleConstraintTreatment)
 Returns a block struct to go from atoms to constraints. More...
 
template<typename T >
static int gmx::countFlexibleConstraintsTemplate (const T *ilist, const t_iparams *iparams)
 Return the number of flexible constraints in the ilist and iparams.
 
int gmx::countFlexibleConstraints (const t_ilist *ilist, const t_iparams *iparams)
 Return the number of flexible constraints in the ilist and iparams.
 
static std::vector< int > gmx::make_at2settle (int natoms, const InteractionList &ilist)
 Returns the index of the settle to which each atom belongs.
 
static std::vector< t_blocka > gmx::makeAtomToConstraintMappings (const gmx_mtop_t &mtop, FlexibleConstraintTreatment flexibleConstraintTreatment)
 Makes a per-moleculetype container of mappings from atom indices to constraint indices. More...
 
void gmx::do_constrain_first (FILE *log, gmx::Constraints *constr, const t_inputrec *inputrec, const t_mdatoms *md, int natoms, ArrayRefWithPadding< RVec > x, ArrayRefWithPadding< RVec > v, const matrix box, real lambda)
 Constrain the initial coordinates and velocities.