8 #include <mcMd/potentials/pair/PairFactory.h> 10 #include <mcMd/simulation/System.h> 11 #include <mcMd/mdSimulation/MdSystem.h> 14 #include <mcMd/potentials/pair/MdPairPotential.h> 15 #include <mcMd/potentials/pair/MdPairPotentialImpl.h> 16 #include <mcMd/potentials/pair/McPairPotential.h> 17 #include <mcMd/potentials/pair/McPairPotentialImpl.h> 19 #include <mcMd/potentials/pair/MdEwaldPairPotentialImpl.h> 23 #include <simp/interaction/pair/LJPair.h> 24 #include <simp/interaction/pair/WcaPair.h> 25 #include <simp/interaction/pair/DpdPair.h> 28 #include <simp/interaction/pair/CompensatedPair.h> 29 #include <simp/interaction/bond/FeneBond.h> 49 { subfactories_.push_back(&subfactory); }
60 ptr = tryMcSubfactories(name, system);
63 if (name ==
"LJPair") {
66 if (name ==
"WcaPair") {
69 if (name ==
"DpdPair") {
74 if (name ==
"CompensatedPair<DpdPair,FeneBond>") {
91 ptr = tryMdSubfactories(name, system);
100 if (name ==
"LJPair") {
103 if (name ==
"WcaPair") {
106 if (name ==
"DpdPair") {
111 if (name ==
"CompensatedPair<DpdPair,FeneBond>") {
121 if (name ==
"LJPair") {
124 if (name ==
"WcaPair") {
127 if (name ==
"DpdPair") {
132 if (name ==
"CompensatedPair<DpdPair,FeneBond>") {
153 ptr = tryMdSubfactories(potential);
156 if (name ==
"LJPair") {
161 if (name ==
"WcaPair") {
166 if (name ==
"DpdPair") {
173 if (name ==
"CompensatedPair<DpdPair,FeneBond>") {
189 int n = subfactories_.size();
190 for (
int i = 0; i < n && typePtr == 0; ++i) {
191 typePtr = subfactories_[i]->mcFactory(className, system);
203 int n = subfactories_.size();
204 for (
int i = 0; i < n && typePtr == 0; ++i) {
205 typePtr = subfactories_[i]->mdFactory(className, system);
216 int n = subfactories_.size();
217 for (
int i = 0; i < n && typePtr == 0; ++i) {
218 typePtr = subfactories_[i]->mdFactory(potential);
Implementation of a pair potential for a charged system.
Implementation template for an MdPairPotential.
A PairPotential for MC simulations (abstract).
Factory for subclasses MdPairPotential or McPairPotential.
A set of interacting Molecules enclosed by a Boundary.
Classes used by all simpatico molecular simulations.
void addSubfactory(PairFactory &subfactory)
Add a new subfactory to the list.
int hasCoulomb() const
Does a Coulomb potential exist?
Simulation & simulation() const
Get the parent Simulation by reference.
Implementation template for an McPairPotential.
virtual McPairPotential * mcFactory(const std::string &subclass, System &system) const
Return a pointer to a new McPairPotential, if possible.
Utility classes for scientific computation.
virtual MdPairPotential * mdFactory(const std::string &subclass, System &system) const
Return a pointer to a new McPairPotential, if possible.
An PairPotential for MD simulation.
MdPairPotential * tryMdSubfactories(const std::string &className, System &system) const
Search subfactories for match to MdPairPotential subclass name.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
McPairPotential * tryMcSubfactories(const std::string &className, System &system) const
Search subfactories for match to McPairPotential subclass name.
virtual std::string interactionClassName() const =0
Return name of pair interaction class (e.g., "LJPair").
A System for Molecular Dynamics simulation.
PairFactory()
Constructor.