29 #ifndef CDPL_FORCEFIELD_MMFF94OUTOFPLANEBENDINGPARAMETERTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94OUTOFPLANEBENDINGPARAMETERTABLE_HPP
35 #include <unordered_map>
39 #include <boost/iterator/transform_iterator.hpp>
61 typedef std::unordered_map<std::uint32_t, Entry> DataStorage;
67 typedef std::shared_ptr<MMFF94OutOfPlaneBendingParameterTable>
SharedPointer;
89 Entry(
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
unsigned int term_atom2_type,
90 unsigned int oop_atom_type,
double force_const);
129 unsigned int termAtom1Type;
130 unsigned int ctrAtomType;
131 unsigned int termAtom2Type;
132 unsigned int oopAtomType;
140 typedef boost::transform_iterator<std::function<
const Entry&(
const DataStorage::value_type&)>,
141 DataStorage::const_iterator>
147 typedef boost::transform_iterator<std::function<
Entry&(DataStorage::value_type&)>,
148 DataStorage::iterator>
164 void addEntry(
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
unsigned int term_atom2_type,
165 unsigned int oop_atom_type,
double force_const);
175 const Entry&
getEntry(
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
unsigned int term_atom2_type,
176 unsigned int oop_atom_type)
const;
197 bool removeEntry(
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
unsigned int term_atom2_type,
198 unsigned int oop_atom_type);
Definition of the preprocessor macro CDPL_FORCEFIELD_API.
#define CDPL_FORCEFIELD_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Data structure for the storage of values associated with a single table entry.
Definition: MMFF94OutOfPlaneBendingParameterTable.hpp:73
unsigned int getCenterAtomType() const
Returns the numeric MMFF94 atom type of the center atom.
unsigned int getOutOfPlaneAtomType() const
Returns the numeric MMFF94 atom type of the out-of-plane atom.
Entry(unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, unsigned int oop_atom_type, double force_const)
Constructs an Entry instance storing the given query values and force constant.
unsigned int getTerminalAtom2Type() const
Returns the numeric MMFF94 atom type of the second terminal atom.
double getForceConstant() const
Returns the out-of-plane bending force constant.
Entry()
Constructs an empty (uninitialized) Entry instance.
unsigned int getTerminalAtom1Type() const
Returns the numeric MMFF94 atom type of the first terminal atom.
Data structure for the storage and lookup of MMFF94 out-of-plane bending interaction force constants.
Definition: MMFF94OutOfPlaneBendingParameterTable.hpp:55
MMFF94OutOfPlaneBendingParameterTable()
Constructs an empty MMFF94OutOfPlaneBendingParameterTable instance.
static void set(const SharedPointer &table, unsigned int param_set)
Replaces the process-wide default table for param_set by table.
void load(std::istream &is)
Loads table entries from the input stream is.
ConstEntryIterator end() const
Returns a constant iterator pointing one past the last entry (alias of getEntriesEnd()).
static const SharedPointer & get(unsigned int param_set)
Returns the process-wide default table for param_set (lazily initialized on first call).
bool removeEntry(unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, unsigned int oop_atom_type)
Removes the entry matching the specified query values.
ConstEntryIterator begin() const
Returns a constant iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
boost::transform_iterator< std::function< Entry &(DataStorage::value_type &)>, DataStorage::iterator > EntryIterator
A mutable iterator over the entries of the table.
Definition: MMFF94OutOfPlaneBendingParameterTable.hpp:149
void clear()
Removes all entries from the table.
boost::transform_iterator< std::function< const Entry &(const DataStorage::value_type &)>, DataStorage::const_iterator > ConstEntryIterator
A constant iterator over the entries of the table.
Definition: MMFF94OutOfPlaneBendingParameterTable.hpp:142
void addEntry(unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, unsigned int oop_atom_type, double force_const)
Adds a new (or overwrites an existing) entry for the given query values and force constant.
ConstEntryIterator getEntriesEnd() const
Returns a constant iterator pointing one past the last entry.
std::size_t getNumEntries() const
Returns the number of entries in the table.
void loadDefaults(unsigned int param_set)
Loads the built-in default out-of-plane bending parameter entries for the specified MMFF94 parameter ...
EntryIterator getEntriesBegin()
Returns a mutable iterator pointing to the beginning of the entry list.
const Entry & getEntry(unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, unsigned int oop_atom_type) const
Returns a reference to the entry matching the specified query values.
EntryIterator getEntriesEnd()
Returns a mutable iterator pointing one past the last entry.
std::shared_ptr< MMFF94OutOfPlaneBendingParameterTable > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94OutOfPlaneBendingParameterT...
Definition: MMFF94OutOfPlaneBendingParameterTable.hpp:67
ConstEntryIterator getEntriesBegin() const
Returns a constant iterator pointing to the beginning of the entry list.
EntryIterator end()
Returns a mutable iterator pointing one past the last entry (alias of getEntriesEnd()).
EntryIterator removeEntry(const EntryIterator &it)
Removes the entry pointed to by the iterator it.
EntryIterator begin()
Returns a mutable iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
The namespace of the Chemical Data Processing Library.