OpenMD 3.2
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::ForceField Class Reference

Public Types

using AtomTypeContainer = TypeContainer<AtomType, 1>
using BondTypeContainer = TypeContainer<BondType, 2>
using BendTypeContainer = TypeContainer<BendType, 3>
using TorsionTypeContainer = TypeContainer<TorsionType, 4>
using InversionTypeContainer = TypeContainer<InversionType, 4>
using NonBondedInteractionTypeContainer

Public Member Functions

 ForceField (std::string ffName)
std::string getForceFieldFileName ()
void setForceFieldFileName (const std::string &filename)
virtual void parse (const std::string &filename)
AtomTypegetAtomType (const std::string &at)
 getAtomType by string
AtomTypegetAtomType (int ident)
 getAtomType by ident
BondTypegetBondType (const std::string &at1, const std::string &at2)
BendTypegetBendType (const std::string &at1, const std::string &at2, const std::string &at3)
TorsionTypegetTorsionType (const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4)
InversionTypegetInversionType (const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4)
NonBondedInteractionTypegetNonBondedInteractionType (const std::string &at1, const std::string &at2)
BondTypegetExactBondType (const std::string &at1, const std::string &at2)
BendTypegetExactBendType (const std::string &at1, const std::string &at2, const std::string &at3)
TorsionTypegetExactTorsionType (const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4)
InversionTypegetExactInversionType (const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4)
NonBondedInteractionTypegetExactNonBondedInteractionType (const std::string &at1, const std::string &at2)
virtual RealType getRcutFromAtomType (AtomType *at)
std::string getWildCard ()
void setWildCard (const std::string &wildCard)
size_t getNAtomType ()
AtomTypeContainer * getAtomTypes ()
NonBondedInteractionTypeContainer * getNonBondedInteractionTypes ()
bool addAtomType (const std::string &at, AtomType *atomType)
bool replaceAtomType (const std::string &at, AtomType *atomType)
bool addBondType (const std::string &at1, const std::string &at2, BondType *bondType)
bool addBendType (const std::string &at1, const std::string &at2, const std::string &at3, BendType *bendType)
bool addTorsionType (const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4, TorsionType *torsionType)
bool addInversionType (const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4, InversionType *inversionType)
bool addNonBondedInteractionType (const std::string &at1, const std::string &at2, NonBondedInteractionType *nbiType)
ifstrstreamopenForceFieldFile (const std::string &filename)
ForceFieldOptionsgetForceFieldOptions ()

Protected Attributes

AtomTypeContainer atomTypeCont_
BondTypeContainer bondTypeCont_
BendTypeContainer bendTypeCont_
TorsionTypeContainer torsionTypeCont_
InversionTypeContainer inversionTypeCont_
NonBondedInteractionTypeContainer nonBondedInteractionTypeCont_
ForceFieldOptions forceFieldOptions_
std::map< int, std::string > atypeIdentToName
SectionParserManager spMan_

Detailed Description

Definition at line 77 of file ForceField.hpp.

Member Typedef Documentation

◆ AtomTypeContainer

using OpenMD::ForceField::AtomTypeContainer = TypeContainer<AtomType, 1>

Definition at line 79 of file ForceField.hpp.

◆ BendTypeContainer

using OpenMD::ForceField::BendTypeContainer = TypeContainer<BendType, 3>

Definition at line 81 of file ForceField.hpp.

◆ BondTypeContainer

using OpenMD::ForceField::BondTypeContainer = TypeContainer<BondType, 2>

Definition at line 80 of file ForceField.hpp.

◆ InversionTypeContainer

using OpenMD::ForceField::InversionTypeContainer = TypeContainer<InversionType, 4>

Definition at line 83 of file ForceField.hpp.

◆ NonBondedInteractionTypeContainer

using OpenMD::ForceField::NonBondedInteractionTypeContainer

◆ TorsionTypeContainer

using OpenMD::ForceField::TorsionTypeContainer = TypeContainer<TorsionType, 4>

Definition at line 82 of file ForceField.hpp.

Constructor & Destructor Documentation

◆ ForceField()

OpenMD::ForceField::ForceField ( std::string ffName)

The order of adding section parsers is important.

OptionSectionParser must come first to set options for other parsers

