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

#include <EAM.hpp>

Inheritance diagram for OpenMD::EAM:
OpenMD::MetallicInteraction OpenMD::NonBondedInteraction

Public Member Functions

 EAM ()
 
void setForceField (ForceField *ff)
 
void setElectrostatic (Electrostatic *el)
 
void setSimulatedAtomTypes (set< AtomType *> &simtypes)
 
void addType (AtomType *atomType)
 
void addExplicitInteraction (AtomType *atype1, AtomType *atype2, RealType dr, int nr, std::vector< RealType > phiAB)
 
void addExplicitInteraction (AtomType *atype1, AtomType *atype2, RealType re, RealType alpha, RealType beta, RealType A, RealType B, RealType kappa, RealType lambda)
 
RealType fastPower (RealType x, int y)
 
RealType ZhouPhi (RealType r, RealType re, RealType A, RealType B, RealType alpha, RealType beta, RealType kappa, RealType lambda)
 
RealType ZhouRho (RealType r, RealType re, RealType fe, RealType beta, RealType lambda)
 
RealType Zhou2001Functional (RealType rho, RealType rhoe, std::vector< RealType > Fn, std::vector< RealType > F, RealType Fe, RealType eta)
 
RealType Zhou2004Functional (RealType rho, RealType rhoe, RealType rhos, std::vector< RealType > Fn, std::vector< RealType > F, RealType Fe, RealType eta, RealType rhol, RealType rhoh)
 
RealType Zhou2005Functional (RealType rho, RealType rhoe, RealType rhos, std::vector< RealType > Fn, std::vector< RealType > F, RealType F3plus, RealType F3minus, RealType Fe, RealType eta)
 
RealType Zhou2005OxygenFunctional (RealType rho, std::vector< RealType > OrhoLimits, std::vector< RealType > OrhoE, std::vector< std::vector< RealType > > OF)
 
void calcDensity (InteractionData &idat)
 
void calcFunctional (SelfData &sdat)
 
void calcForce (InteractionData &idat)
 
virtual string getName ()
 
virtual int getHash ()
 
virtual RealType getSuggestedCutoffRadius (pair< AtomType *, AtomType *> atypes)
 
void setCutoffRadius (RealType rCut)
 
- Public Member Functions inherited from OpenMD::MetallicInteraction
 MetallicInteraction ()
 
virtual ~MetallicInteraction ()
 
virtual InteractionFamily getFamily ()
 
- Public Member Functions inherited from OpenMD::NonBondedInteraction
 NonBondedInteraction ()
 
virtual ~NonBondedInteraction ()
 

Private Member Functions

void initialize ()
 
CubicSplinegetPhi (AtomType *atomType1, AtomType *atomType2)
 

Private Attributes

bool initialized_
 
bool haveCutoffRadius_
 
set< int > EAMtypes
 
vector< int > EAMtids
 
vector< EAMAtomDataEAMdata
 
vector< vector< EAMInteractionData > > MixingMap
 
int nEAM_
 
ForceFieldforceField_
 
Electrostaticelectrostatic_
 
set< AtomType * > simTypes_
 
RealType pre11_
 
RealType eamRcut_
 
Vector3d rhat
 
EAMMixingMethod mixMeth_
 
string name_
 

Detailed Description

Definition at line 76 of file EAM.hpp.

Constructor & Destructor Documentation

◆ EAM()

OpenMD::EAM::EAM ( )

Definition at line 54 of file EAM.cpp.

Member Function Documentation

◆ addExplicitInteraction() [1/2]

void OpenMD::EAM::addExplicitInteraction ( AtomType atype1,
AtomType atype2,
RealType  dr,
int  nr,
std::vector< RealType >  phiAB 
)

◆ addExplicitInteraction() [2/2]

void OpenMD::EAM::addExplicitInteraction ( AtomType atype1,
AtomType atype2,
RealType  re,
RealType  alpha,
RealType  beta,
RealType  A,
RealType  B,
RealType  kappa,
RealType  lambda 
)

◆ addType()

void OpenMD::EAM::addType ( AtomType atomType)

