29 #ifndef CDPL_FORCEFIELD_MMFF94DEFAULTSTRETCHBENDPARAMETERTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94DEFAULTSTRETCHBENDPARAMETERTABLE_HPP
35 #include <unordered_map>
39 #include <boost/iterator/transform_iterator.hpp>
65 typedef std::unordered_map<std::uint32_t, Entry> DataStorage;
71 typedef std::shared_ptr<MMFF94DefaultStretchBendParameterTable>
SharedPointer;
93 Entry(
unsigned int term_atom1_pte_row,
unsigned int ctr_atom_pte_row,
94 unsigned int term_atom2_pte_row,
double ijk_force_const,
double kji_force_const);
133 unsigned int termAtom1PTERow;
134 unsigned int ctrAtomPTERow;
135 unsigned int termAtom2PTERow;
136 double ijkForceConst;
137 double kjiForceConst;
144 typedef boost::transform_iterator<std::function<
const Entry&(
const DataStorage::value_type&)>,
145 DataStorage::const_iterator>
151 typedef boost::transform_iterator<std::function<
Entry&(DataStorage::value_type&)>,
152 DataStorage::iterator>
168 void addEntry(
unsigned int term_atom1_pte_row,
unsigned int ctr_atom_pte_row,
169 unsigned int term_atom2_pte_row,
double ijk_force_const,
double kji_force_const);
178 const Entry&
getEntry(
unsigned int term_atom1_pte_row,
unsigned int ctr_atom_pte_row,
179 unsigned int term_atom2_pte_row)
const;
199 bool removeEntry(
unsigned int term_atom1_pte_row,
unsigned int ctr_atom_pte_row,
200 unsigned int term_atom2_pte_row);
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: MMFF94DefaultStretchBendParameterTable.hpp:77
double getKJIForceConstant() const
Returns the KJI stretch-bend force constant.
Entry(unsigned int term_atom1_pte_row, unsigned int ctr_atom_pte_row, unsigned int term_atom2_pte_row, double ijk_force_const, double kji_force_const)
Constructs an Entry instance storing the given query and parameter values.
unsigned int getTerminalAtom2PTERow() const
Returns the PTE row of the second terminal atom.
unsigned int getTerminalAtom1PTERow() const
Returns the PTE row of the first terminal atom.
unsigned int getCenterAtomPTERow() const
Returns the PTE row of the center atom.
Entry()
Constructs an empty (uninitialized) Entry instance.
double getIJKForceConstant() const
Returns the IJK stretch-bend force constant.
Data structure for the storage and lookup of MMFF94 stretch-bend interaction fallback parameters.
Definition: MMFF94DefaultStretchBendParameterTable.hpp:59
std::size_t getNumEntries() const
Returns the number of entries in the table.
ConstEntryIterator end() const
Returns a constant iterator pointing one past the last entry (alias of getEntriesEnd()).
static void set(const SharedPointer &table)
Replaces the process-wide default table by table.
const Entry & getEntry(unsigned int term_atom1_pte_row, unsigned int ctr_atom_pte_row, unsigned int term_atom2_pte_row) const
Returns a reference to the entry matching the specified query values.
void loadDefaults()
Loads the built-in default MMFF94 stretch-bend fallback parameter entries.
EntryIterator begin()
Returns a mutable iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
void clear()
Removes all entries from the table.
void load(std::istream &is)
Loads table entries from the input stream is.
void addEntry(unsigned int term_atom1_pte_row, unsigned int ctr_atom_pte_row, unsigned int term_atom2_pte_row, double ijk_force_const, double kji_force_const)
Adds a new (or overwrites an existing) entry for the given query and parameter values.
MMFF94DefaultStretchBendParameterTable()
Constructs an empty MMFF94DefaultStretchBendParameterTable instance.
std::shared_ptr< MMFF94DefaultStretchBendParameterTable > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94DefaultStretchBendParameter...
Definition: MMFF94DefaultStretchBendParameterTable.hpp:71
ConstEntryIterator getEntriesEnd() const
Returns a constant iterator pointing one past the last entry.
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).
EntryIterator end()
Returns a mutable iterator pointing one past the last entry (alias of getEntriesEnd()).
bool removeEntry(unsigned int term_atom1_pte_row, unsigned int ctr_atom_pte_row, unsigned int term_atom2_pte_row)
Removes the entry matching the specified query values.
EntryIterator getEntriesEnd()
Returns a mutable iterator pointing one past the last entry.
EntryIterator removeEntry(const EntryIterator &it)
Removes the entry pointed to by the iterator it.
EntryIterator getEntriesBegin()
Returns a mutable iterator pointing to the beginning of the entry list.
ConstEntryIterator getEntriesBegin() const
Returns a constant 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: MMFF94DefaultStretchBendParameterTable.hpp:146
boost::transform_iterator< std::function< Entry &(DataStorage::value_type &)>, DataStorage::iterator > EntryIterator
A mutable iterator over the entries of the table.
Definition: MMFF94DefaultStretchBendParameterTable.hpp:153
The namespace of the Chemical Data Processing Library.