29 #ifndef CDPL_CHEM_BONDORDERCALCULATOR_HPP
30 #define CDPL_CHEM_BONDORDERCALCULATOR_HPP
49 class SubstructureSearch;
54 class AtomBondMapping;
118 typedef std::shared_ptr<MolecularGraph> MolecularGraphPtr;
119 typedef std::shared_ptr<SubstructureSearch> SubstructureSearchPtr;
120 typedef std::vector<const Bond*> BondList;
121 typedef std::vector<const Atom*> AtomList;
122 typedef std::vector<std::size_t> UIntTable;
123 typedef std::vector<Geometry> GeometryTable;
124 typedef std::vector<MolecularGraphPtr> MolecularGraphPtrList;
125 typedef std::vector<std::pair<double, const AtomBondMapping*> > ABMappingList;
127 class AtomMatchExpression;
128 class BondMatchExpression;
130 friend class BondMatchExpression;
144 void assignFragBondOrders(std::size_t depth,
Util::STArray& orders);
146 double calcHybridizationMatchScore();
151 Geometry perceiveInitialGeometry(
const Atom& atom);
152 void fixRingAtomGeometries(
const Fragment& ring);
157 void getNeighborAtoms(
const Atom& atom, AtomList& atom_list,
const Atom* exclude_atom)
const;
158 std::size_t countBondsWithOrder(
const Atom& atom, std::size_t order,
const UIntTable& order_table)
const;
160 template <
typename Pred>
161 void getUndefBondFragment(
const Atom& atom,
bool add_atoms,
const Pred& bond_pred);
163 double calcAvgBondAngle(
const Atom& atom,
const AtomList& nbr_atoms)
const;
164 double calcDihedralAngle(
const Atom& atom1,
const Atom& atom2,
const Atom& atom3,
const Atom& atom4)
const;
167 double calcAvgTorsionAngle(
const Fragment& ring)
const;
169 bool isPlanarPiBond(
const Bond& bond)
const;
175 UIntTable freeAtomValences;
176 GeometryTable atomGeometries;
178 BondList fragBondList;
179 AtomList fragAtomList;
180 AtomList nbrAtomList1;
181 AtomList nbrAtomList2;
182 UIntTable fragBondOrders;
183 UIntTable workingBondOrders;
184 double currOrderAssmentScore;
185 double bestOrderAssmentScore;
186 SubstructureSearchPtr substructSearch;
187 MolecularGraphPtrList funcGroupPatterns;
188 ABMappingList funcGroupMappings;
Definition of class CDPL::Util::Array.
Declaration of type CDPL::Util::BitSet.
Definition of the preprocessor macro CDPL_CHEM_API.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of vector data types.
Data structure for the common storage of related atom to atom and bond to bond mappings.
Definition: AtomBondMapping.hpp:55
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Perceives bond orders of a molecular graph from its 3D structure and atom connectivity.
Definition: BondOrderCalculator.hpp:65
bool undefinedOnly() const
Tells whether or not only undefined bond orders have to be perceived.
BondOrderCalculator(const MolecularGraph &molgraph, Util::STArray &orders, bool undef_only=true)
Constructs the BondOrderCalculator instance and perceives the order of the bonds in the molecular gra...
void undefinedOnly(bool undef_only)
Allows to specify whether already defined bond orders should be left unchanged.
void calculate(const MolecularGraph &molgraph, Util::STArray &orders)
Perceives the order of the bonds in the molecular graph molgraph from its 3D structure and atom conne...
BondOrderCalculator()
Constructs the BondOrderCalculator instance.
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Concrete Chem::MolecularGraph implementation that stores references to a selectable subset of atoms a...
Definition: Fragment.hpp:57
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
constexpr unsigned int LINEAR
Specifies linear geometry.
Definition: CoordinationGeometry.hpp:58
constexpr unsigned int TETRAHEDRAL
Specifies tetrahedral geometry.
Definition: CoordinationGeometry.hpp:68
Array< std::size_t > STArray
Array storing unsigned integers of type std::size_t.
Definition: Array.hpp:575
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.