Gromacs  2023.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gmx::anonymous_namespace{com.cpp} Namespace Reference

Functions

RVec evaluateShiftToBox (const RVec &position, const matrix box, const PbcType &pbcType, const UnitCellType &unitCellType, const CenteringType &centerType)
 Calculates shift to place COM into a box. More...
 
RVec calculateCOM (ArrayRef< const RVec > x, const gmx_moltype_t &moltype, const int atomOffset=0)
 Calculates the COM for each collection of atoms. More...
 

Function Documentation

RVec gmx::anonymous_namespace{com.cpp}::calculateCOM ( ArrayRef< const RVec >  x,
const gmx_moltype_t moltype,
const int  atomOffset = 0 
)

Calculates the COM for each collection of atoms.

Parameters
[in]xView on coordinates of the molecule.
[in]moltypeWhich molecule type to calculate for.
[in]atomOffsetIf needed, point from where to count the first atom to process.
Returns
The center of mass for the molecule.
RVec gmx::anonymous_namespace{com.cpp}::evaluateShiftToBox ( const RVec &  position,
const matrix  box,
const PbcType pbcType,
const UnitCellType &  unitCellType,
const CenteringType &  centerType 
)

Calculates shift to place COM into a box.

Parameters
[in]positionUnshifted COM position.
[in]boxThe current box to place the COM in.
[in]pbcTypeWhat kind of box is being used.
[in]unitCellTypeType of unitcell being used.
[in]centerTypeHow things should be centered.
Returns
The shift needed to place the COM into the box.