Simpatico  v1.10
List of all members | Public Member Functions
McMd::SystemInterface Class Reference

Detailed Description

An interface to a System.

A SystemInterface is an interface for a system that is intended to be used as a protected or private base class for classes that evaluate properties of a system. It provides functions to directly access:

Definition at line 43 of file SystemInterface.h.

#include <SystemInterface.h>

Inheritance diagram for McMd::SystemInterface:
McMd::AnglePotentialImpl< Interaction > McMd::BondPotentialImpl< Interaction > McMd::DeformCommand McMd::DihedralPotentialImpl< Interaction > McMd::ExternalPotentialImpl< Interaction > McMd::LinkPotentialImpl< Interaction > McMd::McPairPotential McMd::McSystemInterface McMd::MdPairPotential McMd::MdSystemInterface

Public Member Functions

 SystemInterface (System &parent)
 Constructor. More...
 
virtual ~SystemInterface ()
 Destructor. More...
 
Systemsystem () const
 Get the parent System by reference. More...
 

Protected Member Functions

Accessors (Miscellaneous)
Boundaryboundary () const
 Get the Boundary by reference. More...
 
Simulationsimulation () const
 Get the parent Simulation by reference. More...
 
Molecule Set Accessors
int nMolecule (int speciesId) const
 Get the number of molecules of one Species in this SystemInterface. More...
 
int nAtom () const
 Return the total number of atoms in this SystemInterface. More...
 
bool isEmpty () const
 Is this an empty SystemInterface (i.e., one with no molecules) ? More...
 
void begin (int speciesId, System::MoleculeIterator &iterator)
 Initialize an iterator for molecules of one species in this SystemInterface. More...
 
void begin (int speciesId, System::ConstMoleculeIterator &iterator) const
 Initialize a const iterator for molecules of one species in this SystemInterface. More...
 
Potential Energy Queries
bool hasBonds () const
 Does a bond potential exist? More...
 
bool hasAngles () const
 Does an angle potential exist? More...
 
bool hasDihedrals () const
 Does a dihedral potential exist? More...
 
bool hasLinks () const
 Does a link potential exist? More...
 
bool hasExternal () const
 Does an external potential exist? More...
 

Constructor & Destructor Documentation

McMd::SystemInterface::SystemInterface ( System parent)

Constructor.

Parameters
parentparent System

Definition at line 24 of file SystemInterface.cpp.

McMd::SystemInterface::~SystemInterface ( )
virtual

Destructor.

Definition at line 52 of file SystemInterface.cpp.

Member Function Documentation

System & McMd::SystemInterface::system ( ) const
inline

Get the parent System by reference.

Definition at line 215 of file SystemInterface.h.

Referenced by McMd::DeformCommand::execute(), and McMd::ExternalPotentialImpl< Interaction >::readParameters().

Boundary & McMd::SystemInterface::boundary ( ) const
inlineprotected
Simulation & McMd::SystemInterface::simulation ( ) const
inlineprotected

Get the parent Simulation by reference.

Definition at line 206 of file SystemInterface.h.

Referenced by McMd::ExternalPotentialImpl< Interaction >::addForces(), McMd::BondPotentialImpl< Interaction >::addForces(), McMd::DihedralPotentialImpl< Interaction >::addForces(), McMd::AnglePotentialImpl< Interaction >::addForces(), McMd::McPairPotential::buildCellList(), McMd::MdPairPotential::buildPairList(), McMd::ExternalPotentialImpl< Interaction >::computeEnergy(), McMd::BondPotentialImpl< Interaction >::computeEnergy(), McMd::DihedralPotentialImpl< Interaction >::computeEnergy(), McMd::AnglePotentialImpl< Interaction >::computeEnergy(), McMd::DeformCommand::execute(), isEmpty(), McMd::McPairPotentialImpl< Interaction >::loadParameters(), McMd::BondPotentialImpl< Interaction >::loadParameters(), McMd::AnglePotentialImpl< Interaction >::loadParameters(), McMd::ExternalPotentialImpl< Interaction >::loadParameters(), McMd::DihedralPotentialImpl< Interaction >::loadParameters(), McMd::MdEwaldPairPotentialImpl< Interaction >::loadParameters(), McMd::MdPairPotentialImpl< Interaction >::loadParameters(), nAtom(), McMd::McPairPotentialImpl< Interaction >::readParameters(), McMd::BondPotentialImpl< Interaction >::readParameters(), McMd::AnglePotentialImpl< Interaction >::readParameters(), McMd::ExternalPotentialImpl< Interaction >::readParameters(), McMd::DihedralPotentialImpl< Interaction >::readParameters(), McMd::LinkPotentialImpl< Interaction >::readParameters(), McMd::MdEwaldPairPotentialImpl< Interaction >::readParameters(), and McMd::MdPairPotentialImpl< Interaction >::readParameters().

int McMd::SystemInterface::nMolecule ( int  speciesId) const
inlineprotected

Get the number of molecules of one Species in this SystemInterface.

Parameters
speciesIdinteger Id for a Species.
Returns
number of molecules of specified Species in this SystemInterface.

Definition at line 233 of file SystemInterface.h.

Referenced by isEmpty(), and nAtom().

int McMd::SystemInterface::nAtom ( ) const
protected

Return the total number of atoms in this SystemInterface.

Definition at line 69 of file SystemInterface.cpp.

References Simp::Species::nAtom(), nMolecule(), McMd::Simulation::nSpecies(), simulation(), and McMd::Simulation::species().

bool McMd::SystemInterface::isEmpty ( ) const
protected

Is this an empty SystemInterface (i.e., one with no molecules) ?

Definition at line 58 of file SystemInterface.cpp.

References nMolecule(), McMd::Simulation::nSpecies(), and simulation().

void McMd::SystemInterface::begin ( int  speciesId,
System::MoleculeIterator iterator 
)
inlineprotected
void McMd::SystemInterface::begin ( int  speciesId,
System::ConstMoleculeIterator iterator 
) const
inlineprotected

Initialize a const iterator for molecules of one species in this SystemInterface.

Parameters
speciesIdinteger Id for the desired Species (input)
iteratormolecule iterator (output)

Definition at line 253 of file SystemInterface.h.

bool McMd::SystemInterface::hasBonds ( ) const
inlineprotected

Does a bond potential exist?

Definition at line 263 of file SystemInterface.h.

Referenced by McMd::McSystemInterface::McSystemInterface(), and McMd::MdSystemInterface::MdSystemInterface().

bool McMd::SystemInterface::hasAngles ( ) const
inlineprotected

Does an angle potential exist?

Definition at line 271 of file SystemInterface.h.

References hasDihedrals(), hasExternal(), and hasLinks().

Referenced by McMd::McSystemInterface::McSystemInterface(), and McMd::MdSystemInterface::MdSystemInterface().

bool McMd::SystemInterface::hasDihedrals ( ) const
inlineprotected

Does a dihedral potential exist?

Definition at line 277 of file SystemInterface.h.

Referenced by hasAngles(), McMd::McSystemInterface::McSystemInterface(), and McMd::MdSystemInterface::MdSystemInterface().

bool McMd::SystemInterface::hasLinks ( ) const
inlineprotected

Does a link potential exist?

Definition at line 283 of file SystemInterface.h.

Referenced by hasAngles().

bool McMd::SystemInterface::hasExternal ( ) const
inlineprotected

Does an external potential exist?

Definition at line 289 of file SystemInterface.h.

Referenced by hasAngles(), McMd::McSystemInterface::McSystemInterface(), and McMd::MdSystemInterface::MdSystemInterface().


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