This class stores the (physical) properties of molecule types, and, in the case of multi-site molecules, the location of the sites relative to the the center-of-mass. More...
#include <ParticlePropertiesLibrary.h>
Public Member Functions | |
ParticlePropertiesLibrary (const double cutoff) | |
Constructor. | |
ParticlePropertiesLibrary (const ParticlePropertiesLibrary &particlePropertiesLibrary)=default | |
Copy Constructor. | |
ParticlePropertiesLibrary & | operator= (const ParticlePropertiesLibrary &particlePropertiesLibrary)=default |
Copy assignment operator. | |
void | addSiteType (const intType siteId, const floatType mass) |
Registers a new single site type to the library with a given mass. | |
void | addLJParametersToSite (const intType siteId, const floatType epsilon, const floatType sigma) |
Adds the LJ properties of a single site type to the library. | |
void | addATParametersToSite (const intType siteId, const floatType nu) |
Adds the AT properties of a single site type to the library. | |
void | addMolType (const intType molId, const std::vector< intType > siteIds, const std::vector< std::array< floatType, 3 > > relPos, const std::array< floatType, 3 > momentOfInertia) |
Adds the properties of a molecule type to the library including: position and type of all sites, as well as the diagonalized moment of inertia. | |
void | calculateMixingCoefficients () |
Calculates the actual mixing coefficients. | |
int | getNumberRegisteredSiteTypes () const |
Returns the number of registered site / single-site molecule types. | |
int | getNumberRegisteredMolTypes () const |
Returns the number of registered multi-site molecule types. | |
floatType | getEpsilon (intType i) const |
Getter for the site's epsilon. | |
floatType | getSigma (intType i) const |
Getter for the site's sigma. | |
floatType | getNu (intType i) const |
Getter for the site's nu. | |
floatType | getSiteMass (intType i) const |
Getter for the site's mass. | |
floatType | getMolMass (intType i) const |
Getter for a molecules' mass. | |
std::array< floatType, 3 > | getMomentOfInertia (intType i) const |
Getter for the multi-site molecule's diagonalized Moment of Inertia. | |
std::vector< std::array< floatType, 3 > > | getSitePositions (intType i) const |
Get relative site positions to a multi-site molecule's center-of-mass. | |
std::vector< intType > | getSiteTypes (intType i) const |
Get site types of a multi-site molecule. | |
intType | getNumSites (intType i) const |
Get number of sites of a multi-site molecule. | |
floatType | getMoleculesLargestSigma (intType i) const |
Get the largest sigma of any site of a multi-site molecule. | |
floatType | getMixing24Epsilon (intType i, intType j) const |
Returns the precomputed mixed epsilon * 24. | |
auto | getLJMixingData (intType i, intType j) const |
Get complete mixing data for one pair of LJ site types. | |
const double * | getLJMixingDataPtr (intType i, intType j) |
Get a pointer to Mixing Data for one pair of LJ site types. | |
floatType | getMixingSigmaSquared (intType i, intType j) const |
Returns precomputed mixed squared sigma for one pair of site types. | |
floatType | getMixingShift6 (intType i, intType j) const |
Returns precomputed mixed shift * 6 for one pair of site types. | |
floatType | getMixingNu (intType i, intType j, intType k) const |
Returns the precomputed mixed epsilon * 24. | |
auto | getATMixingData (intType i, intType j, intType k) const |
Get complete mixing data for one triplet of AT site types. | |
Static Public Member Functions | |
static double | calcShift6 (double epsilon24, double sigmaSquared, double cutoffSquared) |
Calculate the shift multiplied 6 of the lennard jones potential from given cutoff, epsilon, sigma. | |
This class stores the (physical) properties of molecule types, and, in the case of multi-site molecules, the location of the sites relative to the the center-of-mass.
It also provides mixed values for (force) calculations between known types.
ToDo: Add a function that computes the diagonalized Moment of Inertia and adjusts the rotation of the positions of the sites such that they correctly match the new axes.
|
inlineexplicit |
Constructor.
cutoff | Cutoff for the Potential |
|
default |
Copy Constructor.
particlePropertiesLibrary |
void ParticlePropertiesLibrary< floatType, intType >::addATParametersToSite | ( | const intType | siteId, |
const floatType | nu | ||
) |
Adds the AT properties of a single site type to the library.
Checks if a site with given siteId was already registered. Old values will be overwritten.
siteId | |
nu |
void ParticlePropertiesLibrary< floatType, intType >::addLJParametersToSite | ( | const intType | siteId, |
const floatType | epsilon, | ||
const floatType | sigma | ||
) |
Adds the LJ properties of a single site type to the library.
Checks if a site with given siteId was already registered. Old values will be overwritten.
siteId | |
epsilon | |
sigma |
void ParticlePropertiesLibrary< floatType, intType >::addMolType | ( | const intType | molId, |
const std::vector< intType > | siteIds, | ||
const std::vector< std::array< floatType, 3 > > | relPos, | ||
const std::array< floatType, 3 > | momentOfInertia | ||
) |
Adds the properties of a molecule type to the library including: position and type of all sites, as well as the diagonalized moment of inertia.
If md-flexible has been compiled for single-site molecules, calls to this function result in an error. If the type id already exists the values will be overwritten.
molId | |
siteIds | vector of IDs of sites |
relPos | vector of relative positions |
momentOfInertia | diagonalized moment of inertia as a array of 3 floats |
void ParticlePropertiesLibrary< floatType, intType >::addSiteType | ( | const intType | siteId, |
const floatType | mass | ||
) |
Registers a new single site type to the library with a given mass.
addLJParametersToSite()
for a Lennard-Jones Site.siteId | |
mass |
|
static |
Calculate the shift multiplied 6 of the lennard jones potential from given cutoff, epsilon, sigma.
The shift * 6 is then added to the total potential energy for every pairwise interaction within the cutoff.
epsilon24 | epsilon * 24 |
sigmaSquared | sigma squared |
cutoffSquared | squared cutoff of the lennard-jones potential |
|
inline |
Get complete mixing data for one triplet of AT site types.
i | Id of site one. |
j | Id of site two. |
k | Id of site three. |
floatType ParticlePropertiesLibrary< floatType, intType >::getEpsilon | ( | intType | i | ) | const |
Getter for the site's epsilon.
i | Type Id of the site or single-site molecule. |
|
inline |
Get complete mixing data for one pair of LJ site types.
i | Id of site one. |
j | Id of site two. |
|
inline |
Get a pointer to Mixing Data for one pair of LJ site types.
i | Id of site one. |
j | Id of site two. |
|
inline |
Returns the precomputed mixed epsilon * 24.
i | Id of site one. |
j | Id of site two. |
|
inline |
Returns the precomputed mixed epsilon * 24.
i | Id of site one. |
j | Id of site two. |
k | Id of site three. |
|
inline |
Returns precomputed mixed shift * 6 for one pair of site types.
i | siteId of site one. |
j | siteId of site two. |
|
inline |
Returns precomputed mixed squared sigma for one pair of site types.
i | Id of site one. |
j | Id of site two. |
floatType ParticlePropertiesLibrary< floatType, intType >::getMoleculesLargestSigma | ( | intType | i | ) | const |
Get the largest sigma of any site of a multi-site molecule.
Throws an error if support for multi-site molecules has not been compiled.
i | Type Id of a multi-site molecule. |
floatType ParticlePropertiesLibrary< floatType, intType >::getMolMass | ( | intType | i | ) | const |
Getter for a molecules' mass.
For single site molecules, this automatically gets the mass of the site with the given ID. For multi site molecules, this gets the total mass of the molecule.
i | Type Id of a multi-site molecule. |
std::array< floatType, 3 > ParticlePropertiesLibrary< floatType, intType >::getMomentOfInertia | ( | intType | i | ) | const |
Getter for the multi-site molecule's diagonalized Moment of Inertia.
Throws an error if support for multi-site molecules has not been compiled.
i | Type Id of a multi-site molecule. |
floatType ParticlePropertiesLibrary< floatType, intType >::getNu | ( | intType | i | ) | const |
Getter for the site's nu.
i | Type Id of the site or single-site molecule. |
|
inline |
Returns the number of registered multi-site molecule types.
Throws an error if support for multi-site molecules has not been compiled.
|
inline |
Returns the number of registered site / single-site molecule types.
intType ParticlePropertiesLibrary< floatType, intType >::getNumSites | ( | intType | i | ) | const |
Get number of sites of a multi-site molecule.
Throws an error if support for multi-site molecules has not been compiled.
i | Type Id of a multi-site molecule. |
floatType ParticlePropertiesLibrary< floatType, intType >::getSigma | ( | intType | i | ) | const |
Getter for the site's sigma.
i | Type Id of the site or single-site molecule. |
floatType ParticlePropertiesLibrary< floatType, intType >::getSiteMass | ( | intType | i | ) | const |
Getter for the site's mass.
i | Type Id of the site or single-site molecule. |
std::vector< std::array< floatType, 3 > > ParticlePropertiesLibrary< floatType, intType >::getSitePositions | ( | intType | i | ) | const |
Get relative site positions to a multi-site molecule's center-of-mass.
These site positions must be appropriately translated and rotated to be used.
Throws an error if support for multi-site molecules has not been compiled.
i | Type Id of a multi-site molecule. |
std::vector< intType > ParticlePropertiesLibrary< floatType, intType >::getSiteTypes | ( | intType | i | ) | const |
Get site types of a multi-site molecule.
Throws an error if support for multi-site molecules has not been compiled.
i | Type Id of a multi-site molecule. |
|
default |
Copy assignment operator.
particlePropertiesLibrary |