Definition at line 463 of file EAM.cpp.

References OpenMD::CubicSpline::addPoints(), EAMdata, OpenMD::eamFuncfl, EAMtids, EAMtypes, OpenMD::eamUnknown, OpenMD::eamZhou2001, OpenMD::eamZhou2004, OpenMD::eamZhou2005, OpenMD::eamZhou2005Oxygen, errorStruct::errMsg, OpenMD::EAMInteractionData::explicitlySet, OpenMD::EAMAtomData::F, forceField_, OpenMD::EAMAdapter::get_fe(), OpenMD::ForceField::getAtomType(), OpenMD::EAMAdapter::getBeta(), OpenMD::EAMAdapter::getEAMType(), OpenMD::EAMAdapter::getEta(), OpenMD::EAMAdapter::getF(), OpenMD::EAMAdapter::getF3minus(), OpenMD::EAMAdapter::getF3plus(), OpenMD::EAMAdapter::getFe(), OpenMD::EAMAdapter::getFn(), OpenMD::EAMAdapter::getFSpline(), OpenMD::EAMAdapter::getGamma(), OpenMD::AtomType::getIdent(), OpenMD::EAMAdapter::getLambda(), OpenMD::EAMAdapter::getLatticeConstant(), OpenMD::CubicSpline::getLimits(), OpenMD::AtomType::getName(), OpenMD::EAMAdapter::getNu(), OpenMD::FluctuatingChargeAdapter::getNValence(), OpenMD::EAMAdapter::getOF(), OpenMD::EAMAdapter::getOrhoE(), OpenMD::EAMAdapter::getOrhoLimits(), getPhi(), OpenMD::EAMAdapter::getRcut(), OpenMD::EAMAdapter::getRe(), OpenMD::EAMAdapter::getRhoe(), OpenMD::EAMAdapter::getRhoh(), OpenMD::EAMAdapter::getRhol(), OpenMD::EAMAdapter::getRhos(), OpenMD::EAMAdapter::getRhoSpline(), OpenMD::EAMAdapter::getZSpline(), errorStruct::isFatal, OpenMD::EAMAtomData::isFluctuatingCharge, OpenMD::FluctuatingChargeAdapter::isFluctuatingCharge(), OpenMD::FluctuatingChargeAdapter::isMetallic(), MixingMap, nEAM_, OpenMD::EAMAtomData::nValence, OPENMD_ERROR, OPENMD_INFO, painCave, OpenMD::EAMInteractionData::phi, OpenMD::EAMAtomData::rcut, OpenMD::EAMInteractionData::rcut, OpenMD::EAMAtomData::rho, errorStruct::severity, simError(), OpenMD::EAMAtomData::Z, Zhou2001Functional(), Zhou2004Functional(), Zhou2005Functional(), Zhou2005OxygenFunctional(), and ZhouRho().

Referenced by initialize().

◆ calcDensity()

◆ calcForce()

void OpenMD::EAM::calcForce ( InteractionData idat)
virtual

Implements OpenMD::NonBondedInteraction.

Definition at line 830 of file EAM.cpp.

References OpenMD::InteractionData::atid1, OpenMD::InteractionData::atid2, OpenMD::InteractionData::d, OpenMD::InteractionData::dfrho1, OpenMD::InteractionData::dfrho2, OpenMD::InteractionData::doElectricField, OpenMD::InteractionData::doParticlePot, OpenMD::InteractionData::dVdFQ1, OpenMD::InteractionData::dVdFQ2, EAMdata, OpenMD::eamDaw, OpenMD::eamJohnson, eamRcut_, EAMtids, OpenMD::eamUnknownMix, OpenMD::InteractionData::eField1, OpenMD::InteractionData::eField2, electrostatic_, errorStruct::errMsg, OpenMD::EAMAtomData::F, OpenMD::InteractionData::f1, OpenMD::InteractionData::flucQ1, OpenMD::InteractionData::flucQ2, OpenMD::InteractionData::frho1, OpenMD::InteractionData::frho2, OpenMD::Electrostatic::getFieldFunction(), OpenMD::CubicSpline::getValueAndDerivativeAt(), OpenMD::CubicSpline::getValueAt(), haveCutoffRadius_, initialize(), initialized_, errorStruct::isFatal, OpenMD::EAMAtomData::isFluctuatingCharge, OpenMD::InteractionData::isSelected, OpenMD::METALLIC_FAMILY, MixingMap, mixMeth_, OpenMD::EAMAtomData::nValence, OPENMD_ERROR, painCave, OpenMD::InteractionData::particlePot1, OpenMD::InteractionData::particlePot2, OpenMD::InteractionData::pot, OpenMD::EAMAtomData::rcut, rhat, OpenMD::EAMAtomData::rho, OpenMD::InteractionData::rho1, OpenMD::InteractionData::rho2, OpenMD::InteractionData::rij, OpenMD::InteractionData::selePot, errorStruct::severity, simError(), and OpenMD::InteractionData::vpair.

