STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::topology::LennardJonesAnalysis Class Reference

A class to sort and hold details of a topology's Lennard-Jones interactions. The Lennard-Jones table is parsed for a combining rule, tables of sigma and epsilon parameters for self-interactions are kept, and a list of pair-specific sigma and epsilon parameters are stored according to the type indices they modify. More...

#include <lennard_jones_analysis.h>

Public Member Functions

int getLJTypeCount () const
 Get the number of Lennard-Jones indices, the number of distinct Lennard Jones parameter sets which are needed to describe all interactions.
 
int getAtomTypeCount () const
 Get the number of atom types, including all types with equivalent Lennard-Jones parameters.
 
int getSetCount () const
 Get the number of Lennard-Jones parameter sets that the analysis has compiled within its data members.
 
VdwCombiningRule getMostPrevalentCombiningRule () const
 Get the most prevalent Lennard-Jones rule, as judged by the formula that fits the most combinations of distinct sigma and epsilon parameters.
 
double getLJSigma (int consensus_index) const
 Get the Lennard-Jones self interaction sigma for a particular interaction index from within the consensus tables.
 
double getLJ14Sigma (int consensus_index) const
 Get the Lennard-Jones 1:4 non-bonded self interaction sigma for a particular interaction index from within the consensus tables. Descriptions of input parameters follow from getLJSigma(), above.
 
double getLJEpsilon (int consensus_index) const
 Get the Lennard-Jones self interaction epsilon for a particular interaction index from within the consensus tables.
 
double getLJ14Epsilon (int consensus_index) const
 Get the Lennard-Jones 1:4 non-bonded self interaction epsilon for a particular interaction index from within the consensus tables. Descriptions of input parameters follow from getLJEpsilon(), above.
 
double3 getLJCoefficients (int index_i, int index_j) const
 Get the Lennard-Jones A and B coefficients for the general non-bonded interaction of two Lennard-Jones atom types. Overloading and descriptions of input parameters follow from getLJParameters(), above.
 
double3 getLJCoefficients (const char4 atype_i, const char4 atype_j, ExceptionResponse policy=ExceptionResponse::DIE) const
 
double3 getLJ14Coefficients (int index_i, int index_j) const
 Get the Lennard-Jones A and B coefficients for the 1:4 non-bonded interaction of two Lennard-Jones atom types. Overloading and descriptions of input parameters follow from getLJParameters(), above.
 
double3 getLJ14Coefficients (const char4 atype_i, const char4 atype_j, ExceptionResponse policy=ExceptionResponse::DIE) const
 
int getCorrespondence (int set_index, int type_index) const
 Obtain the Lennard-Jones type correspondence for an indexed Lennard-Jones type in one of the underlying sets.
 
const std::vector< int > & getSetCorrespondence (int set_index) const
 Obtain the Lennard-Jones type correspondence for one of the underlying sets. This can be used to reconfigure the Lennard-Jones type indices of a topology to fit within the consensus set.
 
const std::vector< int2 > & getInputInstances (int consensus_index) const
 Get the input sets and Lennard-Jones types to which one of the consensus Lennard-Jones types maps.
 
void addSet (const NonbondedKit< double > &nbk, const std::vector< std::vector< char4 > > &othr_type_aliases)
 Add a new set of Lennard-Jones interactions to the list and expand the internal tables with all unique parameters it may contain, as well as new atom type names for existing parameters. The new topology will be checked to ensure that it does not redefine the parameters associated with known atom type names, or contradict the prevailing combining rules of topologies already incorporated into the tables.
 
 LennardJonesAnalysis (const NonbondedKit< double > &nbk, const std::vector< std::vector< char4 > > &atom_type_aliases_in)
 The constructor accepts a topology. Supplying additional topologies will expand the analysis to cover multiple systems and create a consensus of their respective Lennard-Jones parameters with arrays to index the original topologies' atoms into the unified tables.
 
 LennardJonesAnalysis (const LennardJonesAnalysis &original)=default
 
 LennardJonesAnalysis (LennardJonesAnalysis &&original)=default
 
LennardJonesAnalysisoperator= (const LennardJonesAnalysis &original)=default
 
LennardJonesAnalysisoperator= (LennardJonesAnalysis &&original)=default
 
const std::vector< char4 > & getLJAliases (int consensus_index) const
 Get the atom type names associated with a particular Lennard-Jones parameter set, type index in one of the topologies, or aliases of a particular type name.
 
const std::vector< char4 > & getLJAliases (double sigma_query, double epsilon_query, double tolerance=1.0e-4) const
 
const std::vector< char4 > & getLJAliases (const char4 atom_type_query, ExceptionResponse policy=ExceptionResponse::DIE) const
 
double2 getLJParameters (int consensus_index) const
 Get the Lennard-Jones sigma and epsilon parameters for the self interaction of a specific interaction index within the consensus tables or atom type name. The sigma parameter appears in the "x" member of the result and the epsilon parameter in the "y" member.
 
double2 getLJParameters (const char4 atom_type_query, ExceptionResponse policy=ExceptionResponse::DIE) const
 
double2 getLJ14Parameters (int consensus_index) const
 Get the Lennard-Jones sigma and epsilon parameters for 1:4 self interactions of a specific interaction index within the consensus tables or atom type name. The sigma parameter appears in the "x" member of the result and the epsilon parameter in the "y" member. Overloading and descriptions of input parameters follow from getLJParameters(), above.
 
double2 getLJ14Parameters (const char4 atom_type_query, ExceptionResponse policy=ExceptionResponse::DIE) const
 

