#include <gromacs/mdlib/update_constrain_cuda_impl.h>
Class with interfaces and data for CUDA version of Update-Constraint.
|
| Impl (const t_inputrec &ir, const gmx_mtop_t &mtop) |
| Create Update-Constrain object. More...
|
|
void | integrate (const real dt, const bool updateVelocities, const bool computeVirial, tensor virial, const bool doTempCouple, gmx::ArrayRef< const t_grp_tcstat > tcstat, const bool doPressureCouple, const float dtPressureCouple, const matrix velocityScalingMatrix) |
| Integrate. More...
|
|
void | set (const t_idef &idef, const t_mdatoms &md, const int numTempScaleValues) |
| Update data-structures (e.g. after NB search step). More...
|
|
void | setPbc (const t_pbc *pbc) |
| Update PBC data. More...
|
|
void | copyCoordinatesToGpu (const rvec *h_x) |
| Copy coordinates from CPU to GPU. More...
|
|
void | copyVelocitiesToGpu (const rvec *h_v) |
| Copy velocities from CPU to GPU. More...
|
|
void | copyForcesToGpu (const rvec *h_f) |
| Copy forces from CPU to GPU. More...
|
|
void | copyCoordinatesFromGpu (rvec *h_xp) |
| Copy coordinates from GPU to CPU. More...
|
|
void | copyVelocitiesFromGpu (rvec *h_v) |
| Copy velocities from GPU to CPU. More...
|
|
void | copyForcesFromGpu (rvec *h_f) |
| Copy forces from GPU to CPU. More...
|
|
void | setXVFPointers (rvec *d_x, rvec *d_xp, rvec *d_v, rvec *d_f) |
| Set the internal GPU-memory x, xprime and v pointers. More...
|
|
gmx::UpdateConstrainCuda::Impl::Impl |
( |
const t_inputrec & |
ir, |
|
|
const gmx_mtop_t & |
mtop |
|
) |
| |
Create Update-Constrain object.
- Parameters
-
[in] | ir | Input record data: LINCS takes number of iterations and order of projection from it. |
[in] | mtop | Topology of the system: SETTLE gets the masses for O and H atoms and target O-H and H-H distances from this object. |
void gmx::UpdateConstrainCuda::Impl::copyCoordinatesFromGpu |
( |
rvec * |
h_xp | ) |
|
Copy coordinates from GPU to CPU.
The data are assumed to be in float3/fvec format (single precision).
- Parameters
-
[out] | h_xp | CPU pointer where coordinates should be copied to. |
void gmx::UpdateConstrainCuda::Impl::copyCoordinatesToGpu |
( |
const rvec * |
h_x | ) |
|
Copy coordinates from CPU to GPU.
The data are assumed to be in float3/fvec format (single precision).
- Parameters
-
[in] | h_x | CPU pointer where coordinates should be copied from. |
void gmx::UpdateConstrainCuda::Impl::copyForcesFromGpu |
( |
rvec * |
h_f | ) |
|
Copy forces from GPU to CPU.
The forces are assumed to be in float3/fvec format (single precision).
- Parameters
-
[in] | h_f | Pointer to forces data. |
void gmx::UpdateConstrainCuda::Impl::copyForcesToGpu |
( |
const rvec * |
h_f | ) |
|
Copy forces from CPU to GPU.
The data are assumed to be in float3/fvec format (single precision).
- Parameters
-
[in] | h_f | CPU pointer where forces should be copied from. |
void gmx::UpdateConstrainCuda::Impl::copyVelocitiesFromGpu |
( |
rvec * |
h_v | ) |
|
Copy velocities from GPU to CPU.
The velocities are assumed to be in float3/fvec format (single precision).
- Parameters
-
[in] | h_v | Pointer to velocities data. |
void gmx::UpdateConstrainCuda::Impl::copyVelocitiesToGpu |
( |
const rvec * |
h_v | ) |
|
Copy velocities from CPU to GPU.
The data are assumed to be in float3/fvec format (single precision).
- Parameters
-
[in] | h_v | CPU pointer where velocities should be copied from. |
void gmx::UpdateConstrainCuda::Impl::integrate |
( |
const real |
dt, |
|
|
const bool |
updateVelocities, |
|
|
const bool |
computeVirial, |
|
|
tensor |
virial, |
|
|
const bool |
doTempCouple, |
|
|
gmx::ArrayRef< const t_grp_tcstat > |
tcstat, |
|
|
const bool |
doPressureCouple, |
|
|
const float |
dtPressureCouple, |
|
|
const matrix |
velocityScalingMatrix |
|
) |
| |
Integrate.
Integrates the equation of motion using Leap-Frog algorithm and applies LINCS and SETTLE constraints. Updates d_xp_ and d_v_ fields of this object. If computeVirial is true, constraints virial is written at the provided pointer. doTempCouple should be true if:
- The temperature coupling is enabled.
- This is the temperature coupling step. Parameters virial/lambdas can be nullptr if computeVirial/doTempCouple are false.
- Parameters
-
[in] | dt | Timestep |
[in] | updateVelocities | If the velocities should be constrained. |
[in] | computeVirial | If virial should be updated. |
[out] | virial | Place to save virial tensor. |
[in] | doTempCouple | If the temperature coupling should be performed. |
[in] | tcstat | Temperature coupling data. |
[in] | doPressureCouple | If the temperature coupling should be applied. |
[in] | dtPressureCouple | Period between pressure coupling steps |
[in] | velocityScalingMatrix | Parrinello-Rahman velocity scaling matrix |
void gmx::UpdateConstrainCuda::Impl::set |
( |
const t_idef & |
idef, |
|
|
const t_mdatoms & |
md, |
|
|
const int |
numTempScaleValues |
|
) |
| |
Update data-structures (e.g. after NB search step).
- Parameters
-
[in] | idef | System topology |
[in] | md | Atoms data. |
[in] | numTempScaleValues | Number of temperature scaling groups. Set zero for no temperature coupling. |
void gmx::UpdateConstrainCuda::Impl::setPbc |
( |
const t_pbc * |
pbc | ) |
|
Update PBC data.
Converts PBC data from t_pbc into the PbcAiuc format and stores the latter.
- Parameters
-
[in] | pbc | The PBC data in t_pbc format. |
void gmx::UpdateConstrainCuda::Impl::setXVFPointers |
( |
rvec * |
d_x, |
|
|
rvec * |
d_xp, |
|
|
rvec * |
d_v, |
|
|
rvec * |
d_f |
|
) |
| |
Set the internal GPU-memory x, xprime and v pointers.
Data is not copied. The data are assumed to be in float3/fvec format (float3 is used internally, but the data layout should be identical).
- Parameters
-
[in] | d_x | Pointer to the coordinates for the input (on GPU) |
[in] | d_xp | Pointer to the coordinates for the output (on GPU) |
[in] | d_v | Pointer to the velocities (on GPU) |
[in] | d_f | Pointer to the forces (on GPU) |
The documentation for this class was generated from the following file: