|
Gromacs
2027.0-dev-20261009-dd255a67
|
Enumerations | |
| enum | SDUpdate : int { ForcesOnly, FrictionAndNoiseOnly, Combined, Count } |
| Sets the SD update type. | |
Functions | |
| void | simdLoadRvecs (const RVec *r, int index, UpdateSimdReal *r0, UpdateSimdReal *r1, UpdateSimdReal *r2) |
| Load (aligned) the contents of GMX_SIMD_REAL_WIDTH RVec elements sequentially into 3 SIMD registers. More... | |
| void | simdStoreRvecs (RVec *r, int index, UpdateSimdReal r0, UpdateSimdReal r1, UpdateSimdReal r2) |
| Store (aligned) 3 SIMD registers sequentially to GMX_SIMD_REAL_WIDTH RVec elements. More... | |
| template<StoreUpdatedVelocities storeUpdatedVelocities, NumTempScaleValues numTempScaleValues, typename VelocityType > | |
| std::enable_if_t < std::is_same_v< VelocityType, RVec >||std::is_same_v < VelocityType, const RVec > , void > | updateMDLeapfrogSimpleSimd (int start, int nrend, real dt, ArrayRef< const real > invMass, ArrayRef< const t_grp_tcstat > tcstat, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, VelocityType *gmx_restrict v, const RVec *gmx_restrict f) |
| Integrate using leap-frog with single group T-scaling and SIMD. More... | |
| template<AccelerationType accelerationType> | |
| void | updateMDLeapfrogGeneral (int start, int nrend, bool doNoseHoover, real dt, real dtPressureCouple, ArrayRef< const unsigned short > cTC, ArrayRef< const unsigned short > cAcceleration, const RVec *gmx_restrict acceleration, const matrix boxDeformation, ArrayRef< const RVec > invMassPerDim, const gmx_ekindata_t *ekind, const matrix box, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, RVec *gmx_restrict v, const RVec *gmx_restrict f, const double *gmx_restrict nh_vxi, const int nsttcouple, const Matrix3x3 &parrinelloRahmanM) |
| Integrate using leap-frog with support for everything. More... | |
| void | do_update_md (int start, int nrend, real dt, int64_t step, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, RVec *gmx_restrict v, const RVec *gmx_restrict f, const TemperatureCoupling etc, const PressureCoupling epc, const int nsttcouple, const int nstpcouple, ArrayRef< const unsigned short > cTC, const AccelerationType simulationAccelerationType, ArrayRef< const unsigned short > cAcceleration, ArrayRef< const RVec > acceleration, const matrix boxDeformation, ArrayRef< const real > gmx_unused invmass, ArrayRef< const RVec > invMassPerDim, const gmx_ekindata_t *ekind, const matrix box, const double *gmx_restrict nh_vxi, const Matrix3x3 &parrinelloRahmanM, bool gmx_unused havePartiallyFrozenAtoms) |
| Handles the Leap-frog MD x and v integration. | |
| void | doUpdateMDDoNotUpdateVelocities (int start, int nrend, real dt, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, const RVec *gmx_restrict v, const RVec *gmx_restrict f, bool gmx_unused havePartiallyFrozenAtoms, ArrayRef< const real > gmx_unused invmass, ArrayRef< const RVec > invMassPerDim, const gmx_ekindata_t &ekind) |
| Handles the Leap-frog MD x and v integration. | |
| void | do_update_vv_vel (int start, int nrend, real dt, ArrayRef< const ivec > nFreeze, ArrayRef< const unsigned short > cAcceleration, const RVec *gmx_restrict acceleration, ArrayRef< const real > invmass, ArrayRef< const ParticleType > ptype, ArrayRef< const unsigned short > cFREEZE, RVec *gmx_restrict v, const RVec *gmx_restrict f, gmx_bool bExtended, real veta, real alpha) |
| void | do_update_vv_pos (int start, int nrend, real dt, ArrayRef< const ivec > nFreeze, ArrayRef< const ParticleType > ptype, ArrayRef< const unsigned short > cFREEZE, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, const RVec *gmx_restrict v, gmx_bool bExtended, real veta) |
| template<SDUpdate updateType> | |
| void | doSDUpdateGeneral (const gmx_stochd_t &sd, int start, int nrend, real dt, ArrayRef< const ivec > nFreeze, ArrayRef< const real > invmass, ArrayRef< const ParticleType > ptype, ArrayRef< const unsigned short > cFREEZE, ArrayRef< const unsigned short > cTC, ArrayRef< const unsigned short > cAcceleration, const RVec *gmx_restrict acceleration, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, RVec *gmx_restrict v, const RVec *gmx_restrict f, int64_t step, int seed, const int *gatindex, real dtPressureCouple, const Matrix3x3 &parrinelloRahmanM) |
| SD integrator update. More... | |
| void | do_update_sd (int start, int nrend, real dt, int64_t step, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, RVec *gmx_restrict v, const RVec *gmx_restrict f, ArrayRef< const ivec > nFreeze, ArrayRef< const real > invmass, ArrayRef< const ParticleType > ptype, ArrayRef< const unsigned short > cFREEZE, ArrayRef< const unsigned short > cTC, ArrayRef< const unsigned short > cAcceleration, ArrayRef< const RVec > acceleration, int seed, const gmx_domdec_t *dd, const gmx_stochd_t &sd, bool haveConstraints, const PressureCoupling pressureCoupling, const int nstpcouple, const Matrix3x3 &parrinelloRahmanM) |
| void | do_update_bd (int start, int nrend, real dt, int64_t step, const RVec *gmx_restrict x, RVec *gmx_restrict xprime, RVec *gmx_restrict v, const RVec *gmx_restrict f, ArrayRef< const ivec > nFreeze, ArrayRef< const real > invmass, ArrayRef< const ParticleType > ptype, ArrayRef< const unsigned short > cFREEZE, ArrayRef< const unsigned short > cTC, real friction_coefficient, const real *rf, int seed, const int *gatindex) |
| void gmx::anonymous_namespace{update.cpp}::doSDUpdateGeneral | ( | const gmx_stochd_t & | sd, |
| int | start, | ||
| int | nrend, | ||
| real | dt, | ||
| ArrayRef< const ivec > | nFreeze, | ||
| ArrayRef< const real > | invmass, | ||
| ArrayRef< const ParticleType > | ptype, | ||
| ArrayRef< const unsigned short > | cFREEZE, | ||
| ArrayRef< const unsigned short > | cTC, | ||
| ArrayRef< const unsigned short > | cAcceleration, | ||
| const RVec *gmx_restrict | acceleration, | ||
| const RVec *gmx_restrict | x, | ||
| RVec *gmx_restrict | xprime, | ||
| RVec *gmx_restrict | v, | ||
| const RVec *gmx_restrict | f, | ||
| int64_t | step, | ||
| int | seed, | ||
| const int * | gatindex, | ||
| real | dtPressureCouple, | ||
| const Matrix3x3 & | parrinelloRahmanM | ||
| ) |
SD integrator update.
Two phases are required in the general case of a constrained update, the first phase from the contribution of forces, before applying constraints, and then a second phase applying the friction and noise, and then further constraining. For details, see Goga2012.
Without constraints, the two phases can be combined, for efficiency.
Thus three instantiations of this templated function will be made, two with only one contribution, and one with both contributions.
To maximize the ability of the compiler to optimize, all the arrays of RVec should be annotated with gmx_restrict, so the compiler knows there is no aliasing, and for the same reason we do not use ArrayRef<RVec> for them.
|
inline |
Load (aligned) the contents of GMX_SIMD_REAL_WIDTH RVec elements sequentially into 3 SIMD registers.
The loaded output is: r0: { r[index][XX], r[index][YY], ... } r1: { ... } r2: { ..., r[index+GMX_SIMD_REAL_WIDTH-1][YY], r[index+GMX_SIMD_REAL_WIDTH-1][ZZ] }
| [in] | r | Real to an RVec array, has to be aligned to SIMD register width |
| [in] | index | Index of the first RVec triplet of reals to load |
| [out] | r0 | Pointer to first SIMD register |
| [out] | r1 | Pointer to second SIMD register |
| [out] | r2 | Pointer to third SIMD register |
|
inline |
Store (aligned) 3 SIMD registers sequentially to GMX_SIMD_REAL_WIDTH RVec elements.
The stored output is: r[index] = { { r0[0], r0[1], ... } ... r[index+GMX_SIMD_REAL_WIDTH-1] = { ... , r2[GMX_SIMD_REAL_WIDTH-2], r2[GMX_SIMD_REAL_WIDTH-1] }
| [out] | r | Pointer to an RVec array, has to be aligned to SIMD register width |
| [in] | index | Index of the first RVec triplet of reals to store to |
| [in] | r0 | First SIMD register |
| [in] | r1 | Second SIMD register |
| [in] | r2 | Third SIMD register |
| void gmx::anonymous_namespace{update.cpp}::updateMDLeapfrogGeneral | ( | int | start, |
| int | nrend, | ||
| bool | doNoseHoover, | ||
| real | dt, | ||
| real | dtPressureCouple, | ||
| ArrayRef< const unsigned short > | cTC, | ||
| ArrayRef< const unsigned short > | cAcceleration, | ||
| const RVec *gmx_restrict | acceleration, | ||
| const matrix | boxDeformation, | ||
| ArrayRef< const RVec > | invMassPerDim, | ||
| const gmx_ekindata_t * | ekind, | ||
| const matrix | box, | ||
| const RVec *gmx_restrict | x, | ||
| RVec *gmx_restrict | xprime, | ||
| RVec *gmx_restrict | v, | ||
| const RVec *gmx_restrict | f, | ||
| const double *gmx_restrict | nh_vxi, | ||
| const int | nsttcouple, | ||
| const Matrix3x3 & | parrinelloRahmanM | ||
| ) |
Integrate using leap-frog with support for everything.
| accelerationType | Type of NEMD acceleration. |
| [in] | start | Index of first atom to update. |
| [in] | nrend | Last atom to update: nrend - 1. |
| [in] | doNoseHoover | If to apply Nose-Hoover T-coupling. |
| [in] | dt | The time step. |
| [in] | dtPressureCouple | Time step for pressure coupling, is 0 when no pressure coupling should be applied at this step. |
| [in] | cTC | Temperature coupling group indices |
| [in] | cAcceleration | Acceleration group indices |
| [in] | acceleration | Acceleration per group. |
| [in] | boxDeformation | Velocity of box components in units of nm/ps |
| [in] | invMassPerDim | Inverse mass per dimension |
| [in] | ekind | Kinetic energy data. |
| [in] | box | The box dimensions. |
| [in] | x | Input coordinates. |
| [out] | xprime | Updated coordinates. |
| [in,out] | v | Velocities. |
| [in] | f | Forces. |
| [in] | nh_vxi | Nose-Hoover velocity scaling factors. |
| [in] | nsttcouple | Frequency of the temperature coupling steps. |
| [in] | parrinelloRahmanM | Parrinello-Rahman scaling matrix. |
| std::enable_if_t<std::is_same_v<VelocityType, RVec> || std::is_same_v<VelocityType, const RVec>, void> gmx::anonymous_namespace{update.cpp}::updateMDLeapfrogSimpleSimd | ( | int | start, |
| int | nrend, | ||
| real | dt, | ||
| ArrayRef< const real > | invMass, | ||
| ArrayRef< const t_grp_tcstat > | tcstat, | ||
| const RVec *gmx_restrict | x, | ||
| RVec *gmx_restrict | xprime, | ||
| VelocityType *gmx_restrict | v, | ||
| const RVec *gmx_restrict | f | ||
| ) |
Integrate using leap-frog with single group T-scaling and SIMD.
| storeUpdatedVelocities | Tells whether we should store the updated velocities |
| numTempScaleValues | The number of different T-couple values |
| VelocityType | Either RVec or const RVec according to whether we store velocities |
| [in] | start | Index of first atom to update |
| [in] | nrend | Last atom to update: nrend - 1 |
| [in] | dt | The time step |
| [in] | invMass | 1/mass per atom |
| [in] | tcstat | Temperature coupling information |
| [in] | x | Input coordinates |
| [out] | xprime | Updated coordinates |
| [in,out] | v | Velocities, type either RVec* or const RVec* |
| [in] | f | Forces |
1.8.5