29 #ifndef CDPL_FORCEFIELD_MMFF94PARTIALBONDCHARGEINCREMENTTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94PARTIALBONDCHARGEINCREMENTTABLE_HPP
34 #include <unordered_map>
38 #include <boost/iterator/transform_iterator.hpp>
60 typedef std::unordered_map<unsigned int, Entry> DataStorage;
64 typedef std::shared_ptr<MMFF94PartialBondChargeIncrementTable>
SharedPointer;
84 Entry(
unsigned int atom_type,
double part_bond_chg_inc,
double form_chg_adj_factor);
111 unsigned int atomType;
112 double partChargeIncr;
113 double formChargeAdjFactor;
118 typedef boost::transform_iterator<std::function<
const Entry&(
const DataStorage::value_type&)>,
119 DataStorage::const_iterator>
123 typedef boost::transform_iterator<std::function<
Entry&(DataStorage::value_type&)>,
124 DataStorage::iterator>
138 void addEntry(
unsigned int atom_type,
double part_bond_chg_inc,
double form_chg_adj_factor);
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 partial-bond-charge-increment record.
Definition: MMFF94PartialBondChargeIncrementTable.hpp:70
double getPartialChargeIncrement() const
Returns the partial bond charge increment.
double getFormalChargeAdjustmentFactor() const
Returns the formal-charge adjustment factor.
Entry(unsigned int atom_type, double part_bond_chg_inc, double form_chg_adj_factor)
Constructs an Entry for the numeric MMFF94 atom type atom_type.
unsigned int getAtomType() const
Returns the numeric MMFF94 atom type of the entry.
Entry()
Constructs an empty (uninitialized) Entry instance.
Lookup table mapping numeric MMFF94 atom types to per-atom partial bond charge increments and formal-...
Definition: MMFF94PartialBondChargeIncrementTable.hpp:54
ConstEntryIterator getEntriesBegin() const
Returns a constant iterator pointing to the beginning of the entry list.
void loadDefaults()
Loads the built-in default partial-bond-charge-increment entries.
void clear()
Removes all entries from the table.
EntryIterator getEntriesEnd()
Returns a mutable iterator pointing one past the last entry.
static void set(const SharedPointer &table)
Replaces the process-wide default table by table.
static const SharedPointer & get()
Returns the process-wide default table (lazily initialized on first call).
void addEntry(unsigned int atom_type, double part_bond_chg_inc, double form_chg_adj_factor)
Adds (or overwrites) the entry for the numeric MMFF94 atom type atom_type.
ConstEntryIterator getEntriesEnd() const
Returns a constant 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: MMFF94PartialBondChargeIncrementTable.hpp:120
const Entry & getEntry(unsigned int atom_type) const
Returns the entry for the numeric MMFF94 atom type atom_type.
bool removeEntry(unsigned int atom_type)
Removes the entry for the numeric MMFF94 atom type atom_type.
std::shared_ptr< MMFF94PartialBondChargeIncrementTable > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94PartialBondChargeIncrementT...
Definition: MMFF94PartialBondChargeIncrementTable.hpp:64
EntryIterator end()
Returns a mutable iterator pointing one past the last entry (alias of getEntriesEnd()).
EntryIterator getEntriesBegin()
Returns a mutable iterator pointing to the beginning of the entry list.
std::size_t getNumEntries() const
Returns the number of entries in the table.
MMFF94PartialBondChargeIncrementTable()
Constructs an empty MMFF94PartialBondChargeIncrementTable instance.
EntryIterator begin()
Returns a mutable iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
EntryIterator removeEntry(const EntryIterator &it)
Removes the entry pointed to by the iterator it.
void load(std::istream &is)
Loads table entries from the input stream is.
ConstEntryIterator begin() const
Returns a constant iterator pointing to the beginning of the entry list (alias of getEntriesBegin()).
ConstEntryIterator end() const
Returns a constant iterator pointing one past the last entry (alias of getEntriesEnd()).
boost::transform_iterator< std::function< Entry &(DataStorage::value_type &)>, DataStorage::iterator > EntryIterator
A mutable iterator over the entries of the table.
Definition: MMFF94PartialBondChargeIncrementTable.hpp:125
The namespace of the Chemical Data Processing Library.