OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::InteractionManager Class Reference

#include <InteractionManager.hpp>

Public Member Functions

 InteractionManager ()
 
virtual ~InteractionManager ()
 
void setSimInfo (SimInfo *info)
 
void initialize ()
 
void doPrePair (InteractionData &idat)
 
void doPreForce (SelfData &sdat)
 
void doPair (InteractionData &idat)
 
void doSkipCorrection (InteractionData &idat)
 
void doSelfCorrection (SelfData &sdat)
 
void doSurfaceTerm (RealType &surfacePot)
 
void doReciprocalSpaceSum (RealType &recipPot)
 
void setCutoffRadius (RealType rCut)
 
RealType getSuggestedCutoffRadius (int *atid1)
 
RealType getSuggestedCutoffRadius (AtomType *atype)
 

Private Member Functions

void setupElectrostatics ()
 

Private Attributes

bool initialized_
 
SimInfoinfo_
 
LJlj_
 
GBgb_
 
Stickysticky_
 
EAMeam_
 
SCsc_
 
Morsemorse_
 
Electrostaticelectrostatic_
 
RepulsivePowerrepulsivePower_
 
Miemie_
 
MAWmaw_
 
FluctuatingChargeForcesflucq_
 
map< int, AtomType * > typeMap_
 
vector< vector< set< NonBondedInteraction * > > > interactions_
 
vector< vector< int > > iHash_
 
vector< int > sHash_
 

Detailed Description

InteractionManager is responsible for keeping track of the non-bonded interactions (C++)

Definition at line 70 of file InteractionManager.hpp.

Constructor & Destructor Documentation

◆ InteractionManager()

OpenMD::InteractionManager::InteractionManager ( )

Definition at line 52 of file InteractionManager.cpp.

References eam_, electrostatic_, gb_, initialized_, lj_, maw_, mie_, morse_, repulsivePower_, sc_, and sticky_.

◆ ~InteractionManager()

OpenMD::InteractionManager::~InteractionManager ( )
virtual

Definition at line 68 of file InteractionManager.cpp.

References eam_, electrostatic_, gb_, lj_, maw_, mie_, morse_, repulsivePower_, sc_, and sticky_.

Member Function Documentation

◆ doPair()

◆ doPreForce()

◆ doPrePair()

◆ doReciprocalSpaceSum()

void OpenMD::InteractionManager::doReciprocalSpaceSum ( RealType &  recipPot)

◆ doSelfCorrection()

◆ doSkipCorrection()

void OpenMD::InteractionManager::doSkipCorrection ( InteractionData idat)

◆ doSurfaceTerm()

void OpenMD::InteractionManager::doSurfaceTerm ( RealType &  surfacePot)

◆ getSuggestedCutoffRadius() [1/2]

RealType OpenMD::InteractionManager::getSuggestedCutoffRadius ( int *  atid1)

◆ getSuggestedCutoffRadius() [2/2]

RealType OpenMD::InteractionManager::getSuggestedCutoffRadius ( AtomType atype)

◆ initialize()

void OpenMD::InteractionManager::initialize ( )

Definition at line 81 of file InteractionManager.cpp.

References OpenMD::LJ::addExplicitInteraction(), OpenMD::RepulsivePower::addExplicitInteraction(), OpenMD::Morse::addExplicitInteraction(), OpenMD::Mie::addExplicitInteraction(), OpenMD::MAW::addExplicitInteraction(), eam_, OpenMD::EAM_INTERACTION, electrostatic_, OpenMD::ELECTROSTATIC_INTERACTION, errorStruct::errMsg, gb_, OpenMD::GB_INTERACTION, OpenMD::ForceField::getAtomTypes(), OpenMD::MAWInteractionType::getBeta(), OpenMD::MorseInteractionType::getBeta(), OpenMD::MAWInteractionType::getCA1(), OpenMD::MAWInteractionType::getCB1(), OpenMD::MAWInteractionType::getD(), OpenMD::MorseInteractionType::getD(), OpenMD::LennardJonesInteractionType::getEpsilon(), OpenMD::RepulsivePowerInteractionType::getEpsilon(), OpenMD::MieInteractionType::getEpsilon(), OpenMD::SimInfo::getForceField(), OpenMD::AtomType::getIdent(), OpenMD::MorseInteractionType::getInteractionType(), OpenMD::MieInteractionType::getMatt(), OpenMD::AtomType::getName(), OpenMD::ForceField::getNonBondedInteractionType(), OpenMD::RepulsivePowerInteractionType::getNrep(), OpenMD::MieInteractionType::getNrep(), OpenMD::MAWInteractionType::getR(), OpenMD::MorseInteractionType::getR(), OpenMD::LennardJonesInteractionType::getSigma(), OpenMD::RepulsivePowerInteractionType::getSigma(), OpenMD::MieInteractionType::getSigma(), OpenMD::SimInfo::getSimParams(), OpenMD::SimInfo::getSimulatedAtomTypes(), iHash_, info_, initialized_, interactions_, OpenMD::AtomType::isEAM(), OpenMD::NonBondedInteractionType::isEAMTable(), OpenMD::NonBondedInteractionType::isEAMZhou(), OpenMD::AtomType::isElectrostatic(), errorStruct::isFatal, OpenMD::AtomType::isFluctuatingCharge(), OpenMD::AtomType::isGayBerne(), OpenMD::NonBondedInteractionType::isLennardJones(), OpenMD::AtomType::isLennardJones(), OpenMD::NonBondedInteractionType::isMAW(), OpenMD::NonBondedInteractionType::isMie(), OpenMD::NonBondedInteractionType::isMorse(), OpenMD::NonBondedInteractionType::isRepulsivePower(), OpenMD::NonBondedInteractionType::isSC(), OpenMD::AtomType::isSC(), OpenMD::AtomType::isSticky(), OpenMD::AtomType::isStickyPower(), lj_, OpenMD::LJ_INTERACTION, maw_, OpenMD::MAW_INTERACTION, OpenMD::METALLIC_FAMILY, mie_, OpenMD::MIE_INTERACTION, morse_, OpenMD::MORSE_INTERACTION, OPENMD_ERROR, OPENMD_INFO, painCave, repulsivePower_, OpenMD::REPULSIVEPOWER_INTERACTION, sc_, OpenMD::SC_INTERACTION, OpenMD::EAM::setElectrostatic(), OpenMD::LJ::setForceField(), OpenMD::RepulsivePower::setForceField(), OpenMD::Morse::setForceField(), OpenMD::Mie::setForceField(), OpenMD::MAW::setForceField(), OpenMD::GB::setForceField(), OpenMD::Sticky::setForceField(), OpenMD::EAM::setForceField(), OpenMD::SC::setForceField(), OpenMD::Electrostatic::setForceField(), OpenMD::Electrostatic::setSimInfo(), OpenMD::LJ::setSimulatedAtomTypes(), OpenMD::RepulsivePower::setSimulatedAtomTypes(), OpenMD::Morse::setSimulatedAtomTypes(), OpenMD::Mie::setSimulatedAtomTypes(), OpenMD::MAW::setSimulatedAtomTypes(), OpenMD::GB::setSimulatedAtomTypes(), OpenMD::Sticky::setSimulatedAtomTypes(), OpenMD::SC::setSimulatedAtomTypes(), OpenMD::EAM::setSimulatedAtomTypes(), OpenMD::Electrostatic::setSimulatedAtomTypes(), errorStruct::severity, sHash_, simError(), OpenMD::TypeContainer< ElemType, SIZE >::size(), sticky_, OpenMD::STICKY_INTERACTION, typeMap_, and OpenMD::VANDERWAALS_FAMILY.