Referenced by OpenMD::InteractionManager::doPair().

◆ calcFunctional()

◆ fastPower()

RealType OpenMD::EAM::fastPower ( RealType  x,
int  y 
)

Definition at line 58 of file EAM.cpp.

Referenced by ZhouPhi(), and ZhouRho().

◆ getHash()

virtual int OpenMD::EAM::getHash ( )
inlinevirtual

Implements OpenMD::NonBondedInteraction.

Definition at line 121 of file EAM.hpp.

References OpenMD::EAM_INTERACTION.

◆ getName()

virtual string OpenMD::EAM::getName ( )
inlinevirtual

Implements OpenMD::NonBondedInteraction.

Definition at line 120 of file EAM.hpp.

◆ getPhi()

◆ getSuggestedCutoffRadius()

RealType OpenMD::EAM::getSuggestedCutoffRadius ( pair< AtomType *, AtomType *>  atypes)
virtual

Implements OpenMD::NonBondedInteraction.

Definition at line 989 of file EAM.cpp.

References EAMdata, EAMtids, initialize(), initialized_, and OpenMD::EAMAtomData::rcut.

◆ initialize()

◆ setCutoffRadius()

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

Definition at line 351 of file EAM.cpp.

References eamRcut_, and haveCutoffRadius_.

Referenced by OpenMD::InteractionManager::setCutoffRadius().

◆ setElectrostatic()

void OpenMD::EAM::setElectrostatic ( Electrostatic el)
inline

Definition at line 80 of file EAM.hpp.

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

◆ setForceField()

void OpenMD::EAM::setForceField ( ForceField ff)
inline

Definition at line 79 of file EAM.hpp.

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

◆ setSimulatedAtomTypes()

void OpenMD::EAM::setSimulatedAtomTypes ( set< AtomType *> &  simtypes)
inline

Definition at line 81 of file EAM.hpp.

References OpenMD::EAMAtomData::F, and OpenMD::EAMAtomData::rho.

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

◆ Zhou2001Functional()

RealType OpenMD::EAM::Zhou2001Functional ( RealType  rho,
RealType  rhoe,
std::vector< RealType >  Fn,
std::vector< RealType >  F,
RealType  Fe,
RealType  eta 
)

Definition at line 87 of file EAM.cpp.

Referenced by addType().

◆ Zhou2004Functional()

RealType OpenMD::EAM::Zhou2004Functional ( RealType  rho,
RealType  rhoe,
RealType  rhos,
std::vector< RealType >  Fn,
std::vector< RealType >  F,
RealType  Fe,
RealType  eta,
RealType  rhol,
RealType  rhoh 
)

Definition at line 108 of file EAM.cpp.

Referenced by addType().

◆ Zhou2005Functional()

RealType OpenMD::EAM::Zhou2005Functional ( RealType  rho,
RealType  rhoe,
RealType  rhos,
std::vector< RealType >  Fn,
std::vector< RealType >  F,
RealType  F3plus,
RealType  F3minus,
RealType  Fe,
RealType  eta 
)

Definition at line 130 of file EAM.cpp.

Referenced by addType().

◆ Zhou2005OxygenFunctional()