Detailed Description

A class to sort and hold details of a topology's Lennard-Jones interactions. The Lennard-Jones table is parsed for a combining rule, tables of sigma and epsilon parameters for self-interactions are kept, and a list of pair-specific sigma and epsilon parameters are stored according to the type indices they modify.

Constructor & Destructor Documentation

◆ LennardJonesAnalysis()

stormm::topology::LennardJonesAnalysis::LennardJonesAnalysis ( const LennardJonesAnalysis & original)
default

Composed of Standard Template Library objects with no pointers to repair, the default copy and move constructors are valid for this object, as are the default copy and move assignment operators.

Parameters
originalA pre-existing object to copy or move
otherAn object to place on the right hand side of the assignment statement

Member Function Documentation

◆ addSet()

void stormm::topology::LennardJonesAnalysis::addSet ( const NonbondedKit< double > & nbk,
const std::vector< std::vector< char4 > > & othr_type_aliases )

Add a new set of Lennard-Jones interactions to the list and expand the internal tables with all unique parameters it may contain, as well as new atom type names for existing parameters. The new topology will be checked to ensure that it does not redefine the parameters associated with known atom type names, or contradict the prevailing combining rules of topologies already incorporated into the tables.

Parameters
nbkThe non-bonded abstract of the topology responsible for the new Lennard-Jones parameter set. While this library is included in the AtomGraph library itself and therefore cannot reference the AtomGraph class in any member functions, the abstracts can be passed in much the same way that other information reduced to its basic form can be handled by this library.
othr_sigmaSigma parameters determined for the new Lennard-Jones parameters
othr_epsilonEpsilon parameters determined for the new Lennard-Jones parameters
othr_type_aliasesType aliases for the new set of Lennard-Jones parameters

◆ getCorrespondence()

int stormm::topology::LennardJonesAnalysis::getCorrespondence ( int set_index,
int type_index ) const

Obtain the Lennard-Jones type correspondence for an indexed Lennard-Jones type in one of the underlying sets.

Parameters
set_indexThe underlying set of interest
type_indexThe Lennard-Jones atom type index as presented in the underlying set

◆ getInputInstances()

const std::vector< int2 > & stormm::topology::LennardJonesAnalysis::getInputInstances ( int consensus_index) const

Get the input sets and Lennard-Jones types to which one of the consensus Lennard-Jones types maps.

Parameters
consensus_indexThe consensus Lennard-Jones atom type

◆ getLJAliases()

const std::vector< char4 > & stormm::topology::LennardJonesAnalysis::getLJAliases ( int consensus_index) const

Get the atom type names associated with a particular Lennard-Jones parameter set, type index in one of the topologies, or aliases of a particular type name.

Overloaded:

  • Indicate the index of the Lennard-Jones type within the consensus parameter tables
  • Indicate the index of the topology and the Lennard-Jones type index within that topology
  • Indicate the topology by pointer and the Lennard-Jones type index within that topology
  • Indicate the sigma and epsilon self-interaction parameters, to within 1.0e-4 precision
  • Indicate the name of one of the atom types so that all aliases can be found
Parameters
consensus_indexIndex of the Lennard-Jones interaction type with the consensus table
ag_query_indexIndex of the original AtomGraph within the list of referenced topologies (ag_pointers)
lj_type_indexLennard-Jones interaction index from within the indicated topology
ag_queryThe topology to search for within the list of referenced topologies (failing to find such a topology produces a runtime error)
sigma_queryThe self-interaction sigma parameter of interest
epsilon_queryThe self-interaction epsilon parameter of interest
toleranceThe tolerance for finding a Lennard-Jones parameter match, if supplying sigma and epsilon explicitly
atom_type_queryName of one of the atom type aliases, provided so that all others can be found

◆ getLJEpsilon()

double stormm::topology::LennardJonesAnalysis::getLJEpsilon ( int consensus_index) const

Get the Lennard-Jones self interaction epsilon for a particular interaction index from within the consensus tables.

Parameters
consensus_indexThe interaction type index of interest

◆ getLJParameters()

double2 stormm::topology::LennardJonesAnalysis::getLJParameters ( int consensus_index) const

Get the Lennard-Jones sigma and epsilon parameters for the self interaction of a specific interaction index within the consensus tables or atom type name. The sigma parameter appears in the "x" member of the result and the epsilon parameter in the "y" member.

Overloaded:

  • Specify the index from within the consensus tables
  • Specify one of the names of an atom type alias bearing the parameters of interest
Parameters
consensus_indexThe index of the Lennard-Jones type in the consensus set
atom_type_queryThe letter code of the atom type to find within all atom type names, leading to a particular Lennard-Jones type
policyCourse of action to take if bad input is encountered

◆ getLJSigma()

double stormm::topology::LennardJonesAnalysis::getLJSigma ( int consensus_index) const

Get the Lennard-Jones self interaction sigma for a particular interaction index from within the consensus tables.

Parameters
consensus_indexThe interaction type index of interest. It may not be obvious what this is if the analysis includes more than one topology, but it can still be useful to have an accessor that accepts this sort of input.

◆ getSetCorrespondence()

const std::vector< int > & stormm::topology::LennardJonesAnalysis::getSetCorrespondence ( int set_index) const

Obtain the Lennard-Jones type correspondence for one of the underlying sets. This can be used to reconfigure the Lennard-Jones type indices of a topology to fit within the consensus set.

Parameters
set_indexThe set of interest

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