29 #ifndef CDPL_FORCEFIELD_MMFF94STRETCHBENDPARAMETERTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94STRETCHBENDPARAMETERTABLE_HPP
35 #include <unordered_map>
39 #include <boost/iterator/transform_iterator.hpp>
64 typedef std::unordered_map<std::uint32_t, Entry> DataStorage;
91 Entry(
unsigned int sb_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
92 unsigned int term_atom2_type,
double ijk_force_const,
double kji_force_const);
137 unsigned int sbTypeIdx;
138 unsigned int termAtom1Type;
139 unsigned int ctrAtomType;
140 unsigned int termAtom2Type;
141 double ijkForceConst;
142 double kjiForceConst;
147 typedef boost::transform_iterator<std::function<
const Entry&(
const DataStorage::value_type&)>,
148 DataStorage::const_iterator>
152 typedef boost::transform_iterator<std::function<
Entry&(DataStorage::value_type&)>,
153 DataStorage::iterator>
170 void addEntry(
unsigned int sb_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
171 unsigned int term_atom2_type,
double ijk_force_const,
double kji_force_const);
181 const Entry&
getEntry(
unsigned int sb_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
182 unsigned int term_atom2_type)
const;
203 bool removeEntry(
unsigned int sb_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
204 unsigned int term_atom2_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.
A single stretch-bend coupling parameter record.
Definition: MMFF94StretchBendParameterTable.hpp:74
Entry(unsigned int sb_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, double ijk_force_const, double kji_force_const)
Constructs an Entry for the given (stretch-bend type, terminal-atom 1, center atom,...
unsigned int getCenterAtomType() const
Returns the numeric MMFF94 atom type of the center atom.
unsigned int getTerminalAtom2Type() const
Returns the numeric MMFF94 atom type of the second terminal atom.
unsigned int getStretchBendTypeIndex() const
Returns the MMFF94 stretch-bend type index.
unsigned int getTerminalAtom1Type() const
Returns the numeric MMFF94 atom type of the first terminal atom.
Entry()
Constructs an empty (uninitialized) Entry instance.
double getKJIForceConstant() const
Returns the KJI stretch-bend force constant (couples bond j-k to angle i-j-k).
double getIJKForceConstant() const
Returns the IJK stretch-bend force constant (couples bond i-j to angle i-j-k).
Lookup table mapping (stretch-bend type, terminal-atom-1 type, center-atom type, terminal-atom-2 type...
Definition: MMFF94StretchBendParameterTable.hpp:58
EntryIterator begin()
Returns a mutable 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: MMFF94StretchBendParameterTable.hpp:154
EntryIterator getEntriesEnd()
Returns a mutable iterator pointing one past the last entry.
ConstEntryIterator getEntriesEnd() const
Returns a constant iterator pointing one past the last entry.
void clear()
Removes all entries from the table.
ConstEntryIterator end() const
Returns a constant iterator pointing one past the last entry (alias of getEntriesEnd()).
ConstEntryIterator begin() const
Returns a constant iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
static const SharedPointer & get()
Returns the process-wide default table (lazily initialized on first call).
std::shared_ptr< MMFF94StretchBendParameterTable > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94StretchBendParameterTable i...
Definition: MMFF94StretchBendParameterTable.hpp:68
const Entry & getEntry(unsigned int sb_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type) const
Returns the entry for the given (stretch-bend type, terminal-atom 1, center atom, terminal-atom 2) qu...
MMFF94StretchBendParameterTable()
Constructs an empty MMFF94StretchBendParameterTable instance.
bool removeEntry(unsigned int sb_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type)
Removes the entry for the given (stretch-bend type, terminal-atom 1, center atom, terminal-atom 2) qu...
EntryIterator end()
Returns a mutable iterator pointing one past the last entry (alias of getEntriesEnd()).
void addEntry(unsigned int sb_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, double ijk_force_const, double kji_force_const)
Adds (or overwrites) the entry for the given (stretch-bend type, terminal-atom 1, center atom,...
EntryIterator removeEntry(const EntryIterator &it)
Removes the entry pointed to by the iterator it.
ConstEntryIterator getEntriesBegin() const
Returns a constant iterator pointing to the beginning of the entry list.
void load(std::istream &is)
Loads table entries from the input stream is.
void loadDefaults()
Loads the built-in default stretch-bend parameter entries.
static void set(const SharedPointer &table)
Replaces the process-wide default table by table.
EntryIterator getEntriesBegin()
Returns a mutable iterator pointing to the beginning of the entry list.
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: MMFF94StretchBendParameterTable.hpp:149
std::size_t getNumEntries() const
Returns the number of entries in the table.
The namespace of the Chemical Data Processing Library.