Referenced by doPair(), doPreForce(), doPrePair(), doReciprocalSpaceSum(), doSelfCorrection(), doSurfaceTerm(), getSuggestedCutoffRadius(), and OpenMD::ForceManager::initialize().

◆ setCutoffRadius()

void OpenMD::InteractionManager::setCutoffRadius ( RealType  rCut)

◆ setSimInfo()

void OpenMD::InteractionManager::setSimInfo ( SimInfo info)
inline

Definition at line 75 of file InteractionManager.hpp.

Referenced by OpenMD::ForceManager::initialize().

◆ setupElectrostatics()

void OpenMD::InteractionManager::setupElectrostatics ( )
private

Member Data Documentation

◆ eam_

EAM* OpenMD::InteractionManager::eam_
private

◆ electrostatic_

Electrostatic* OpenMD::InteractionManager::electrostatic_
private

◆ flucq_

FluctuatingChargeForces* OpenMD::InteractionManager::flucq_
private

Definition at line 107 of file InteractionManager.hpp.

◆ gb_

GB* OpenMD::InteractionManager::gb_
private

Definition at line 98 of file InteractionManager.hpp.

Referenced by doPair(), initialize(), InteractionManager(), and ~InteractionManager().

◆ iHash_

vector<vector<int> > OpenMD::InteractionManager::iHash_
private

Definition at line 125 of file InteractionManager.hpp.

Referenced by doPair(), doPrePair(), and initialize().

◆ info_

SimInfo* OpenMD::InteractionManager::info_
private

Definition at line 96 of file InteractionManager.hpp.

Referenced by initialize().

◆ initialized_

bool OpenMD::InteractionManager::initialized_
private

◆ interactions_

vector<vector<set<NonBondedInteraction*> > > OpenMD::InteractionManager::interactions_
private

Each pair of atom types can have multiple interactions, so the natural data structures are a map between the pair, and a set of non-bonded interactions:

map<pair<AtomType*, AtomType*>, set<NonBondedInteraction*> > interactions_;

Pair creation turns out to be inefficient, and map searching isn't necessary. Instead of AtomType* sort keys, we now use the AtomType idents (atids) which are ints to access the vector locations. iHash_ contains largely the same information as interactions_, but in a way that doesn't require a set iterator inside the main pair loop.

Definition at line 124 of file InteractionManager.hpp.

Referenced by getSuggestedCutoffRadius(), and initialize().

◆ lj_

LJ* OpenMD::InteractionManager::lj_
private

Definition at line 97 of file InteractionManager.hpp.

Referenced by doPair(), initialize(), InteractionManager(), and ~InteractionManager().

◆ maw_

MAW* OpenMD::InteractionManager::maw_
private

◆ mie_

Mie* OpenMD::InteractionManager::mie_
private

◆ morse_

Morse* OpenMD::InteractionManager::morse_
private

◆ repulsivePower_

RepulsivePower* OpenMD::InteractionManager::repulsivePower_
private

◆ sc_

SC* OpenMD::InteractionManager::sc_
private

◆ sHash_

vector<int> OpenMD::InteractionManager::sHash_
private

Definition at line 128 of file InteractionManager.hpp.

Referenced by doPreForce(), doSelfCorrection(), and initialize().

◆ sticky_

Sticky* OpenMD::InteractionManager::sticky_
private

Definition at line 99 of file InteractionManager.hpp.

Referenced by doPair(), initialize(), InteractionManager(), and ~InteractionManager().

◆ typeMap_

map<int, AtomType*> OpenMD::InteractionManager::typeMap_
private

Definition at line 109 of file InteractionManager.hpp.

Referenced by getSuggestedCutoffRadius(), and initialize().


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