Gromacs
5.1.5
|
#include "gmxpre.h"
#include "bonded.h"
#include "config.h"
#include <assert.h>
#include <cmath>
#include <algorithm>
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc-simd.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
#include "gromacs/simd/simd_math.h"
#include "gromacs/simd/vector_operations.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "listed-internal.h"
#include "pairs.h"
#include "restcbt.h"
This file defines low-level functions necessary for computing energies and forces for listed interactions.
Functions | |
static void gmx_simdcall | gmx_hack_simd_gather_rvec_dist_two_index (const rvec *v, const int *index0, const int *index1, real *buf, gmx_simd_float_t *dx, gmx_simd_float_t *dy, gmx_simd_float_t *dz) |
Store differences between indexed rvecs in SIMD registers. More... | |
static int | pbc_rvec_sub (const t_pbc *pbc, const rvec xi, const rvec xj, rvec dx) |
Compute dx = xi - xj, modulo PBC if non-NULL. More... | |
real | morse_bonds (int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, const t_mdatoms *md, t_fcdata *fcd, int *global_atom_index) |
Morse potential bond. More... | |
static int | cmap_setup_grid_index (int ip, int grid_spacing, int *ipm1, int *ipp1, int *ipp2) |
Mysterious undocumented function. | |
real | cmap_dihs (int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const gmx_cmap_t *cmap_grid, const rvec x[], rvec f[], rvec fshift[], const struct t_pbc *pbc, const struct t_graph *g, real lambda, real *dvdlambda, const t_mdatoms *md, t_fcdata *fcd, int *global_atom_index) |
Compute CMAP dihedral energies and forces. | |
Variables | |
const int | cmap_coeff_matrix [] |
Mysterious CMAP coefficient matrix. More... | |
|
inlinestatic |
Store differences between indexed rvecs in SIMD registers.
Returns SIMD register with the difference vectors: v[index0[i]] - v[index1[i]]
[in] | v | Array of rvecs |
[in] | index0 | Index into the vector array |
[in] | index1 | Index into the vector array |
[in,out] | buf | Aligned tmp buffer of size 3*GMX_SIMD_REAL_WIDTH |
[out] | dx | SIMD register with x difference |
[out] | dy | SIMD register with y difference |
[out] | dz | SIMD register with z difference |
real morse_bonds | ( | int | nbonds, |
const t_iatom | forceatoms[], | ||
const t_iparams | forceparams[], | ||
const rvec | x[], | ||
rvec | f[], | ||
rvec | fshift[], | ||
const t_pbc * | pbc, | ||
const t_graph * | g, | ||
real | lambda, | ||
real * | dvdlambda, | ||
const t_mdatoms * | md, | ||
t_fcdata * | fcd, | ||
int * | global_atom_index | ||
) |
Morse potential bond.
By Frank Everdij. Three parameters needed:
b0 = equilibrium distance in nm be = beta in nm^-1 (actually, it's nu_e*Sqrt(2*pi*pi*mu/D_e)) cb = well depth in kJ/mol
Note: the potential is referenced to be +cb at infinite separation and zero at the equilibrium distance!
|
static |
Compute dx = xi - xj, modulo PBC if non-NULL.
const int cmap_coeff_matrix[] |
Mysterious CMAP coefficient matrix.