29 #ifndef CDPL_FORCEFIELD_MMFF94PARTIALBONDCHARGEINCREMENTTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94PARTIALBONDCHARGEINCREMENTTABLE_HPP
34 #include <unordered_map>
38 #include <boost/iterator/transform_iterator.hpp>
61 typedef std::unordered_map<unsigned int, Entry> DataStorage;
67 typedef std::shared_ptr<MMFF94PartialBondChargeIncrementTable>
SharedPointer;
87 Entry(
unsigned int atom_type,
double part_bond_chg_inc,
double form_chg_adj_factor);
114 unsigned int atomType;
115 double partChargeIncr;
116 double formChargeAdjFactor;
123 typedef boost::transform_iterator<std::function<
const Entry&(
const DataStorage::value_type&)>,
124 DataStorage::const_iterator>
130 typedef boost::transform_iterator<std::function<
Entry&(DataStorage::value_type&)>,
131 DataStorage::iterator>
145 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.
Data structure for the storage of values associated with a single table entry.
Definition: MMFF94PartialBondChargeIncrementTable.hpp:73
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 instance storing the given values.
unsigned int getAtomType() const
Returns the numeric MMFF94 atom type of the entry.
Entry()
Constructs an empty (uninitialized) Entry instance.
Data structure for the storage and lookup of MMFF94 per-atom partial bond charge increment and formal...
Definition: MMFF94PartialBondChargeIncrementTable.hpp:55
ConstEntryIterator getEntriesBegin() const
Returns a constant iterator pointing to the beginning of the entry list.
void loadDefaults()
Loads the built-in default MMFF94 partial bond charge increment and formal charge adjustment factors.
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 a new (or overwrites an existing) entry for the numeric MMFF94 atom type atom_type that stores t...
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:125
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:67
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:132
The namespace of the Chemical Data Processing Library.