Gromacs  5.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
adress.h File Reference
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/types/simple.h"

Description

Implementation of the AdResS method.

Functions

real adress_weight (rvec x, int adresstype, real adressr, real adressw, rvec *ref, struct t_pbc *pbc, t_forcerec *fr)
 calculates the AdResS weight of a particle More...
 
void update_adress_weights_com (FILE *fplog, int cg0, int cg1, t_block *cgs, rvec x[], t_forcerec *fr, t_mdatoms *mdatoms, struct t_pbc *pbc)
 update the weight of all coarse-grained particles in several charge groups for com vsites More...
 
void update_adress_weights_cog (t_iparams ip[], t_ilist ilist[], rvec x[], t_forcerec *fr, t_mdatoms *mdatoms, struct t_pbc *pbc)
 update the weight of all coarse-grained particles for cog vsites More...
 
void update_adress_weights_atom (int cg0, int cg1, t_block *cgs, rvec x[], t_forcerec *fr, t_mdatoms *mdatoms, struct t_pbc *pbc)
 update the weight of all coarse-grained particles in several charge groups for atom vsites More...
 
void update_adress_weights_atom_per_atom (int cg0, int cg1, t_block *cgs, rvec x[], t_forcerec *fr, t_mdatoms *mdatoms, struct t_pbc *pbc)
 update the weight on per atom basis of all coarse-grained particles in several charge groups for atom vsites More...
 
void adress_thermo_force (int cg0, int cg1, t_block *cgs, rvec x[], rvec f[], t_forcerec *fr, t_mdatoms *mdatoms, struct t_pbc *pbc)
 add AdResS IC thermodynamic force to f_novirsum More...
 
void adress_set_kernel_flags (int n_ex, int n_hyb, int n_cg, t_mdatoms *mdatoms)
 checks weather a cpu calculates only coarse-grained or explicit interactions More...
 
gmx_bool egp_explicit (t_forcerec *fr, int egp_nr)
 looks up if a energy group is explicit More...
 
gmx_bool egp_coarsegrained (t_forcerec *fr, int egp_nr)
 looks up if a energy group is coarse-grained More...
 

Function Documentation

void adress_set_kernel_flags ( int  n_ex,
int  n_hyb,
int  n_cg,
t_mdatoms *  mdatoms 
)

checks weather a cpu calculates only coarse-grained or explicit interactions

Parameters
[in]n_exnumber of explicit particles
[in]n_hybnumber of hybrid particles
[in]n_cgnumber of coarse-grained particles
[in,out]mdatomsthe struct containing all the atoms properties
void adress_thermo_force ( int  cg0,
int  cg1,
t_block *  cgs,
rvec  x[],
rvec  f[],
t_forcerec *  fr,
t_mdatoms *  mdatoms,
struct t_pbc *  pbc 
)

add AdResS IC thermodynamic force to f_novirsum

Parameters
[in]cg0first charge group to update
[in]cg1last+1 charge group to update
[in]cgsblock containing the cg index
[in]xarray with all the particle positions
[in,out]fthe force array pointing at f_novirsum from sim_util.c
[in]frthe forcerec containing all the parameters
[in]mdatomsthe struct containing all the atoms properties
[in]pbcfor shortest distance to fr->adress_refs
real adress_weight ( rvec  x,
int  adresstype,
real  adressr,
real  adressw,
rvec *  ref,
struct t_pbc *  pbc,
t_forcerec *  fr 
)

calculates the AdResS weight of a particle

Parameters
[in]xposition of the particle
[in]adresstypetype of address weight function eAdressOff - explicit simulation eAdressConst - constant weight all over the box eAdressXSplit - split in x direction with ref as center eAdressSphere - spherical splitting with ref as center else - weight = 1 - explicit simulation
[in]adressrradius/size of the explicit zone
[in]adresswsize of the hybrid zone
[in]refcenter of the explicit zone for adresstype 1 - unused for adresstype 2 - only ref[0] is used
[in]pbcpbc struct for calculating shortest distance
[in]frthe forcerec containing all the parameters
Returns
weight of the particle
gmx_bool egp_coarsegrained ( t_forcerec *  fr,
int  egp_nr 
)

looks up if a energy group is coarse-grained

Parameters
[in]frthe forcerec containing all the parameters
[in]egp_nrenergy group number
Returns
boolean if coarse-grained or not
gmx_bool egp_explicit ( t_forcerec *  fr,
int  egp_nr 
)

looks up if a energy group is explicit

Parameters
[in]frthe forcerec containing all the parameters
[in]egp_nrenergy group number
Returns
boolean if explicit or not
void update_adress_weights_atom ( int  cg0,
int  cg1,
t_block *  cgs,
rvec  x[],
t_forcerec *  fr,
t_mdatoms *  mdatoms,
struct t_pbc *  pbc 
)

update the weight of all coarse-grained particles in several charge groups for atom vsites

Parameters
[in]cg0first charge group to update
[in]cg1last+1 charge group to update
[in]cgsblock containing the cg index
[in]xarray with all the particle positions
[in]frthe forcerec containing all the parameters
[in,out]mdatomsthe struct containing all the atoms properties
[in]pbcfor shortest distance in adress_weight
void update_adress_weights_atom_per_atom ( int  cg0,
int  cg1,
t_block *  cgs,
rvec  x[],
t_forcerec *  fr,
t_mdatoms *  mdatoms,
struct t_pbc *  pbc 
)

update the weight on per atom basis of all coarse-grained particles in several charge groups for atom vsites

Parameters
[in]cg0first charge group to update
[in]cg1last+1 charge group to update
[in]cgsblock containing the cg index
[in]xarray with all the particle positions
[in]frthe forcerec containing all the parameters
[in,out]mdatomsthe struct containing all the atoms properties
[in]pbcfor shortest distance in adress_weight
void update_adress_weights_cog ( t_iparams  ip[],
t_ilist  ilist[],
rvec  x[],
t_forcerec *  fr,
t_mdatoms *  mdatoms,
struct t_pbc *  pbc 
)

update the weight of all coarse-grained particles for cog vsites

Parameters
[in]ipcontains interaction parameters, in this case the number of constructing atoms n for vsitesn
[in]ilistlist of interaction types, in this case the virtual site types are what's important
[in]xarray with all the particle positions
[in]frthe forcerec containing all the parameters
[in,out]mdatomsthe struct containing all the atoms properties
[in]pbcfor shortest distance in adress_weight
void update_adress_weights_com ( FILE *  fplog,
int  cg0,
int  cg1,
t_block *  cgs,
rvec  x[],
t_forcerec *  fr,
t_mdatoms *  mdatoms,
struct t_pbc *  pbc 
)

update the weight of all coarse-grained particles in several charge groups for com vsites

Parameters
[in,out]fploglog file in case of debug
[in]cg0first charge group to update
[in]cg1last+1 charge group to update
[in]cgsblock containing the cg index
[in]xarray with all the particle positions
[in]frthe forcerec containing all the parameters
[in,out]mdatomsthe struct containing all the atoms properties
[in]pbcfor shortest distance in adress_weight