apoCHARMM 1.0.0
High-performance molecular dynamics simulations on GPUs
 
Loading...
Searching...
No Matches
BondedParamsAndLists Struct Reference

Stores host-side bonded coefficient rows and topology rows. More...

#include <CharmmParameters.h>

Public Member Functions

 BondedParamsAndLists (const std::vector< int > &pSize, const std::vector< std::vector< float > > &pVal, const std::vector< int > &lSize, const std::vector< std::vector< int > > &lVal)
 Constructs packed bonded data by copying all supplied vectors.
 

Public Attributes

std::vector< int > paramsSize
 
std::vector< std::vector< float > > paramsVal
 
std::vector< int > listsSize
 
std::vector< std::vector< int > > listVal
 

Detailed Description

Stores host-side bonded coefficient rows and topology rows.

paramsSize and listsSize each contain six entries in this order: bond, Urey-Bradley, angle, proper dihedral, improper dihedral, and CMAP. paramsVal concatenates the coefficient rows for those categories:

  • bond: [b0, kb] in [angstrom, kcal mol^-1 angstrom^-2];
  • Urey-Bradley: [s0, kub] in [angstrom, kcal mol^-1 angstrom^-2];
  • angle: [theta0_radians, kTheta] in [radian, kcal mol^-1 radian^-2];
  • proper dihedral: [signed_n, kChi, sin(delta), cos(delta)] in [dimensionless, kcal mol^-1, dimensionless, dimensionless], where nonterminal rows for a multi-term key use a negative multiplicity;
  • improper dihedral: [psi0_degrees, kPsi, 0, 1] in [degree, kcal mol^-1 radian^-2, dimensionless, dimensionless];
  • CMAP: no rows in the current implementation.

listVal concatenates zero-based PSF atom-index rows. Bond and Urey-Bradley rows are [i, j, type, 13]; angle rows are [i, j, k, type, 13, 13]; torsion rows are [i, j, k, l, type, 13, 13, 13]. Type indices are local to each category. The shift sentinel 13 denotes the zero periodic image.

All storage is owned host memory. ForceManager later copies these rows to CUDA force objects.

Constructor & Destructor Documentation

◆ BondedParamsAndLists()

BondedParamsAndLists::BondedParamsAndLists ( const std::vector< int > &  pSize,
const std::vector< std::vector< float > > &  pVal,
const std::vector< int > &  lSize,
const std::vector< std::vector< int > > &  lVal 
)
inline

Constructs packed bonded data by copying all supplied vectors.

Parameters
[in]pSizeSix coefficient-row counts in bonded-category order.
[in]pValConcatenated host coefficient rows.
[in]lSizeSix topology-row counts in bonded-category order.
[in]lValConcatenated host topology rows.
Postcondition
The object owns independent copies of all four inputs.
Exceptions
std::bad_allocIf copying the host vectors requires an allocation that fails.
Note
The constructor does not validate sizes, row widths, or indices.

Member Data Documentation

◆ listsSize

std::vector<int> BondedParamsAndLists::listsSize

Stores the six topology-row counts in bonded-category order.

◆ listVal

std::vector<std::vector<int> > BondedParamsAndLists::listVal

Stores the concatenated zero-based PSF topology rows.

◆ paramsSize

std::vector<int> BondedParamsAndLists::paramsSize

Stores the six coefficient-row counts in bonded-category order.

◆ paramsVal

std::vector<std::vector<float> > BondedParamsAndLists::paramsVal

Stores the concatenated host coefficient rows.