1 #ifndef MCMD_MD_SYSTEM_H 2 #define MCMD_MD_SYSTEM_H 11 #include <mcMd/simulation/System.h> 12 #include <util/signal/Signal.h> 17 template <
typename T>
class Factory;
28 class MdPairPotential;
37 class DihedralPotential;
40 class MdCoulombPotential;
43 class ExternalPotential;
46 class SpecialPotential;
49 class TetherPotential;
115 virtual void readParameters(std::istream &in);
143 virtual void readConfig(std::istream& in);
145 using System::readConfig;
171 void generateMolecules(
Array<int> const & capacities,
188 void calculateForces();
193 double kineticEnergy()
const;
198 double potentialEnergy();
203 void unsetPotentialEnergy();
221 template <
typename T>
222 void computeStress(T& stress)
const;
234 template <
typename T>
235 void computeVirialStress(T& stress)
const;
240 void unsetVirialStress();
249 template <
typename T>
250 void computeKineticStress(T& stress)
const;
266 bool hasBondPotential()
const;
279 bool hasAnglePotential()
const;
291 bool hasDihedralPotential()
const;
303 bool hasCoulombPotential()
const;
315 bool hasExternalPotential()
const;
327 bool hasSpecialPotential()
const;
339 bool hasLinkPotential()
const;
351 TetherPotential& tetherPotential()
const;
361 void setZeroForces();
366 void setZeroVelocities();
373 void setBoltzmannVelocities(
double temperature);
382 Vector removeDriftVelocity();
423 virtual bool isValid()
const;
432 virtual ConfigIo* newDefaultConfigIo();
483 TetherPotential* tetherPotentialPtr_;
494 bool createdMdIntegratorFactory_;
506 template <
typename T>
507 void computeKineticStressImpl(T& stress)
const;
509 template <
typename T>
510 void computeVirialStressImpl(T& stress)
const;
522 assert(pairPotentialPtr_);
523 return *pairPotentialPtr_;
531 inline bool MdSystem::hasBondPotential()
const 532 {
return bool(bondPotentialPtr_); }
539 assert(bondPotentialPtr_);
540 return *bondPotentialPtr_;
548 inline bool MdSystem::hasAnglePotential()
const 549 {
return bool(anglePotentialPtr_); }
556 assert(anglePotentialPtr_);
557 return *anglePotentialPtr_;
565 inline bool MdSystem::hasDihedralPotential()
const 566 {
return bool(dihedralPotentialPtr_); }
573 assert(dihedralPotentialPtr_);
574 return *dihedralPotentialPtr_;
582 inline bool MdSystem::hasCoulombPotential()
const 583 {
return bool(coulombPotentialPtr_); }
590 assert(coulombPotentialPtr_);
591 return *coulombPotentialPtr_;
599 inline bool MdSystem::hasExternalPotential()
const 600 {
return bool(externalPotentialPtr_); }
607 assert(externalPotentialPtr_);
608 return *externalPotentialPtr_;
616 inline bool MdSystem::hasSpecialPotential()
const 617 {
return bool(specialPotentialPtr_); }
624 assert(specialPotentialPtr_);
625 return *specialPotentialPtr_;
633 inline bool MdSystem::hasLinkPotential()
const 634 {
return bool(linkPotentialPtr_); }
641 assert(linkPotentialPtr_);
642 return *linkPotentialPtr_;
650 inline TetherPotential& MdSystem::tetherPotential()
const 652 assert(tetherPotentialPtr_);
653 return *tetherPotentialPtr_;
662 assert(mdIntegratorPtr_);
663 return *mdIntegratorPtr_;
670 {
return positionSignal_; }
676 {
return velocitySignal_; }
Coulomb potential for an Md simulation.
A System for use in a Markov chain Monte Carlo simulation.
A Vector is a Cartesian vector.
Interface for a Angle Interaction.
A set of interacting Molecules enclosed by a Boundary.
File containing preprocessor macros for error handling.
Specialized potential for an MD simulation.
Abstract base for molecular dynamics integrators.
Interface for a Dihedral Potential.
Saving / output archive for binary ostream.
Abstract External Potential class.
Utility classes for scientific computation.
An PairPotential for MD simulation.
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Abstract Bond Potential class.
Notifier (or subject) in the Observer design pattern.
A System for Molecular Dynamics simulation.
System configuration file reader and writer.