DirectionalAtomTypesSectionParser should be added before AtomTypesSectionParser, and these two section parsers will actually create "real" AtomTypes (AtomTypesSectionParser will create AtomType and DirectionalAtomTypesSectionParser will create DirectionalAtomType, which is a subclass of AtomType and should come first).

Other AtomTypes Section Parsers will not create the "real" AtomType, they only add and set some attributes of the AtomType (via the Adapters). Thus ordering of these is not important. AtomTypesSectionParser should be added before other atom type

The order of BondTypesSectionParser, BendTypesSectionParser and TorsionTypesSectionParser, etc. are not important.

Definition at line 90 of file ForceField.cpp.

Member Function Documentation

◆ addAtomType()

bool OpenMD::ForceField::addAtomType ( const std::string & at,
AtomType * atomType )

Definition at line 751 of file ForceField.cpp.

◆ addBendType()

bool OpenMD::ForceField::addBendType ( const std::string & at1,
const std::string & at2,
const std::string & at3,
BendType * bendType )

Definition at line 773 of file ForceField.cpp.

◆ addBondType()

bool OpenMD::ForceField::addBondType ( const std::string & at1,
const std::string & at2,
BondType * bondType )

Definition at line 765 of file ForceField.cpp.

◆ addInversionType()

bool OpenMD::ForceField::addInversionType ( const std::string & at1,
const std::string & at2,
const std::string & at3,
const std::string & at4,
InversionType * inversionType )

Definition at line 795 of file ForceField.cpp.

◆ addNonBondedInteractionType()

bool OpenMD::ForceField::addNonBondedInteractionType ( const std::string & at1,
const std::string & at2,
NonBondedInteractionType * nbiType )

Definition at line 808 of file ForceField.cpp.

◆ addTorsionType()

bool OpenMD::ForceField::addTorsionType ( const std::string & at1,
const std::string & at2,
const std::string & at3,
const std::string & at4,
TorsionType * torsionType )

Definition at line 782 of file ForceField.cpp.

◆ getAtomType() [1/2]

AtomType * OpenMD::ForceField::getAtomType ( const std::string & at)

getAtomType by string

finds the requested atom type in this force field using the string name of the atom type.

Definition at line 186 of file ForceField.cpp.

Referenced by OpenMD::MoleculeCreator::createAtom(), getAtomType(), and OpenMD::SelectionManager::getSelectedAtomTypes().

◆ getAtomType() [2/2]

AtomType * OpenMD::ForceField::getAtomType ( int ident)

getAtomType by ident

finds the requested atom type in this force field using the integer ident instead of the string name of the atom type.

Definition at line 198 of file ForceField.cpp.

References getAtomType().

◆ getAtomTypes()

AtomTypeContainer * OpenMD::ForceField::getAtomTypes ( )
inline

Definition at line 140 of file ForceField.hpp.

◆ getBendType()

BendType * OpenMD::ForceField::getBendType ( const std::string & at1,
const std::string & at2,
const std::string & at3 )

Definition at line 271 of file ForceField.cpp.

◆ getBondType()

BondType * OpenMD::ForceField::getBondType ( const std::string & at1,
const std::string & at2 )

Definition at line 203 of file ForceField.cpp.

◆ getExactBendType()

BendType * OpenMD::ForceField::getExactBendType ( const std::string & at1,
const std::string & at2,
const std::string & at3 )

Definition at line 709 of file ForceField.cpp.

◆ getExactBondType()

BondType * OpenMD::ForceField::getExactBondType ( const std::string & at1,
const std::string & at2 )

Definition at line 701 of file ForceField.cpp.

◆ getExactInversionType()

InversionType * OpenMD::ForceField::getExactInversionType ( const std::string & at1,
const std::string & at2,
const std::string & at3,
const std::string & at4 )

Definition at line 731 of file ForceField.cpp.

◆ getExactNonBondedInteractionType()

NonBondedInteractionType * OpenMD::ForceField::getExactNonBondedInteractionType ( const std::string & at1,
const std::string & at2 )

Definition at line 743 of file ForceField.cpp.

◆ getExactTorsionType()

TorsionType * OpenMD::ForceField::getExactTorsionType ( const std::string & at1,
const std::string & at2,
const std::string & at3,
const std::string & at4 )

Definition at line 719 of file ForceField.cpp.

◆ getForceFieldFileName()

std::string OpenMD::ForceField::getForceFieldFileName ( )
inline

Definition at line 91 of file ForceField.hpp.

◆ getForceFieldOptions()

ForceFieldOptions & OpenMD::ForceField::getForceFieldOptions ( )
inline

Definition at line 170 of file ForceField.hpp.

◆ getInversionType()

InversionType * OpenMD::ForceField::getInversionType ( const std::string & at1,
const std::string & at2,
const std::string & at3,
const std::string & at4 )

Definition at line 490 of file ForceField.cpp.

◆ getNAtomType()

size_t OpenMD::ForceField::getNAtomType ( )
inline

Definition at line 138 of file ForceField.hpp.

◆ getNonBondedInteractionType()

NonBondedInteractionType * OpenMD::ForceField::getNonBondedInteractionType ( const std::string & at1,
const std::string & at2 )

Definition at line 632 of file ForceField.cpp.

◆ getNonBondedInteractionTypes()

NonBondedInteractionTypeContainer * OpenMD::ForceField::getNonBondedInteractionTypes ( )
inline

Definition at line 142 of file ForceField.hpp.

◆ getRcutFromAtomType()

RealType OpenMD::ForceField::getRcutFromAtomType ( AtomType * at)
virtual

Definition at line 817 of file ForceField.cpp.

◆ getTorsionType()

TorsionType * OpenMD::ForceField::getTorsionType ( const std::string & at1,
const std::string & at2,
const std::string & at3,
const std::string & at4 )

Definition at line 351 of file ForceField.cpp.

◆ getWildCard()

std::string OpenMD::ForceField::getWildCard ( )
inline

Definition at line 132 of file ForceField.hpp.

◆ openForceFieldFile()

ifstrstream * OpenMD::ForceField::openForceFieldFile ( const std::string & filename)

Definition at line 848 of file ForceField.cpp.

◆ parse()

void OpenMD::ForceField::parse ( const std::string & filename)
virtual

Definition at line 154 of file ForceField.cpp.

◆ replaceAtomType()

bool OpenMD::ForceField::replaceAtomType ( const std::string & at,
AtomType * atomType )

Definition at line 758 of file ForceField.cpp.

◆ setForceFieldFileName()

void OpenMD::ForceField::setForceFieldFileName ( const std::string & filename)
inline

Definition at line 93 of file ForceField.hpp.

◆ setWildCard()

void OpenMD::ForceField::setWildCard ( const std::string & wildCard)
inline

Definition at line 134 of file ForceField.hpp.

Member Data Documentation

◆ atomTypeCont_

AtomTypeContainer OpenMD::ForceField::atomTypeCont_
protected

Definition at line 173 of file ForceField.hpp.

◆ atypeIdentToName

std::map<int, std::string> OpenMD::ForceField::atypeIdentToName
protected

Definition at line 180 of file ForceField.hpp.

◆ bendTypeCont_

BendTypeContainer OpenMD::ForceField::bendTypeCont_
protected

Definition at line 175 of file ForceField.hpp.

◆ bondTypeCont_

BondTypeContainer OpenMD::ForceField::bondTypeCont_
protected

Definition at line 174 of file ForceField.hpp.

◆ forceFieldOptions_

ForceFieldOptions OpenMD::ForceField::forceFieldOptions_
protected

Definition at line 179 of file ForceField.hpp.

◆ inversionTypeCont_

InversionTypeContainer OpenMD::ForceField::inversionTypeCont_
protected

Definition at line 177 of file ForceField.hpp.

◆ nonBondedInteractionTypeCont_

NonBondedInteractionTypeContainer OpenMD::ForceField::nonBondedInteractionTypeCont_
protected

Definition at line 178 of file ForceField.hpp.

◆ spMan_

SectionParserManager OpenMD::ForceField::spMan_
protected

Definition at line 181 of file ForceField.hpp.

◆ torsionTypeCont_

TorsionTypeContainer OpenMD::ForceField::torsionTypeCont_
protected

Definition at line 176 of file ForceField.hpp.


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