STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::structure::ComboGraphLJModel Class Reference

An object to manage the combination of Lennard-Jones parameters from two topologies. This can be used to insert "NBFix" pair-specific (off-rule) parameters where neither topology by itself might contain the requisite information. It can also be used to build parameter tables for a union of the two underlying topologies and produce arrays indices into that table for a new topology. More...

#include <combograph_ljmodel.h>

Public Member Functions

int getSetCount () const
 Get the number of Lennard-Jones parameter matrix sets.
 
VdwCombiningRule getDefaultCombiningRule () const
 Get the default combining rule for mixing parameters of different topologies.
 
VdwCombiningRule getPrimaryTopologyRule () const
 Get the combining rule effective in the primary topology.
 
VdwCombiningRule getSecondaryTopologyRule (int index) const
 Get the combining rule effective in one of the secondary topologies.
 
int2 getMatrixSize (int index) const
 Get the number of atom types in the primary topology.
 
const std::vector< double > & getACoefficients (int index) const
 Get the matrix of Lennard-Jones A coefficients between the primary topology and another topology. The primary atom types control rows of the matrix, while the other topology's atom types control columns. The matrix has column format, like others in STORMM.
 
const std::vector< double > & getBCoefficients (int index) const
 Get the matrix of Lennard-Jones B coefficients between the primary topology and another topology. The primary atom types control rows of the matrix, while the other topology's atom types control columns. The matrix has column format, like others in STORMM.
 
std::vector< int > computeConsensusParameters () const
 
int getAtomTypeUnionSize ()
 Compute the number of unique atom types across all topologies other than the primary. This is done by finding unique fingerprints among the columns of the A and B coefficient matrices for each combination parameter set.
 
 ComboGraphLJModel (const AtomGraph *primary_ag_in, const AtomGraph *ag_secondary_in=nullptr, VdwCombiningRule default_rule_in=VdwCombiningRule::LORENTZ_BERTHELOT, const std::vector< PairLJInteraction > &edits={})
 The constructor accepts two topologies or two Lennard-Jones parameter sets. Edits to the Lennard-Jones parameters can be provided to the constructor or entered later.
 
 ComboGraphLJModel (const AtomGraph &primary_ag_in, const AtomGraph &ag_secondary_in, VdwCombiningRule default_rule_in=VdwCombiningRule::LORENTZ_BERTHELOT, const std::vector< PairLJInteraction > &edits={})
 
 ComboGraphLJModel (const AtomGraph &primary_ag_in, const AtomGraphSynthesis &poly_ag_secondary, VdwCombiningRule default_rule_in=VdwCombiningRule::LORENTZ_BERTHELOT, const std::vector< PairLJInteraction > &edits={})
 
 ComboGraphLJModel (const AtomGraph *primary_ag_in, const std::vector< double > &lj_a_in, const std::vector< double > &lj_b_in, const std::vector< char4 > &lj_type_names={}, VdwCombiningRule default_rule_in=VdwCombiningRule::LORENTZ_BERTHELOT, const std::vector< PairLJInteraction > &edits={})
 
 ComboGraphLJModel (const AtomGraph &primary_ag_in, const std::vector< double > &lj_a_in, const std::vector< double > &lj_b_in, const std::vector< char4 > &lj_type_names={}, VdwCombiningRule default_rule_in=VdwCombiningRule::LORENTZ_BERTHELOT, const std::vector< PairLJInteraction > &edits={})
 
template<typename T>
void addCombination (const T *lja_in, const T *ljb_in, int lj_type_count, const char4 *lj_type_names=nullptr, const std::vector< PairLJInteraction > &edits={})
 Add an interaction matrix to the list of combinations.
 
template<typename T>
void addCombination (const std::vector< T > &lja_in, const std::vector< T > &ljb_in, const std::vector< char4 > &lj_type_names={}, const std::vector< PairLJInteraction > &edits={})
 
void addCombination (const AtomGraph *ag_secondary, const std::vector< PairLJInteraction > &edits={})
 
void addCombination (const AtomGraph &ag_secondary, const std::vector< PairLJInteraction > &edits={})
 

Detailed Description

An object to manage the combination of Lennard-Jones parameters from two topologies. This can be used to insert "NBFix" pair-specific (off-rule) parameters where neither topology by itself might contain the requisite information. It can also be used to build parameter tables for a union of the two underlying topologies and produce arrays indices into that table for a new topology.

Constructor & Destructor Documentation

◆ ComboGraphLJModel()

stormm::topology::ComboGraphLJModel::ComboGraphLJModel ( const AtomGraph * primary_ag_in,
const AtomGraph * ag_secondary_in = nullptr,
VdwCombiningRule default_rule_in = VdwCombiningRule::LORENTZ_BERTHELOT,
const std::vector< PairLJInteraction > & edits = {} )

The constructor accepts two topologies or two Lennard-Jones parameter sets. Edits to the Lennard-Jones parameters can be provided to the constructor or entered later.

Parameters
poly_ag_secondaryA synthesis of topologies form which to harvest unique Lennard-Jones types
edits_inA list of edits to apply to modify pair-specific Lennard-Jones

Member Function Documentation

◆ addCombination()

template<typename T>
void stormm::topology::ComboGraphLJModel::addCombination ( const T * lja_in,
const T * ljb_in,
int lj_type_count,
const char4 * lj_type_names = nullptr,
const std::vector< PairLJInteraction > & edits = {} )

Add an interaction matrix to the list of combinations.

Overloaded:

  • Provide a combination of vectors or C-style arrays for the new parameter set
  • Provide the new topology by const pointer or const reference
Parameters
lja_inArray of Lennard-Jones A coefficients, i.e. U = A/r^12 + B/r^6, to be combined per the object's default rule
ljb_inArray of Lennard-Jones B coefficients, to be combined per the object's default rule
lj_type_countThe number of Lennard-Jones types, implying a trusted length for lja_in and ljb_in, if provided as C-style arrays
ag_newThe topology to incorporate. A null pointer will abort the inclusion.
editsA list of pair-specific Lennard-Jones parameters to apply

◆ getACoefficients()

const std::vector< double > & stormm::topology::ComboGraphLJModel::getACoefficients ( int index) const

Get the matrix of Lennard-Jones A coefficients between the primary topology and another topology. The primary atom types control rows of the matrix, while the other topology's atom types control columns. The matrix has column format, like others in STORMM.

Parameters
indexThe combination of interest

◆ getBCoefficients()

const std::vector< double > & stormm::topology::ComboGraphLJModel::getBCoefficients ( int index) const

Get the matrix of Lennard-Jones B coefficients between the primary topology and another topology. The primary atom types control rows of the matrix, while the other topology's atom types control columns. The matrix has column format, like others in STORMM.

Parameters
indexThe combination of interest

◆ getMatrixSize()

int2 stormm::topology::ComboGraphLJModel::getMatrixSize ( int index) const

Get the number of atom types in the primary topology.

Get the size of a particular combination matrix. The matrix has as many rows as the primary topology has atom types and as many columns as the new (other) topology has atom types.

Parameters
indexThe combination of interest

◆ getSecondaryTopologyRule()

VdwCombiningRule stormm::topology::ComboGraphLJModel::getSecondaryTopologyRule ( int index) const

Get the combining rule effective in one of the secondary topologies.

Parameters
indexThe secondary topology of interest (the ith secondary topology takes part in the ith combination with the primary topology)

The documentation for this class was generated from the following files: