Stores host-side Lennard-Jones pair tables and per-atom type indices. More...
#include <CharmmParameters.h>
Public Member Functions | |
| VdwParamsAndTypes (const std::vector< float > &vdwParams, const std::vector< float > &vdw14Params, const std::vector< int > &vdwTypes, const std::vector< int > &vdw14Types) | |
| Constructs packed Lennard-Jones data by copying all inputs. | |
Public Attributes | |
| std::vector< float > | vdwParams |
| std::vector< int > | vdwTypes |
Stores host-side Lennard-Jones pair tables and per-atom type indices.
For N distinct PSF atom types, both coefficient arrays contain N * (N + 1) floats. Distinct types are assigned ascending lexicographic indices. Pair (i, j), where 0 <= j <= i < N, starts at float offset 2 * (i * (i + 1) / 2 + j) and stores [C6, C12], with units [kcal mol^-1 angstrom^6, kcal mol^-1 angstrom^12]. vdwTypes and vdw14Types contain one zero-based type index per PSF atom; the current implementation produces identical type-index arrays.
All storage is owned host memory. ForceManager later copies these arrays to the direct-space CUDA force object.
|
inline |
Constructs packed Lennard-Jones data by copying all inputs.
| [in] | vdwParams | Flattened regular [C6, C12] pair table in [kcal mol^-1 angstrom^6, kcal mol^-1 angstrom^12] units. |
| [in] | vdw14Params | Flattened 1-4 [C6, C12] pair table in the same units. |
| [in] | vdwTypes | Per-atom regular type indices. |
| [in] | vdw14Types | Per-atom 1-4 type indices. |
| std::bad_alloc | If copying the host arrays requires an allocation that fails. |
| std::vector<float> VdwParamsAndTypes::vdwParams |
Stores regular and 1-4 flattened pair coefficients in [C6, C12] order.
| std::vector<int> VdwParamsAndTypes::vdwTypes |
Stores regular and 1-4 zero-based type indices for every PSF atom.