RealType OpenMD::EAM::Zhou2005OxygenFunctional ( RealType  rho,
std::vector< RealType >  OrhoLimits,
std::vector< RealType >  OrhoE,
std::vector< std::vector< RealType > >  OF 
)

Definition at line 155 of file EAM.cpp.

Referenced by addType().

◆ ZhouPhi()

RealType OpenMD::EAM::ZhouPhi ( RealType  r,
RealType  re,
RealType  A,
RealType  B,
RealType  alpha,
RealType  beta,
RealType  kappa,
RealType  lambda 
)

Definition at line 73 of file EAM.cpp.

References fastPower().

Referenced by addExplicitInteraction(), and getPhi().

◆ ZhouRho()

RealType OpenMD::EAM::ZhouRho ( RealType  r,
RealType  re,
RealType  fe,
RealType  beta,
RealType  lambda 
)

Definition at line 82 of file EAM.cpp.

References fastPower().

Referenced by addType().

Member Data Documentation

◆ EAMdata

vector<EAMAtomData> OpenMD::EAM::EAMdata
private

The EAM atomic data indexed by EAM type ident

Definition at line 133 of file EAM.hpp.

Referenced by addType(), calcDensity(), calcForce(), calcFunctional(), getPhi(), getSuggestedCutoffRadius(), and initialize().

◆ eamRcut_

RealType OpenMD::EAM::eamRcut_
private

Definition at line 141 of file EAM.hpp.

Referenced by calcDensity(), calcForce(), and setCutoffRadius().

◆ EAMtids

vector<int> OpenMD::EAM::EAMtids
private

The mapping from AtomType ident -> EAM type ident

Definition at line 132 of file EAM.hpp.

Referenced by addExplicitInteraction(), addType(), calcDensity(), calcForce(), calcFunctional(), getPhi(), getSuggestedCutoffRadius(), and initialize().

◆ EAMtypes

set<int> OpenMD::EAM::EAMtypes
private

The set of AtomType idents that are EAM types

Definition at line 131 of file EAM.hpp.

Referenced by addExplicitInteraction(), addType(), and initialize().

◆ electrostatic_

Electrostatic* OpenMD::EAM::electrostatic_
private

Definition at line 138 of file EAM.hpp.

Referenced by calcForce().

◆ forceField_

ForceField* OpenMD::EAM::forceField_
private

Definition at line 137 of file EAM.hpp.

Referenced by addType(), and initialize().

◆ haveCutoffRadius_

bool OpenMD::EAM::haveCutoffRadius_
private

Definition at line 130 of file EAM.hpp.

Referenced by calcDensity(), calcForce(), and setCutoffRadius().

◆ initialized_

bool OpenMD::EAM::initialized_
private

Definition at line 129 of file EAM.hpp.

Referenced by calcDensity(), calcForce(), calcFunctional(), getSuggestedCutoffRadius(), and initialize().

◆ MixingMap

vector<vector<EAMInteractionData> > OpenMD::EAM::MixingMap
private

The mixing parameters between two EAM types

Definition at line 134 of file EAM.hpp.

Referenced by addExplicitInteraction(), addType(), calcForce(), and initialize().

◆ mixMeth_

EAMMixingMethod OpenMD::EAM::mixMeth_
private

Definition at line 144 of file EAM.hpp.

Referenced by calcForce(), getPhi(), and initialize().

◆ name_

string OpenMD::EAM::name_
private

Definition at line 145 of file EAM.hpp.

◆ nEAM_

int OpenMD::EAM::nEAM_
private

Definition at line 135 of file EAM.hpp.

Referenced by addExplicitInteraction(), addType(), and initialize().

◆ pre11_

RealType OpenMD::EAM::pre11_
private

Definition at line 140 of file EAM.hpp.

Referenced by getPhi().

◆ rhat

Vector3d OpenMD::EAM::rhat
private

Definition at line 142 of file EAM.hpp.

Referenced by calcForce().

◆ simTypes_

set<AtomType*> OpenMD::EAM::simTypes_
private

Definition at line 139 of file EAM.hpp.

Referenced by initialize().


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