1 #ifndef MCMD_MC_SYSTEM_H 2 #define MCMD_MC_SYSTEM_H 11 #include <mcMd/simulation/System.h> 12 #include <mcMd/neighbor/CellList.h> 13 #include <util/signal/Signal.h> 23 class McPairPotential;
32 class DihedralPotential;
35 class CoulombPotential;
38 class ExternalPotential;
41 class TetherPotential;
78 virtual void readParameters(std::istream &in);
107 virtual void readConfig(std::istream& in);
131 void generateMolecules(
Array<int> const & capacities,
144 double atomPotentialEnergy(
const Atom& atom)
const;
149 double potentialEnergy()
const;
161 template <
typename T>
162 void computeVirialStress(T& stress)
const;
179 template <
typename T>
180 void computeStress(T& stress)
const;
185 void unsetPotentialEnergies();
190 void unsetVirialStress();
207 bool hasBondPotential()
const;
219 bool hasAnglePotential()
const;
231 bool hasDihedralPotential()
const;
243 bool hasCoulombPotential()
const;
248 CoulombPotential& coulombPotential()
const;
255 bool hasExternalPotential()
const;
267 bool hasLinkPotential()
const;
279 TetherPotential& tetherPotential()
const;
294 virtual bool isValid()
const;
340 CoulombPotential* coulombPotentialPtr_;
355 TetherPotential* tetherPotentialPtr_;
372 template <
typename T>
373 void computeVirialStressImpl(T& stress)
const;
376 template <
typename T>
377 void computeLinkStressImpl(T& stress)
const;
390 assert(pairPotentialPtr_);
391 return *pairPotentialPtr_;
400 {
return bool(bondPotentialPtr_); }
407 assert(bondPotentialPtr_);
408 return *bondPotentialPtr_;
417 {
return bool(anglePotentialPtr_); }
424 assert(anglePotentialPtr_);
425 return *anglePotentialPtr_;
434 {
return bool(dihedralPotentialPtr_); }
441 assert(dihedralPotentialPtr_);
442 return *dihedralPotentialPtr_;
451 {
return bool(coulombPotentialPtr_); }
458 assert(coulombPotentialPtr_);
459 return *coulombPotentialPtr_;
468 {
return bool(externalPotentialPtr_); }
475 assert(externalPotentialPtr_);
476 return *externalPotentialPtr_;
486 assert(linkPotentialPtr_);
487 return bool(linkPotentialPtr_);
494 {
return *linkPotentialPtr_; }
501 inline TetherPotential& McSystem::tetherPotential()
const 503 assert(tetherPotentialPtr_);
504 return *tetherPotentialPtr_;
513 { pairPotentialPtr_ = pairPotentialPtr; }
520 {
return positionSignal_; }
A System for use in a Markov chain Monte Carlo simulation.
Interface for a Angle Interaction.
Signal & positionSignal()
Signal to indicate change in atomic positions.
BondPotential & bondPotential() const
Return the BondPotential by reference.
bool hasDihedralPotential() const
Does a dihedral potential exist?.
bool hasLinkPotential() const
Does a link potential exist?.
A PairPotential for MC simulations (abstract).
bool hasAnglePotential() const
Does angle potential exist?.
A set of interacting Molecules enclosed by a Boundary.
File containing preprocessor macros for error handling.
Interface for a Dihedral Potential.
Saving / output archive for binary ostream.
Abstract External Potential class.
bool hasBondPotential() const
Does a bond potential exist?.
ExternalPotential & externalPotential() const
Return ExternalPotential by reference.
A point particle within a Molecule.
Utility classes for scientific computation.
CoulombPotential & coulombPotential() const
Return CoulombPotential by reference.
McPairPotential & pairPotential() const
Return the McPairPotential by reference.
virtual void readConfig(std::istream &in)
Read system configuration from file.
BondPotential & linkPotential() const
Return the McLinkPotential by reference.
Saving archive for binary istream.
bool hasCoulombPotential() const
Does a Coulomb potential exist?.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
bool hasExternalPotential() const
Does an external potential exist?.
Abstract Bond Potential class.
Notifier (or subject) in the Observer design pattern.
AnglePotential & anglePotential() const
Return AnglePotential by reference.
void setPairPotential(McPairPotential *pairPotentialPtr)
Set the PairPotential.
DihedralPotential & dihedralPotential() const
Return the DihedralPotential by reference.