2#ifndef LENNARD_JONES_ANALYSIS_H
3#define LENNARD_JONES_ANALYSIS_H
8#include "Constants/behavior.h"
9#include "DataTypes/stormm_vector_types.h"
10#include "Potential/energy_enumerators.h"
11#include "Synthesis/atomgraph_synthesis.h"
16using constants::ExceptionResponse;
17using energy::VdwCombiningRule;
18using synthesis::AtomGraphSynthesis;
29 const char4 type_b_in = {
' ',
' ',
' ',
' ' },
double lja_in = 0.0,
30 double ljb_in = 0.0,
double lja_14_in = 0.0,
double ljb_14_in = 0.0);
66 const std::vector<std::vector<char4>> &atom_type_aliases_in);
121 const std::vector<char4>&
getLJAliases(
int consensus_index)
const;
123 const std::vector<char4>&
getLJAliases(
double sigma_query,
double epsilon_query,
124 double tolerance = 1.0e-4)
const;
127 ExceptionResponse policy = ExceptionResponse::DIE)
const;
170 ExceptionResponse policy = ExceptionResponse::DIE)
const;
181 ExceptionResponse policy = ExceptionResponse::DIE)
const;
190 ExceptionResponse policy = ExceptionResponse::DIE)
const;
199 ExceptionResponse policy = ExceptionResponse::DIE)
const;
238 const std::vector<std::vector<char4>> &othr_type_aliases);
259 VdwCombiningRule prevalent_rule;
264 VdwCombiningRule absolute_rule;
268 std::vector<double> sigma;
272 std::vector<double> sigma_14;
276 std::vector<double> epsilon;
280 std::vector<double> epsilon_14;
285 std::vector<double> lja_coeff;
286 std::vector<double> ljb_coeff;
287 std::vector<double> ljc_coeff;
288 std::vector<double> lja_14_coeff;
289 std::vector<double> ljb_14_coeff;
290 std::vector<double> ljc_14_coeff;
295 std::vector<PairLJInteraction> edits;
298 std::vector<int> ag_index_origins_bounds;
302 std::vector<std::vector<char4>> atom_type_aliases;
307 std::map<uint, std::vector<int>> atom_type_map;
314 std::vector<std::vector<int>> set_to_consensus_map;
322 std::vector<std::vector<int2>> consensus_to_set_map;
327 void validateConsensusIndexQuery(
int ljt_query)
const;
335 void confirmDistinctType(
const char4 atom_type_query,
336 const ExceptionResponse policy = ExceptionResponse::DIE,
337 const char* caller =
nullptr)
const;
344std::string listAtomTypesAsString(
const std::vector<char4> &atyp_list);
352int inferLennardJonesTypeCount(
const int length_a,
const int length_b,
353 const char* caller =
nullptr);
376VdwCombiningRule inferCombiningRule(
const T* lja,
const T* ljb,
int lj_type_count,
377 ExceptionResponse policy = ExceptionResponse::WARN,
378 bool seek_prevalent =
false);
381VdwCombiningRule inferCombiningRule(
const std::vector<T> &lja,
const std::vector<T> &ljb,
382 ExceptionResponse policy = ExceptionResponse::WARN,
383 bool seek_prevalent =
false);
387 ExceptionResponse policy = ExceptionResponse::WARN,
388 bool seek_prevalent =
false);
397std::vector<bool> findPairSpecificParticipation(
const T* lja,
const T* ljb,
int lj_type_count);
400VdwCombiningRule findPairSpecificParticipation(
const std::vector<T> &lja,
401 const std::vector<T> &ljb);
404VdwCombiningRule findPairSpecificParticipation(
const Hybrid<T> &lja,
const Hybrid<T> &ljb);
410#include "lennard_jones_analysis.tpp"
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
double2 getLJParameters(int consensus_index) const
Get the Lennard-Jones sigma and epsilon parameters for the self interaction of a specific interaction...
Definition lennard_jones_analysis.cpp:276
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 o...
Definition lennard_jones_analysis.cpp:190
VdwCombiningRule getMostPrevalentCombiningRule() const
Get the most prevalent Lennard-Jones rule, as judged by the formula that fits the most combinations o...
Definition lennard_jones_analysis.cpp:185
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...
Definition lennard_jones_analysis.cpp:29
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-Jone...
Definition lennard_jones_analysis.cpp:302
LennardJonesAnalysis(const LennardJonesAnalysis &original)=default
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 reco...
Definition lennard_jones_analysis.cpp:362
double2 getLJ14Parameters(int consensus_index) const
Get the Lennard-Jones sigma and epsilon parameters for 1:4 self interactions of a specific interactio...
double getLJ14Sigma(int consensus_index) const
Get the Lennard-Jones 1:4 non-bonded self interaction sigma for a particular interaction index from w...
Definition lennard_jones_analysis.cpp:261
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 uniqu...
Definition lennard_jones_analysis.cpp:381
int getSetCount() const
Get the number of Lennard-Jones parameter sets that the analysis has compiled within its data members...
Definition lennard_jones_analysis.cpp:180
double getLJSigma(int consensus_index) const
Get the Lennard-Jones self interaction sigma for a particular interaction index from within the conse...
Definition lennard_jones_analysis.cpp:256
double getLJEpsilon(int consensus_index) const
Get the Lennard-Jones self interaction epsilon for a particular interaction index from within the con...
Definition lennard_jones_analysis.cpp:266
int getAtomTypeCount() const
Get the number of atom types, including all types with equivalent Lennard-Jones parameters.
Definition lennard_jones_analysis.cpp:175
int getLJTypeCount() const
Get the number of Lennard-Jones indices, the number of distinct Lennard Jones parameter sets which ar...
Definition lennard_jones_analysis.cpp:170
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 at...
Definition lennard_jones_analysis.cpp:310
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 underlyi...
Definition lennard_jones_analysis.cpp:348
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.
Definition lennard_jones_analysis.cpp:371
double getLJ14Epsilon(int consensus_index) const
Get the Lennard-Jones 1:4 non-bonded self interaction epsilon for a particular interaction index from...
Definition lennard_jones_analysis.cpp:271
Definition stormm_vector_types.h:141
Definition stormm_vector_types.h:112
Definition stormm_vector_types.h:117
PairLJInteraction(const char4 type_a_in={ ' ', ' ', ' ', ' ' }, const char4 type_b_in={ ' ', ' ', ' ', ' ' }, double lja_in=0.0, double ljb_in=0.0, double lja_14_in=0.0, double ljb_14_in=0.0)
The default constructor will initialize atom types and parameters, but they are almost certain to reg...
Definition lennard_jones_analysis.cpp:20
Information needed for non-bonded real-space calculations. Templating is used as above,...
Definition atomgraph_abstracts.h:287
char4 type_a
Atom type of the first atom in the pair.
Definition lennard_jones_analysis.h:45
PairLJInteraction(const PairLJInteraction &original)=default
The default copy and move constructions as well as assignment operators are valid,...
double ljb_14
Lennard-Jones B coefficient for 1:4 interactions.
Definition lennard_jones_analysis.h:50
PairLJInteraction(const char4 type_a_in={ ' ', ' ', ' ', ' ' }, const char4 type_b_in={ ' ', ' ', ' ', ' ' }, double lja_in=0.0, double ljb_in=0.0, double lja_14_in=0.0, double ljb_14_in=0.0)
The default constructor will initialize atom types and parameters, but they are almost certain to reg...
Definition lennard_jones_analysis.cpp:20
char4 type_b
Atom type of the second atom in the pair.
Definition lennard_jones_analysis.h:46
double lja
Lennard-Jones A coefficient for the interaction, as in U = A/r^12 - B/r^6.
Definition lennard_jones_analysis.h:47
double ljb
Lennard-Jones B coefficient for the interaction.
Definition lennard_jones_analysis.h:48
double lja_14
Lennard-Jones A coefficient for 1:4 interactions.
Definition lennard_jones_analysis.h:49