Gromacs
5.1
|
#include "gromacs/fileio/filenm.h"
#include "gromacs/legacyheaders/typedefs.h"
This file contains datatypes and function declarations necessary for mdrun to interface with the pull code.
Functions | |
void | get_pull_coord_value (struct pull_t *pull, int coord_ind, const struct t_pbc *pbc, double *value) |
Get the value for pull coord coord_ind. More... | |
void | clear_pull_forces (struct pull_t *pull) |
Set the all the pull forces to zero. More... | |
real | pull_potential (struct pull_t *pull, t_mdatoms *md, struct t_pbc *pbc, t_commrec *cr, double t, real lambda, rvec *x, rvec *f, tensor vir, real *dvdlambda) |
Determine the COM pull forces and add them to f, return the potential. More... | |
void | pull_constraint (struct pull_t *pull, t_mdatoms *md, struct t_pbc *pbc, t_commrec *cr, double dt, double t, rvec *x, rvec *xp, rvec *v, tensor vir) |
Constrain the coordinates xp in the directions in x and also constrain v when v != NULL. More... | |
void | dd_make_local_pull_groups (t_commrec *cr, struct pull_t *pull, t_mdatoms *md) |
Make a selection of the home atoms for all pull groups. Should be called at every domain decomposition. More... | |
struct pull_t * | init_pull (FILE *fplog, const pull_params_t *pull_params, const t_inputrec *ir, int nfile, const t_filenm fnm[], gmx_mtop_t *mtop, t_commrec *cr, const output_env_t oenv, real lambda, gmx_bool bOutFile, unsigned long Flags) |
Allocate, initialize and return a pull work struct. More... | |
void | finish_pull (struct pull_t *pull) |
Close the pull output files. More... | |
void | pull_print_output (struct pull_t *pull, gmx_int64_t step, double time) |
Print the pull output (x and/or f) More... | |
void | pull_calc_coms (t_commrec *cr, struct pull_t *pull, t_mdatoms *md, struct t_pbc *pbc, double t, rvec x[], rvec *xp) |
Calculates centers of mass all pull groups. More... | |
gmx_bool | pull_have_potential (const struct pull_t *pull) |
Returns if we have pull coordinates with potential pulling. More... | |
gmx_bool | pull_have_constraint (const struct pull_t *pull) |
Returns if we have pull coordinates with constraint pulling. More... | |
void clear_pull_forces | ( | struct pull_t * | pull | ) |
Set the all the pull forces to zero.
pull | The pull group. |
void dd_make_local_pull_groups | ( | t_commrec * | cr, |
struct pull_t * | pull, | ||
t_mdatoms * | md | ||
) |
Make a selection of the home atoms for all pull groups. Should be called at every domain decomposition.
cr | Structure for communication info. |
pull | The pull group. |
md | All atoms. |
void finish_pull | ( | struct pull_t * | pull | ) |
Close the pull output files.
pull | The pull group. |
void get_pull_coord_value | ( | struct pull_t * | pull, |
int | coord_ind, | ||
const struct t_pbc * | pbc, | ||
double * | value | ||
) |
Get the value for pull coord coord_ind.
[in,out] | pull | The pull struct. |
[in] | coord_ind | Number of the pull coordinate. |
[in] | pbc | Information structure about periodicity. |
[out] | value | The value of the pull coordinate. |
struct pull_t* init_pull | ( | FILE * | fplog, |
const pull_params_t * | pull_params, | ||
const t_inputrec * | ir, | ||
int | nfile, | ||
const t_filenm | fnm[], | ||
gmx_mtop_t * | mtop, | ||
t_commrec * | cr, | ||
const output_env_t | oenv, | ||
real | lambda, | ||
gmx_bool | bOutFile, | ||
unsigned long | Flags | ||
) |
Allocate, initialize and return a pull work struct.
fplog | General output file, normally md.log. |
pull_params | The pull input parameters containing all pull settings. |
ir | The inputrec. |
nfile | Number of files. |
fnm | Standard filename struct. |
mtop | The topology of the whole system. |
cr | Struct for communication info. |
oenv | Output options. |
lambda | FEP lambda. |
bOutFile | Open output files? |
Flags | Flags passed over from main, used to determine whether or not we are appending. |
void pull_calc_coms | ( | t_commrec * | cr, |
struct pull_t * | pull, | ||
t_mdatoms * | md, | ||
struct t_pbc * | pbc, | ||
double | t, | ||
rvec | x[], | ||
rvec * | xp | ||
) |
Calculates centers of mass all pull groups.
[in] | cr | Struct for communication info. |
[in] | pull | The pull data structure. |
[in] | md | All atoms. |
[in] | pbc | Information struct about periodicity. |
[in] | t | Time, only used for cylinder ref. |
[in] | x | The local positions. |
[in,out] | xp | Updated x, can be NULL. |
void pull_constraint | ( | struct pull_t * | pull, |
t_mdatoms * | md, | ||
struct t_pbc * | pbc, | ||
t_commrec * | cr, | ||
double | dt, | ||
double | t, | ||
rvec * | x, | ||
rvec * | xp, | ||
rvec * | v, | ||
tensor | vir | ||
) |
Constrain the coordinates xp in the directions in x and also constrain v when v != NULL.
[in,out] | pull | The pull data. |
[in] | md | All atoms. |
[in] | pbc | Information struct about periodicity. |
[in] | cr | Struct for communication info. |
[in] | dt | The time step length. |
[in] | t | The time. |
[in] | x | Positions. |
[in,out] | xp | Updated x, can be NULL. |
[in,out] | v | Velocities, which may get a pull correction. |
[in,out] | vir | The virial, which, if != NULL, gets a pull correction. |
gmx_bool pull_have_constraint | ( | const struct pull_t * | pull | ) |
Returns if we have pull coordinates with constraint pulling.
[in] | pull | The pull data structure. |
gmx_bool pull_have_potential | ( | const struct pull_t * | pull | ) |
Returns if we have pull coordinates with potential pulling.
[in] | pull | The pull data structure. |
real pull_potential | ( | struct pull_t * | pull, |
t_mdatoms * | md, | ||
struct t_pbc * | pbc, | ||
t_commrec * | cr, | ||
double | t, | ||
real | lambda, | ||
rvec * | x, | ||
rvec * | f, | ||
tensor | vir, | ||
real * | dvdlambda | ||
) |
Determine the COM pull forces and add them to f, return the potential.
[in,out] | pull | The pull struct. |
[in] | md | All atoms. |
[in] | pbc | Information struct about periodicity. |
[in] | cr | Struct for communication info. |
[in] | t | Time. |
[in] | lambda | The value of lambda in FEP calculations. |
[in] | x | Positions. |
[in] | f | Forces. |
[in,out] | vir | The virial, which, if != NULL, gets a pull correction. |
[out] | dvdlambda | Pull contribution to dV/d(lambda). |
void pull_print_output | ( | struct pull_t * | pull, |
gmx_int64_t | step, | ||
double | time | ||
) |
Print the pull output (x and/or f)
pull | The pull data structure. |
step | Time step number. |
time | Time. |