Gromacs
2019.1
|
#include "gmxpre.h"
#include "shake.h"
#include <cmath>
#include <algorithm>
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/functions.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/splitter.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/topology/invblock.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
Defines SHAKE code.
Functions | |
shakedata * | gmx::shake_init () |
Initializes and return the SHAKE data structure. | |
static int | gmx::pcomp (const void *p1, const void *p2) |
Compares sort blocks. | |
static void | gmx::pr_sortblock (FILE *fp, const char *title, int nsb, t_sortblock sb[]) |
Prints sortblocks. | |
static void | gmx::resizeLagrangianData (shakedata *shaked, int ncons) |
Reallocates a vector. | |
void | gmx::make_shake_sblock_serial (shakedata *shaked, const t_idef *idef, const t_mdatoms &md) |
Make SHAKE blocks when not using DD. | |
void | gmx::make_shake_sblock_dd (shakedata *shaked, const t_ilist *ilcon, const t_block *cgs, const gmx_domdec_t *dd) |
Make SHAKE blocks when using DD. | |
void | gmx::cshake (const int iatom[], int ncon, int *nnit, int maxnit, const real constraint_distance_squared[], real positions[], const real initial_displacements[], const real half_of_reduced_mass[], real omega, const real invmass[], const real distance_squared_tolerance[], real scaled_lagrange_multiplier[], int *nerror) |
Inner kernel for SHAKE constraints. More... | |
static void | gmx::crattle (const int iatom[], int ncon, int *nnit, int maxnit, const real constraint_distance_squared[], real vp[], const real rij[], const real m2[], real omega, const real invmass[], const real distance_squared_tolerance[], real scaled_lagrange_multiplier[], int *nerror, real invdt) |
Implements RATTLE (ie. SHAKE for velocity verlet integrators) | |
static int | gmx::vec_shakef (FILE *fplog, shakedata *shaked, const real invmass[], int ncon, t_iparams ip[], t_iatom *iatom, real tol, const rvec x[], rvec prime[], real omega, bool bFEP, real lambda, real scaled_lagrange_multiplier[], real invdt, rvec *v, bool bCalcVir, tensor vir_r_m_dr, ConstraintVariable econq) |
Applies SHAKE. | |
static void | gmx::check_cons (FILE *log, int nc, const rvec x[], rvec prime[], rvec v[], t_iparams ip[], t_iatom *iatom, const real invmass[], ConstraintVariable econq) |
Check that constraints are satisfied. | |
static bool | gmx::bshakef (FILE *log, shakedata *shaked, const real invmass[], const t_idef &idef, const t_inputrec &ir, const rvec x_s[], rvec prime[], t_nrnb *nrnb, real lambda, real *dvdlambda, real invdt, rvec *v, bool bCalcVir, tensor vir_r_m_dr, bool bDumpOnError, ConstraintVariable econq) |
Applies SHAKE. | |
bool | gmx::constrain_shake (FILE *log,shakedata *shaked,const real invmass[],const t_idef &idef,const t_inputrec &ir,const rvec x_s[],rvec xprime[],rvec vprime[],t_nrnb *nrnb,real lambda,real *dvdlambda,real invdt,rvec *v,bool bCalcVir,tensor vir_r_m_dr,bool bDumpOnError,ConstraintVariable econq) |
Shake all the atoms blockwise. It is assumed that all the constraints in the idef->shakes field are sorted, to ascending block nr. The sblock array points into the idef->shakes.iatoms field, with block 0 starting at sblock[0] and running to ( < ) sblock[1], block n running from sblock[n] to sblock[n+1]. Array sblock should be large enough. Return TRUE when OK, FALSE when shake-error. | |