29 #ifndef CDPL_FORCEFIELD_MMFF94ANGLEBENDINGPARAMETERTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94ANGLEBENDINGPARAMETERTABLE_HPP
35 #include <unordered_map>
39 #include <boost/iterator/transform_iterator.hpp>
60 typedef std::unordered_map<std::uint32_t, Entry> DataStorage;
64 typedef std::shared_ptr<MMFF94AngleBendingParameterTable>
SharedPointer;
87 Entry(
unsigned int angle_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
88 unsigned int term_atom2_type,
double force_const,
double ref_angle);
133 unsigned int angleTypeIdx;
134 unsigned int termAtom1Type;
135 unsigned int ctrAtomType;
136 unsigned int termAtom2Type;
143 typedef boost::transform_iterator<std::function<
const Entry&(
const DataStorage::value_type&)>,
144 DataStorage::const_iterator>
148 typedef boost::transform_iterator<std::function<
Entry&(DataStorage::value_type&)>,
149 DataStorage::iterator>
166 void addEntry(
unsigned int angle_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
167 unsigned int term_atom2_type,
double force_const,
double ref_angle);
177 const Entry&
getEntry(
unsigned int angle_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
178 unsigned int term_atom2_type)
const;
199 bool removeEntry(
unsigned int angle_type_idx,
unsigned int term_atom1_type,
unsigned int ctr_atom_type,
200 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.
Data structure for the storage of values associated with a single parameter table entry.
Definition: MMFF94AngleBendingParameterTable.hpp:70
unsigned int getTerminalAtom2Type() const
Returns the numeric MMFF94 atom type of the second terminal atom.
Entry()
Constructs an empty (uninitialized) parameter entry.
double getReferenceAngle() const
Returns the reference bond angle.
Entry(unsigned int angle_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, double force_const, double ref_angle)
Constructs an entry for the given query and parameter values.
unsigned int getCenterAtomType() const
Returns the numeric MMFF94 atom type of the center atom.
double getForceConstant() const
Returns the angle-bending force constant.
unsigned int getAngleTypeIndex() const
Returns the MMFF94 angle type index.
unsigned int getTerminalAtom1Type() const
Returns the numeric MMFF94 atom type of the first terminal atom.
Data structure for the storage and lookup of MMFF94 angle-bending interaction parameters.
Definition: MMFF94AngleBendingParameterTable.hpp:54
static void set(const SharedPointer &table)
Replaces the process-wide default table by table.
MMFF94AngleBendingParameterTable()
Constructs an empty MMFF94AngleBendingParameterTable instance.
ConstEntryIterator getEntriesEnd() const
Returns a constant iterator pointing one past the last entry.
void addEntry(unsigned int angle_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type, double force_const, double ref_angle)
Adds a new (or overwrites an existing) entry for the given query and parameter values.
const Entry & getEntry(unsigned int angle_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type) const
Returns a reference to the entry matching the specified query values.
void load(std::istream &is)
Loads table entries from the input stream is.
EntryIterator getEntriesBegin()
Returns a mutable iterator pointing to the beginning of the entry list.
void clear()
Removes all entries from the table.
std::size_t getNumEntries() const
Returns the number of entries in the table.
boost::transform_iterator< std::function< Entry &(DataStorage::value_type &)>, DataStorage::iterator > EntryIterator
A mutable iterator over the entries of the table.
Definition: MMFF94AngleBendingParameterTable.hpp:150
EntryIterator begin()
Returns a mutable iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
bool removeEntry(unsigned int angle_type_idx, unsigned int term_atom1_type, unsigned int ctr_atom_type, unsigned int term_atom2_type)
Removes the entry matching the specified query values.
EntryIterator getEntriesEnd()
Returns a mutable iterator pointing one past the last entry.
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: MMFF94AngleBendingParameterTable.hpp:145
ConstEntryIterator begin() const
Returns a constant iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
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()).
static const SharedPointer & get()
Returns the process-wide default table (lazily initialized on first call).
ConstEntryIterator end() const
Returns a constant iterator pointing one past the last entry (alias of getEntriesEnd()).
std::shared_ptr< MMFF94AngleBendingParameterTable > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94AngleBendingParameterTable ...
Definition: MMFF94AngleBendingParameterTable.hpp:64
void loadDefaults()
Loads the built-in default angle-bending parameter entries.
EntryIterator removeEntry(const EntryIterator &it)
Removes the entry pointed to by the iterator it.
The namespace of the Chemical Data Processing Library.