NAMD
|
#include "msm_defn.h"
Go to the source code of this file.
Functions | |
static int | setup_bin_data (NL_Msm *pm) |
static int | spatial_hashing (NL_Msm *pm) |
static int | bin_evaluation_1away (NL_Msm *pm) |
static int | bin_evaluation_k_away (NL_Msm *pm) |
int | NL_msm_compute_short_range (NL_Msm *pm) |
|
static |
Definition at line 117 of file msm_shortrng.c.
References NL_Msm_t::a, NL_Msm_t::atom, NL_Msm_t::bin, NL_Msm_t::cellvec1, NL_Msm_t::cellvec2, NL_Msm_t::cellvec3, NL_Msm_t::felec, NL_Msm_t::msmflags, NL_Msm_t::nbx, NL_Msm_t::nby, NL_Msm_t::nbz, next(), NL_Msm_t::next, NL_MSM_PERIODIC_VEC1, NL_MSM_PERIODIC_VEC2, NL_MSM_PERIODIC_VEC3, NL_MSM_SUCCESS, Q, split(), NL_Msm_t::split, SPOLY, NL_Msm_t::uelec, X, Y, and Z.
Referenced by NL_msm_compute_short_range().
|
static |
Definition at line 273 of file msm_shortrng.c.
References NL_Msm_t::a, NL_Msm_t::atom, NL_Msm_t::bin, NL_Msm_t::cellvec1, NL_Msm_t::cellvec2, NL_Msm_t::cellvec3, NL_Msm_t::felec, NL_Msm_t::msmflags, NL_Msm_t::nbrhd, NL_Msm_t::nbrhdlen, NL_Msm_t::nbx, NL_Msm_t::nby, NL_Msm_t::nbz, next(), NL_Msm_t::next, NL_MSM_PERIODIC_VEC1, NL_MSM_PERIODIC_VEC2, NL_MSM_PERIODIC_VEC3, NL_MSM_SUCCESS, Q, split(), NL_Msm_t::split, SPOLY, NL_Msm_t::uelec, X, Y, and Z.
Referenced by NL_msm_compute_short_range().
int NL_msm_compute_short_range | ( | NL_Msm * | pm | ) |
Definition at line 37 of file msm_shortrng.c.
References bin_evaluation_1away(), bin_evaluation_k_away(), NL_Msm_t::maxatoms, NL_Msm_t::msmflags, NL_MSM_COMPUTE_1AWAY, NL_MSM_SUCCESS, NL_Msm_t::numatoms, setup_bin_data(), and spatial_hashing().
Referenced by NL_msm_compute_force().
|
static |
Compute the short-range part of MSM forces.
Perform spatial hashing of atoms into bins. The implementation uses the simplest approach where the bin lengths are at least as large as the cutoff distance, so only nearest neighbor bins need be checked. The bins are represented by a simple linked list of atom indices using fixed array storage: an array of int for the bins giving the index of a "head" atom in the bin and an array of int for the "next" atom in the bin, where -1 denotes the end of the list.
The formulation of bins is determined for an arbitrary set of basis vectors and the spatial hashing is performed in reciprocal space, so this part of the MSM code is ready to support non-orthogonal basis vectors.
XXX The virial is not calculated.
XXX The idea of excluded interaction pairs is totally disregarded. This should be fine for calculating normal systems of atoms, where the full 1/r interaction is later subtracted out for excluded pairs without causing excessive numerical error. However, doing so will be a problem for systems containing Drude particles, possibly also for lone pairs, and is unsuitable for calculating Lennard-Jones.
Definition at line 57 of file msm_shortrng.c.
References ASSERT, NL_Msm_t::maxatoms, NL_Msm_t::next, NL_MSM_ERROR_MALLOC, NL_MSM_SUCCESS, and NL_Msm_t::numatoms.
Referenced by NL_msm_compute_short_range().
|
static |
Definition at line 69 of file msm_shortrng.c.
References NL_Msm_t::atom, NL_Msm_t::bin, NL_Msm_t::cellcenter, NL_Msm_t::nbx, NL_Msm_t::nby, NL_Msm_t::nbz, next(), NL_Msm_t::next, NL_MSM_SUCCESS, numatoms, NL_Msm_t::numatoms, NL_Msm_t::numbins, NL_Msm_t::recipvec1, NL_Msm_t::recipvec2, NL_Msm_t::recipvec3, X, Y, and Z.
Referenced by NL_msm_compute_short_range().