Go to the source code of this file.
Functions | |
int | force_compute_scaled_coords (Force *, const MD_Dvec pos[], const int32 sel[], int32 sel_len) |
Compute scaled coordinates. | |
int | force_compute_domain_update (Force *, const int32 sel[], int32 sel_len) |
Update nonperiodic domain specification. | |
int | force_compute_bonds (Force *fobj, double *u_bond, MD_Dvec f_bond[], double e_bond[], double virial[], const MD_Dvec pos[], const int32 bond_sel[], int32 bond_sel_len) |
Compute contribution of bond springs to force and potential. | |
int | force_compute_angles (Force *fobj, double *u_angle, MD_Dvec f_angle[], double e_angle[], double virial[], const MD_Dvec pos[], const int32 angle_sel[], int32 angle_sel_len) |
Compute contribution of bond angles to force and potential. | |
int | force_compute_dihedrals (Force *fobj, double *u_dihed, MD_Dvec f_dihed[], double e_dihed[], double virial[], const MD_Dvec pos[], const int32 dihed_sel[], int32 dihed_sel_len) |
Compute contribution of dihedrals to force and potential. | |
int | force_compute_impropers (Force *fobj, double *u_impr, MD_Dvec f_impr[], double e_impr[], double virial[], const MD_Dvec pos[], const int32 impr_sel[], int32 impr_sel_len) |
Compute contribution of impropers to force and potential. | |
double | force_compute_bond_interaction (MD_Dvec f_bond[], double virial[], const MD_Dvec pos[], const MD_Bond *bond, const MD_BondPrm *prm) |
Compute an individual bond spring interaction. | |
double | force_compute_angle_interaction (MD_Dvec f_angle[], double virial[], const MD_Dvec pos[], const MD_Angle *angle, const MD_AnglePrm *prm) |
Compute an individual bond angle interaction. | |
double | force_compute_torsion_interaction (MD_Dvec f_tors[], double virial[], const MD_Dvec pos[], const MD_Tors *tors, const MD_TorsPrm *prm) |
Compute an individual torsion angle interaction. | |
int | force_compute_bres_sphere (Force *fobj, double *u_bres, MD_Dvec f_bres[], double e_bres[], const MD_Dvec *pos, const int32 bres_sel[], int32 bres_sel_len) |
Compute spherical boundary restraint. | |
int | force_compute_bres_cylinder (Force *fobj, double *u_bres, MD_Dvec f_bres[], double e_bres[], const MD_Dvec *pos, const int32 *bres_sel, int32 bres_sel_len, int32 bresopts) |
Compute cylindrical boundary restraint. | |
int | force_compute_nbpairs_direct (Force *fobj, double virial[], double *u_elec, MD_Dvec f_elec[], double e_elec[], double e_epot[], int32 is_elec_direct, int32 elec_pair_potential, double *u_vdw, MD_Dvec f_vdw[], double e_vdw[], int32 is_vdw_direct, int32 vdw_pair_potential, const MD_Dvec pos[], const int32 aset_sel[], int32 aset_sel_len, const int32 bset_sel[], int32 bset_sel_len) |
Use direct all pairs algorithm to compute nonbonded interactions. | |
int | force_compute_nbpairs_geomhash (Force *fobj, const MD_Dvec trpos[], const int32 sel[], int32 sel_len) |
Apply geometric hashing of atomic positions into grid cells. | |
int | force_compute_nbpairs_gridcells (Force *fobj, double virial[], double *u_elec, MD_Dvec f_elec[], double e_elec[], double e_epot[], int32 is_elec_gridcells, int32 elec_pair_potential, double *u_vdw, MD_Dvec f_vdw[], double e_vdw[], int32 is_vdw_gridcells, int32 vdw_pair_potential, const MD_Dvec pos[], int32 is_subtracted) |
Compute cutoff nonbonded interactions using grid cells. | |
int | force_compute_nbpairs_subtexcl (Force *fobj, double virial[], double *u_elec, MD_Dvec f_elec[], double e_elec[], double e_epot[], int32 is_elec_subtexcl, int32 elec_pair_potential, double *u_vdw, MD_Dvec f_vdw[], double e_vdw[], int32 is_vdw_subtexcl, int32 vdw_pair_potential, const MD_Dvec pos[], const int32 sel[], int32 sel_len, const int32 mapnb[], int32 map_id) |
Subtract excluded interactions for nonbonded pairwise interactions. | |
void | force_compute_nbpairs_elec_standard (double *u, double *du_r, double r2, double c) |
Compute a standard electrostatic interaction. | |
void | force_compute_nbpairs_elec_shifted (double *u, double *du_r, double r2, double c, double inv_elec_cutoff2) |
Compute a shifted electrostatic interaction. | |
void | force_compute_nbpairs_elec_ewald (double *u, double *du_r, double r2, double c, double ewald_coef, double grad_coef) |
void | force_compute_nbpairs_vdw_standard (double *u, double *du_r, double r2, double a, double b) |
Compute a standard van der Waals interaction. | |
void | force_compute_nbpairs_vdw_switched (double *u, double *du_r, double r2, double a, double b, double vdw_cutoff2, double switch_dist2, double inv_denom_switch) |
Compute a switched van der Waals interaction. | |
void | force_compute_nbpairs_vdw_buck (double *u, double *du_r, double r2, double a, double b, double c) |
Compute Buckingham potential (replaces van der Waals). | |
void | force_compute_nbpairs_vdw_switchbuck (double *u, double *du_r, double r2, double a, double b, double c, double vdw_cutoff2, double switch_dist2, double inv_denom_switch) |
Compute switched Buckingham potential (replaces van der Waals). | |
void | force_compute_nbpairs_vdw_bucknd (double *u, double *du_r, double r2, double a, double b) |
Compute Buckingham without dispersion term potential (replaces van der Waals). | |
void | force_compute_nbpairs_vdw_switchbucknd (double *u, double *du_r, double r2, double a, double b, double vdw_cutoff2, double switch_dist2, double inv_denom_switch) |
Compute switched Buckingham without dispersion term potential (replaces van der Waals). | |
void | force_compute_nbpairs_vdw_bucksafe (double *u, double *du_r, double r2, double a, double b, double c, double rn2, double an, double bn) |
void | force_compute_nbpairs_vdw_switchbucksafe (double *u, double *du_r, double r2, double a, double b, double c, double rn2, double an, double bn, double roff2, double ron2, double denom) |
int | force_compute_nbpairs_isregen_pairlists (Force *fobj, double delta2, const MD_Dvec initpos[], const MD_Dvec pos[], const int32 sel[], int32 sel_len) |
int | force_compute_nbpairs_regen_pairlists (Force *fobj, MD_Dvec initpos[], const MD_Dvec pos[], const int32 aset_sel[], int32 aset_sel_len, const int32 mapnb[], int32 aset_id, int32 bset_id) |
int | force_compute_nbpairs_eval_pairlists (Force *fobj, double virial[], double *u_elec, MD_Dvec f_elec[], double e_elec[], double e_epot[], int32 is_elec_gridcells, int32 elec_pair_potential, double *u_vdw, MD_Dvec f_vdw[], double e_vdw[], int32 is_vdw_gridcells, int32 vdw_pair_potential, const MD_Dvec pos[], const int32 sel[], int32 sel_len, const int32 mapnb[], int32 map_id) |
force_compute()
routine is the manager that calls the lower-level routines prototyped in this file. The various force computation routines are called depending on the force types indicated in ForceParam_t::forcetypes
. The various array and atom/bond selection parameters are determined by the ForceResult_t object passed to force_compute()
and the ForceSelect_t object provided to the force_create()
constructor.The medium-level routines:
force_compute_scaled_coords()
force_compute_domain_update()
force_compute_bonds()
force_compute_angles()
force_compute_dihedrals()
force_compute_impropers()
force_compute_bres_sphere()
force_compute_bres_cylinder()
force_compute_nbpairs_direct()
force_compute_nbpairs_geomhash()
force_compute_nbpairs_gridcells()
force_compute_nbpairs_subtexcl()
Force_t
, but with all of the array buffer space and data (from ForceResult_t
and ForceSelect_t
objects) explicitly passed as parameters along with any "control" data originally specified as part of ForceParam_t::forcetypes
, etc.The low-level routines:
force_compute_bond_interaction()
force_compute_angle_interaction()
force_compute_torsion_interaction()
force_compute_nbpairs_elec_standard()
force_compute_nbpairs_elec_shifted()
force_compute_nbpairs_vdw_standard()
force_compute_nbpairs_vdw_switched()
|
Compute an individual bond angle interaction.
angle contains atom indices for the participating atoms, so the entire f_angle and pos arrays are passed. The prm contains the force constants needed for this bond angle.
|
|
Compute contribution of bond angles to force and potential.
angle_sel array contains integer indices into the fobj->param->angle array. The output arrays are expected to be in a sensible state upon calling (i.e. these arrays are not zeroed). In particular, the forces are accumulated into f_angle .
|
|
Compute an individual bond spring interaction.
bond contains atom indices for the participating atoms, so the entire f_bond and pos arrays are passed. The prm contains the force constants needed for this bond.
|
|
Compute contribution of bond springs to force and potential.
bond_sel array contains integer indices into the fobj->param->bond array. The output arrays are expected to be in a sensible state upon calling (i.e. these arrays are not zeroed). In particular, the forces are accumulated into f_bond .
|
|
Compute cylindrical boundary restraint.
bres_sel array contains integer indices into the fobj->param->atom array. The output arrays are expected to be in a sensible state upon calling (i.e. these arrays are not zeroed). In particular, the forces are accumulated into f_bres . The bresopts parameter gives orientation of cylinder, with value one of FORCE_BRES_X_CYLINDER , FORCE_BRES_Y_CYLINDER , or FORCE_BRES_Z_CYLINDER .
|
|
Compute spherical boundary restraint.
bres_sel array contains integer indices into the fobj->param->atom array. The output arrays are expected to be in a sensible state upon calling (i.e. these arrays are not zeroed). In particular, the forces are accumulated into f_bres .
|
|
Compute contribution of dihedrals to force and potential.
dihed_sel array contains integer indices into the fobj->param->dihed array. The output arrays are expected to be in a sensible state upon calling (i.e. these arrays are not zeroed). In particular, the forces are accumulated into f_dihed .
|
|
Update nonperiodic domain specification.
Force_t::max_steps time intervals. If the center (average position coordinates) has drifted outside of the domain, a new domain specification needs to be determined.
If the user previously called
|
|
Compute contribution of impropers to force and potential.
impr_sel array contains integer indices into the fobj->param->impr array. The output arrays are expected to be in a sensible state upon calling (i.e. these arrays are not zeroed). In particular, the forces are accumulated into f_impr .
|
|
Use direct all pairs algorithm to compute nonbonded interactions.
Set
|
|
Compute a shifted electrostatic interaction.
inv_elec_cutoff2 . The exact function is documented in the NAMD User Guide, as well as the X-Plor and CHARMM literature. |
|
Compute a standard electrostatic interaction.
|
|
Apply geometric hashing of atomic positions into grid cells.
force_compute_nbpairs_gridcells() . All arguments must exist: data arrays must contain the expected information.
|
|
Compute cutoff nonbonded interactions using grid cells.
Set
The
|
|
Subtract excluded interactions for nonbonded pairwise interactions.
The atom selection array
Here is how the above is applied in practice: for standard computation of nonbonded interactions involving all atoms, then
Set
|
|
Compute Buckingham potential (replaces van der Waals).
See Flikkema & Bromley, Chem Phys Lett 378 (2003) 622-629, for parameterization for silica. |
|
Compute Buckingham without dispersion term potential (replaces van der Waals).
|
|
Compute a standard van der Waals interaction.
|
|
Compute switched Buckingham potential (replaces van der Waals).
See Flikkema & Bromley, Chem Phys Lett 378 (2003) 622-629, for parameterization for silica. |
|
Compute switched Buckingham without dispersion term potential (replaces van der Waals).
|
|
Compute a switched van der Waals interaction.
|
|
Compute scaled coordinates.
Force_t::trpos ) and position wrapping array (Force_t::poswrap ) for periodic boundaries. These arrays are held internally by the force object. For periodic boundaries, it is assumed that the pos[i]+poswrap[i] result from previous computation is no more than one cell image away. This is ensured by monitoring atom speeds so that an atom travels less than one cell width in a time step.
|
|
Compute an individual torsion angle interaction.
tors contains atom indices for the participating atoms, so the entire f_tors and pos arrays are passed. The prm contains the force constants needed for this torsion angle.
|