Chemical Data Processing Library C++ API - Version 1.4.0
Chem/MolecularGraphFunctions.hpp
Go to the documentation of this file.
1 /*
2  * MolecularGraphFunctions.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_CHEM_MOLECULARGRAPHFUNCTIONS_HPP
30 #define CDPL_CHEM_MOLECULARGRAPHFUNCTIONS_HPP
31 
32 #include <string>
33 #include <cstddef>
34 #include <cstdint>
35 #include <ctime>
36 
37 #include "CDPL/Chem/APIPrefix.hpp"
38 #include "CDPL/Chem/Fragment.hpp"
47 #include "CDPL/Math/Matrix.hpp"
48 #include "CDPL/Math/Vector.hpp"
50 #include "CDPL/Util/BitSet.hpp"
51 
52 
53 namespace CDPL
54 {
55 
56  namespace Chem
57  {
58 
59  class Molecule;
60  class AtomMapping;
61 
67  CDPL_CHEM_API const std::string& getName(const MolecularGraph& molgraph);
68 
74  CDPL_CHEM_API void setName(MolecularGraph& molgraph, const std::string& name);
75 
81 
87  CDPL_CHEM_API bool hasName(const MolecularGraph& molgraph);
88 
89 
95  CDPL_CHEM_API std::time_t getTimestamp(const MolecularGraph& molgraph);
96 
102  CDPL_CHEM_API void setTimestamp(MolecularGraph& molgraph, std::time_t time);
103 
109 
116 
117 
123  CDPL_CHEM_API const std::string& getComment(const MolecularGraph& molgraph);
124 
130  CDPL_CHEM_API void setComment(MolecularGraph& molgraph, const std::string& comment);
131 
137 
143  CDPL_CHEM_API bool hasComment(const MolecularGraph& molgraph);
144 
145 
152 
159 
165 
172 
173 
180 
187 
193 
200 
207 
215 
216 
223 
230 
236 
242  CDPL_CHEM_API bool hasRings(const MolecularGraph& molgraph);
243 
250 
258 
259 
266 
273 
279 
285  CDPL_CHEM_API bool hasSSSR(const MolecularGraph& molgraph);
286 
293 
301 
309 
318  CDPL_CHEM_API FragmentList::SharedPointer extractSSSRSubset(const MolecularGraph& src_molgraph, MolecularGraph& tgt_molgraph, bool overwrite);
319 
320 
327 
334 
340 
347 
354 
362 
363 
370 
377 
383 
390 
397 
405 
406 
413 
420 
426 
433 
444 
452 
453 
459  CDPL_CHEM_API std::size_t getConformationIndex(const MolecularGraph& molgraph);
460 
466  CDPL_CHEM_API void setConformationIndex(MolecularGraph& molgraph, std::size_t index);
467 
473 
480 
481 
487  CDPL_CHEM_API const Util::DArray::SharedPointer& getConformerEnergies(const MolecularGraph& molgraph);
488 
494  CDPL_CHEM_API void setConformerEnergies(MolecularGraph& molgraph, const Util::DArray::SharedPointer& energies);
495 
501 
508 
509 
518  CDPL_CHEM_API void setConformation(MolecularGraph& molgraph, std::size_t conf_idx, const Math::Vector3DArray& coords, double energy);
519 
526  CDPL_CHEM_API void addConformation(MolecularGraph& molgraph, const Math::Vector3DArray& coords, double energy);
527 
535  CDPL_CHEM_API double getConformationEnergy(const MolecularGraph& molgraph, std::size_t conf_idx);
536 
537 
543  CDPL_CHEM_API std::uint64_t getHashCode(const MolecularGraph& molgraph);
544 
550  CDPL_CHEM_API void setHashCode(MolecularGraph& molgraph, std::uint64_t hash_code);
551 
557 
563  CDPL_CHEM_API bool hasHashCode(const MolecularGraph& molgraph);
564 
573  CDPL_CHEM_API std::uint64_t calcHashCode(const MolecularGraph& molgraph, unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
574  unsigned int bond_flags = BondPropertyFlag::DEFAULT, bool ord_h_deplete = true);
575 
576 
582  CDPL_CHEM_API void extractReactionCenter(const MolecularGraph& molgraph, Fragment& rxn_center);
583 
584 
591 
598 
604 
611 
612 
618  CDPL_CHEM_API const std::string& getMDLUserInitials(const MolecularGraph& molgraph);
619 
625  CDPL_CHEM_API void setMDLUserInitials(MolecularGraph& molgraph, const std::string& initials);
626 
632 
639 
640 
646  CDPL_CHEM_API const std::string& getMDLProgramName(const MolecularGraph& molgraph);
647 
653  CDPL_CHEM_API void setMDLProgramName(MolecularGraph& molgraph, const std::string& name);
654 
660 
667 
668 
674  CDPL_CHEM_API std::size_t getMDLRegistryNumber(const MolecularGraph& molgraph);
675 
681  CDPL_CHEM_API void setMDLRegistryNumber(MolecularGraph& molgraph, std::size_t reg_no);
682 
688 
695 
696 
702  CDPL_CHEM_API unsigned int getMDLCTABVersion(const MolecularGraph& molgraph);
703 
709  CDPL_CHEM_API void setMDLCTABVersion(MolecularGraph& molgraph, unsigned int version);
710 
716 
723 
724 
731 
738 
744 
751 
752 
758  CDPL_CHEM_API std::size_t getMDLDimensionality(const MolecularGraph& molgraph);
759 
765  CDPL_CHEM_API void setMDLDimensionality(MolecularGraph& molgraph, std::size_t dim);
766 
772 
779 
780 
787 
793  CDPL_CHEM_API void setMDLScalingFactor1(MolecularGraph& molgraph, long factor);
794 
800 
807 
808 
815 
821  CDPL_CHEM_API void setMDLScalingFactor2(MolecularGraph& molgraph, double factor);
822 
828 
835 
836 
842  CDPL_CHEM_API double getMDLEnergy(const MolecularGraph& molgraph);
843 
849  CDPL_CHEM_API void setMDLEnergy(MolecularGraph& molgraph, double energy);
850 
856 
863 
864 
871 
877  CDPL_CHEM_API void setMDLChiralFlag(MolecularGraph& molgraph, bool flag);
878 
884 
891 
892 
898  CDPL_CHEM_API unsigned int getMOL2MoleculeType(const MolecularGraph& molgraph);
899 
905  CDPL_CHEM_API void setMOL2MoleculeType(MolecularGraph& molgraph, unsigned int type);
906 
912 
919 
920 
926  CDPL_CHEM_API unsigned int getMOL2ChargeType(const MolecularGraph& molgraph);
927 
933  CDPL_CHEM_API void setMOL2ChargeType(MolecularGraph& molgraph, unsigned int type);
934 
940 
947 
948 
958 
968 
978 
989 
1000 
1001 
1007  CDPL_CHEM_API const Math::ULMatrix::SharedPointer& getTopologicalDistanceMatrix(const MolecularGraph& molgraph);
1008 
1014  CDPL_CHEM_API void setTopologicalDistanceMatrix(MolecularGraph& molgraph, const Math::ULMatrix::SharedPointer& mtx);
1015 
1021 
1028 
1035  CDPL_CHEM_API Math::ULMatrix::SharedPointer calcTopologicalDistanceMatrix(MolecularGraph& molgraph, bool overwrite);
1036 
1043 
1052  CDPL_CHEM_API Math::ULMatrix::SharedPointer extractTopologicalDistanceSubMatrix(const MolecularGraph& src_molgraph, MolecularGraph& tgt_molgraph, bool overwrite);
1053 
1062 
1063 
1070 
1077 
1083 
1090 
1098 
1099 
1106 
1113 
1119 
1126 
1133 
1141 
1142 
1149 
1156 
1162 
1169 
1176 
1184 
1185 
1196  CDPL_CHEM_API bool generateSMILES(const MolecularGraph& molgraph, std::string& smiles, bool canonical = false,
1197  bool ord_h_deplete = true, unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
1198  unsigned int bond_flags = BondPropertyFlag::DEFAULT);
1199 
1208  CDPL_CHEM_API int generateINCHI(const MolecularGraph& molgraph, std::string& inchi,
1209  const std::string& options = ControlParameterDefault::INCHI_OUTPUT_OPTIONS,
1210  std::size_t dim = 0);
1211 
1218  CDPL_CHEM_API int generateINCHIKey(const MolecularGraph& molgraph, std::string& inchi_key);
1219 
1229  CDPL_CHEM_API void canonicalize(MolecularGraph& molgraph, const AtomCompareFunction& func, bool atoms = true,
1230  bool atom_nbrs = true, bool bonds = true, bool bond_atoms = false);
1231 
1241  CDPL_CHEM_API void canonicalize(MolecularGraph& molgraph, bool atoms = true, bool atom_nbrs = true,
1242  bool bonds = true, bool bond_atoms = false);
1243 
1249  CDPL_CHEM_API void calc2DCoordinates(MolecularGraph& molgraph, bool overwrite);
1250 
1260  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const AtomContainer& atoms, const Math::Vector2DArray& ref_coords, bool fix_bond_stereo = true);
1261 
1270  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const AtomMapping& ref_atom_mpg, bool fix_bond_stereo = true);
1271 
1281  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const MolecularGraph& ref_molgraph, bool use_mcss, bool fix_bond_stereo = true);
1282 
1292  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const MolecularGraph& ref_molgraph, const MolecularGraph& substr_ptn, bool fix_bond_stereo = true);
1293 
1294 
1300  CDPL_CHEM_API void calcHydrogen3DCoordinates(MolecularGraph& molgraph, bool undef_only = true);
1301 
1307  CDPL_CHEM_API void calcBond2DStereoFlags(MolecularGraph& molgraph, bool overwrite);
1308 
1315  CDPL_CHEM_API void calcCIPPriorities(MolecularGraph& molgraph, bool overwrite);
1316 
1325  CDPL_CHEM_API void perceiveSymmetryClasses(MolecularGraph& molgraph, bool overwrite,
1326  unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
1327  unsigned int bond_flags = BondPropertyFlag::DEFAULT, bool inc_impl_h = true);
1328 
1336  CDPL_CHEM_API void calcCanonicalNumbering(MolecularGraph& molgraph, bool overwrite,
1337  unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
1338  unsigned int bond_flags = BondPropertyFlag::DEFAULT);
1339 
1345  CDPL_CHEM_API void calcMorganNumbering(MolecularGraph& molgraph, bool overwrite);
1346 
1353 
1359  CDPL_CHEM_API void calcFormalCharges(MolecularGraph& molgraph, bool overwrite);
1360 
1367 
1373  CDPL_CHEM_API void perceiveBondOrders(MolecularGraph& molgraph, bool overwrite);
1374 
1380 
1392  CDPL_CHEM_API void perceiveAtomStereoCenters(MolecularGraph& molgraph, bool overwrite, bool check_asym = true,
1393  bool check_inv_n = true, bool check_quart_n = true, bool check_plan_n = true,
1394  bool check_amide_n = true, bool check_res_ctrs = true);
1395 
1405  CDPL_CHEM_API void perceiveBondStereoCenters(MolecularGraph& molgraph, bool overwrite, bool check_asym = true,
1406  bool check_term_n = true, bool check_order = true, std::size_t min_ring_size = 8);
1407 
1413  CDPL_CHEM_API void calcMDLParities(MolecularGraph& molgraph, bool overwrite);
1414 
1423  CDPL_CHEM_API void calcAtomStereoDescriptors(MolecularGraph& molgraph, bool overwrite, std::size_t dim = 1, bool check_stc_flag = true);
1424 
1431 
1440  CDPL_CHEM_API void calcBondStereoDescriptors(MolecularGraph& molgraph, bool overwrite, std::size_t dim = 1,
1441  bool check_stc_flag = true);
1442 
1448  CDPL_CHEM_API void calcAtomCIPConfigurations(MolecularGraph& molgraph, bool overwrite);
1449 
1455  CDPL_CHEM_API void calcBondCIPConfigurations(MolecularGraph& molgraph, bool overwrite);
1456 
1464  bool overwrite);
1465 
1473  bool overwrite);
1474 
1480  CDPL_CHEM_API void generateMatchExpressions(MolecularGraph& molgraph, bool overwrite);
1481 
1488 
1495 
1502 
1508  CDPL_CHEM_API void setAromaticityFlags(MolecularGraph& molgraph, bool overwrite);
1509 
1515  CDPL_CHEM_API void setRingFlags(MolecularGraph& molgraph, bool overwrite);
1516 
1522  CDPL_CHEM_API void setAtomTypesFromSymbols(MolecularGraph& molgraph, bool overwrite);
1523 
1529  CDPL_CHEM_API void setAtomSymbolsFromTypes(MolecularGraph& molgraph, bool overwrite);
1530 
1536  CDPL_CHEM_API void perceiveSybylAtomTypes(MolecularGraph& molgraph, bool overwrite);
1537 
1544 
1551 
1560  CDPL_CHEM_API bool containsMolecularGraph(const MolecularGraph& molgraph, const MolecularGraph& sub_molgraph,
1561  bool atoms = true, bool bonds = true);
1562 
1572  CDPL_CHEM_API void getContainedFragments(const MolecularGraph& molgraph, const FragmentList& frag_list,
1573  FragmentList& cont_frag_list, bool append = false, bool atoms = true,
1574  bool bonds = true);
1575 
1585  CDPL_CHEM_API void getContainingFragments(const MolecularGraph& molgraph, const FragmentList& frag_list,
1586  FragmentList& cont_frag_list, bool append = false, bool atoms = true,
1587  bool bonds = true);
1588 
1597  CDPL_CHEM_API void translateFragment(const MolecularGraph& src_molgraph, const Fragment& src_frag,
1598  const MolecularGraph& tgt_molgraph, Fragment& tgt_frag, bool append = false);
1599 
1608  CDPL_CHEM_API void translateFragments(const MolecularGraph& src_molgraph, const FragmentList& src_frag_list,
1609  const MolecularGraph& tgt_molgraph, FragmentList& tgt_frag_list, bool append = false);
1610 
1620  const Util::BitSet& split_bond_mask, bool append = false);
1621 
1627  CDPL_CHEM_API std::size_t getCompleteBondCount(const MolecularGraph& molgraph);
1628 
1635  CDPL_CHEM_API void calcBasicProperties(MolecularGraph& molgraph, bool overwrite);
1636 
1681  CDPL_CHEM_API std::size_t editSubstructures(const MolecularGraph& molgraph, Molecule& result_mol, const std::string& search_ptns,
1682  const std::string& result_ptn, const std::string& exclude_ptns = std::string());
1683 
1684  } // namespace Chem
1685 } // namespace CDPL
1686 
1687 #endif // CDPL_CHEM_MOLECULARGRAPHFUNCTIONS_HPP
Declaration of type CDPL::Util::BitSet.
Definition of constants in namespace CDPL::Chem::BondPropertyFlag.
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 constants in namespace CDPL::Chem::AtomPropertyFlag.
Definition of constants in namespace CDPL::Chem::ControlParameterDefault.
Definition of class CDPL::Chem::ElectronSystemList.
Definition of class CDPL::Chem::FragmentList.
Definition of class CDPL::Chem::Fragment.
Definition of class CDPL::Chem::MatchConstraintList.
Definition of class CDPL::Chem::MatchExpression.
Definition of matrix data types.
Definition of class CDPL::Chem::StringDataBlockItem and the type CDPL::Chem::StringDataBlock.
Definition of class CDPL::Math::VectorArray.
Definition of vector data types.
Common interface for data structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
Data type for the storage and lookup of arbitrary atom to atom mappings.
Definition: AtomMapping.hpp:54
std::shared_ptr< ElectronSystemList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated ElectronSystemList instances.
Definition: ElectronSystemList.hpp:55
Data structure for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
std::shared_ptr< FragmentList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FragmentList instances.
Definition: FragmentList.hpp:55
Concrete Chem::MolecularGraph implementation that stores references to a selectable subset of atoms a...
Definition: Fragment.hpp:57
std::shared_ptr< Fragment > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Fragment instances.
Definition: Fragment.hpp:66
std::shared_ptr< MatchConstraintList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MatchConstraintList instances.
Definition: MatchConstraintList.hpp:211
Generic boolean expression interface for the implementation of query/target object equivalence tests ...
Definition: MatchExpression.hpp:75
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
Abstract base class representing a mutable molecular graph that owns its atoms and bonds.
Definition: Molecule.hpp:53
std::shared_ptr< StringDataBlock > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated StringDataBlock instances.
Definition: StringDataBlock.hpp:155
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Matrix instances.
Definition: Matrix.hpp:578
constexpr unsigned int DEFAULT
Represents the default set of atom properties.
Definition: Chem/AtomPropertyFlag.hpp:53
constexpr unsigned int DEFAULT
Represents the default set of bond properties.
Definition: BondPropertyFlag.hpp:53
CDPL_CHEM_API const std::string INCHI_OUTPUT_OPTIONS
Default value (= "/WarnOnEmptyStructure /AuxNone /NEWPSOFF") of the control-parameter Chem::ControlPa...
CDPL_CHEM_API void setConformation(AtomContainer &cntnr, std::size_t conf_idx, const Math::Vector3DArray &coords)
Overwrites the conformation at index conf_idx with the supplied 3D coordinates.
CDPL_CHEM_API void setCyclicSubstructure(MolecularGraph &molgraph, const Fragment::SharedPointer &substruct)
Sets the value of the Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property of the molecular gra...
CDPL_CHEM_API void setMOL2MoleculeType(MolecularGraph &molgraph, unsigned int type)
Sets the value of the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property of the molecular grap...
CDPL_CHEM_API void setAtomTypesFromSymbols(MolecularGraph &molgraph, bool overwrite)
Sets the atom types of the molecular graph molgraph from their element symbols.
CDPL_CHEM_API Math::ULMatrix::SharedPointer calcTopologicalDistanceMatrix(MolecularGraph &molgraph, bool overwrite)
Computes and stores the topological distance matrix of the molecular graph molgraph.
CDPL_CHEM_API void calcImplicitHydrogenCounts(MolecularGraph &molgraph, bool overwrite)
Computes and stores implicit hydrogen counts for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void setMDLUserInitials(MolecularGraph &molgraph, const std::string &initials)
Sets the value of the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of the molecular graph...
CDPL_CHEM_API const Fragment::SharedPointer & getAromaticSubstructure(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property of the molecula...
CDPL_CHEM_API bool align2DCoordinates(MolecularGraph &molgraph, const AtomContainer &atoms, const Math::Vector2DArray &ref_coords, bool fix_bond_stereo=true)
Transforms the 2D atom coordinates of molgraph so that the 2D coordinates of atoms are aligned with t...
CDPL_CHEM_API Fragment::SharedPointer perceiveAromaticSubstructure(const MolecularGraph &molgraph)
Perceives the aromatic substructure (union of all aromatic atoms/bonds) of the molecular graph molgra...
CDPL_CHEM_API unsigned int getMOL2ChargeType(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property of the molecular gra...
CDPL_CHEM_API FragmentList::SharedPointer perceiveComponents(const MolecularGraph &molgraph)
Perceives the connected components of the molecular graph molgraph.
CDPL_CHEM_API void calc2DCoordinates(MolecularGraph &molgraph, bool overwrite)
Computes 2D atom coordinates for the molecular graph molgraph and stores them as corresponding atom p...
CDPL_CHEM_API void setStructureData(MolecularGraph &molgraph, const StringDataBlock::SharedPointer &data)
Sets the value of the Chem::MolecularGraphProperty::STRUCTURE_DATA property of the molecular graph mo...
CDPL_CHEM_API bool hasConformerEnergies(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property of the molecular graph mo...
CDPL_CHEM_API void setHashCode(MolecularGraph &molgraph, std::uint64_t hash_code)
Sets the value of the Chem::MolecularGraphProperty::HASH_CODE property of the molecular graph molgrap...
CDPL_CHEM_API int generateINCHIKey(const MolecularGraph &molgraph, std::string &inchi_key)
Generates an InChIKey for the molecular graph molgraph using the InChI C-API.
CDPL_CHEM_API const std::string & getComment(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::COMMENT property of the molecular graph molgra...
CDPL_CHEM_API FragmentList::SharedPointer getAromaticSSSRSubset(const MolecularGraph &molgraph)
Returns the subset of the SSSR of the molecular graph molgraph that contains only aromatic rings,...
CDPL_CHEM_API void calcMorganNumbering(MolecularGraph &molgraph, bool overwrite)
Computes and stores Morgan numbers for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void setAromaticityFlags(MolecularGraph &molgraph, bool overwrite)
Perceives aromaticity and sets the corresponding atom/bond aromaticity flags on the molecular graph m...
CDPL_CHEM_API void calcBondStereoDescriptors(MolecularGraph &molgraph, bool overwrite, std::size_t dim=1, bool check_stc_flag=true)
Computes and stores stereo descriptors for the bonds of the molecular graph molgraph.
CDPL_CHEM_API bool hasAromaticSubstructure(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property of the molecular graph...
CDPL_CHEM_API void clearMatchExpression(Atom &atom)
Clears the value of the Chem::AtomProperty::MATCH_EXPRESSION property of the atom atom.
CDPL_CHEM_API void clearCyclicSubstructure(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property of the molecular g...
CDPL_CHEM_API void setMOL2ChargeType(MolecularGraph &molgraph, unsigned int type)
Sets the value of the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property of the molecular graph ...
CDPL_CHEM_API void calcCanonicalNumbering(MolecularGraph &molgraph, bool overwrite, unsigned int atom_flags=AtomPropertyFlag::DEFAULT, unsigned int bond_flags=BondPropertyFlag::DEFAULT)
Computes and stores canonical atom numbers for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void getContainingFragments(const Atom &atom, const FragmentList &frag_list, FragmentList &cont_frag_list, bool append=false)
Collects the fragments in frag_list that contain the atom atom into cont_frag_list.
CDPL_CHEM_API bool hasTimestamp(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::TIMESTAMP property of the molecular graph molgraph is...
std::function< bool(const Atom &, const Atom &)> AtomCompareFunction
Generic wrapper class used to store a user-defined atom compare function.
Definition: AtomCompareFunction.hpp:41
CDPL_CHEM_API void setTimestamp(MolecularGraph &molgraph, std::time_t time)
Sets the value of the Chem::MolecularGraphProperty::TIMESTAMP property of the molecular graph molgrap...
CDPL_CHEM_API std::size_t getConformationIndex(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::CONFORMATION_INDEX property of the molecular g...
CDPL_CHEM_API bool hasMDLUserInitials(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of the molecular graph mol...
CDPL_CHEM_API bool hasMDLCTABVersion(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property of the molecular graph molg...
CDPL_CHEM_API bool hasMDLChiralFlag(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property of the molecular graph molgr...
CDPL_CHEM_API void clearHashCode(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::HASH_CODE property of the molecular graph molgr...
CDPL_CHEM_API void calcAtomStereoDescriptors(MolecularGraph &molgraph, bool overwrite, std::size_t dim=1, bool check_stc_flag=true)
Computes and stores stereo descriptors for the atoms of the molecular graph molgraph.
CDPL_CHEM_API bool hasSSSR(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::SSSR property of the molecular graph molgraph is set.
CDPL_CHEM_API void initSubstructureSearchQuery(MolecularGraph &molgraph, bool overwrite)
Prepares the molecular graph molgraph for use as a substructure search query.
CDPL_CHEM_API void clearMOL2ChargeType(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property of the molecular grap...
CDPL_CHEM_API void setSSSR(MolecularGraph &molgraph, const FragmentList::SharedPointer &sssr)
Sets the value of the Chem::MolecularGraphProperty::SSSR property of the molecular graph molgraph to ...
CDPL_CHEM_API const MatchConstraintList::SharedPointer & getMatchConstraints(const Atom &atom)
Returns the value of the Chem::AtomProperty::MATCH_CONSTRAINTS property of the atom atom.
CDPL_CHEM_API void generateMatchExpressions(MolecularGraph &molgraph, bool overwrite)
Generates and stores match expressions for every atom, bond and the molecular graph molgraph itself.
CDPL_CHEM_API bool hasRings(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::RINGS property of the molecular graph molgraph is set...
CDPL_CHEM_API void addConformation(AtomContainer &cntnr, const Math::Vector3DArray &coords)
Appends a new conformation built from the supplied 3D coordinates to the atoms of cntnr.
CDPL_CHEM_API bool hasName(const Atom &atom)
Tells whether the Chem::AtomProperty::NAME property of the atom atom is set.
CDPL_CHEM_API const std::string & getMDLUserInitials(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of the molecular gr...
CDPL_CHEM_API void clearMDLRegistryNumber(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of the molecular g...
CDPL_CHEM_API void setAtomSymbolsFromTypes(MolecularGraph &molgraph, bool overwrite)
Sets the atom symbols of the molecular graph molgraph from their atom types.
CDPL_CHEM_API void generateIncidenceMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the atom/bond incidence matrix of the molecular graph molgraph.
CDPL_CHEM_API double getMDLEnergy(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_ENERGY property of the molecular graph mol...
CDPL_CHEM_API bool hasMDLEnergy(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_ENERGY property of the molecular graph molgraph i...
CDPL_CHEM_API void setComponents(MolecularGraph &molgraph, const FragmentList::SharedPointer &comps)
Sets the value of the Chem::MolecularGraphProperty::COMPONENTS property of the molecular graph molgra...
CDPL_CHEM_API const std::string & getName(const Atom &atom)
Returns the value of the Chem::AtomProperty::NAME property of the atom atom.
CDPL_CHEM_API const FragmentList::SharedPointer & getSSSR(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::SSSR property of the molecular graph molgraph.
CDPL_CHEM_API void setMDLChiralFlag(MolecularGraph &molgraph, bool flag)
Sets the value of the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property of the molecular graph m...
CDPL_CHEM_API bool hasConformationIndex(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::CONFORMATION_INDEX property of the molecular graph mo...
CDPL_CHEM_API FragmentList::SharedPointer perceiveRings(const MolecularGraph &molgraph)
Perceives the full set of rings of the molecular graph molgraph.
CDPL_CHEM_API bool hasTopologicalDistanceMatrix(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property of the molecular...
CDPL_CHEM_API void perceiveHybridizationStates(MolecularGraph &molgraph, bool overwrite)
Computes and stores hybridization states for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void clearMOL2MoleculeType(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property of the molecular gr...
CDPL_CHEM_API void clearConformationIndex(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::CONFORMATION_INDEX property of the molecular gr...
CDPL_CHEM_API void clearGeometricalDistanceMatrix(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property of the mol...
CDPL_CHEM_API int generateINCHI(const MolecularGraph &molgraph, std::string &inchi, const std::string &options=ControlParameterDefault::INCHI_OUTPUT_OPTIONS, std::size_t dim=0)
Generates an InChI string for the molecular graph molgraph using the InChI C-API.
CDPL_CHEM_API void clearMDLChiralFlag(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property of the molecular graph...
CDPL_CHEM_API void setMatchExpression(Atom &atom, const MatchExpression< Atom, MolecularGraph >::SharedPointer &expr)
Sets the value of the Chem::AtomProperty::MATCH_EXPRESSION property of the atom atom to expr.
CDPL_CHEM_API void clearStructureData(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::STRUCTURE_DATA property of the molecular graph ...
CDPL_CHEM_API const StringDataBlock::SharedPointer & getStructureData(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::STRUCTURE_DATA property of the molecular graph...
CDPL_CHEM_API std::size_t editSubstructures(const MolecularGraph &molgraph, Molecule &result_mol, const std::string &search_ptns, const std::string &result_ptn, const std::string &exclude_ptns=std::string())
Builds the molecule result_mol from the molecular graph molgraph by replacing all substructures match...
CDPL_CHEM_API void clearTimestamp(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::TIMESTAMP property of the molecular graph molgr...
CDPL_CHEM_API bool hasMDLRegistryNumber(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of the molecular graph m...
CDPL_CHEM_API void setMDLEnergy(MolecularGraph &molgraph, double energy)
Sets the value of the Chem::MolecularGraphProperty::MDL_ENERGY property of the molecular graph molgra...
CDPL_CHEM_API bool hasMDLScalingFactor2(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property of the molecular graph m...
CDPL_CHEM_API bool hasStoichiometricNumber(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property of the molecular graph...
CDPL_CHEM_API const Util::DArray::SharedPointer & getConformerEnergies(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property of the molecular g...
CDPL_CHEM_API FragmentList::SharedPointer perceiveSSSR(const MolecularGraph &molgraph)
Perceives the SSSR of the molecular graph molgraph.
CDPL_CHEM_API void clearTopologicalDistanceMatrix(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property of the mol...
CDPL_CHEM_API MatchExpression< Atom, MolecularGraph >::SharedPointer generateMatchExpression(const Atom &atom, const MolecularGraph &molgraph)
Builds an match expression from the match constraint list attached to the atom atom.
CDPL_CHEM_API const MatchExpression< Atom, MolecularGraph >::SharedPointer & getMatchExpression(const Atom &atom)
Returns the value of the Chem::AtomProperty::MATCH_EXPRESSION property of the atom atom.
CDPL_CHEM_API void setComment(MolecularGraph &molgraph, const std::string &comment)
Sets the value of the Chem::MolecularGraphProperty::COMMENT property of the molecular graph molgraph ...
CDPL_CHEM_API ElectronSystemList::SharedPointer perceivePiElectronSystems(const MolecularGraph &molgraph)
Perceives the π-electron systems of the molecular graph molgraph.
CDPL_CHEM_API void clearComponents(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::COMPONENTS property of the molecular graph molg...
CDPL_CHEM_API void perceiveBondOrders(MolecularGraph &molgraph, bool overwrite)
Perceives bond orders for the bonds of the molecular graph molgraph.
CDPL_CHEM_API void setGeometricalDistanceMatrix(MolecularGraph &molgraph, const Math::DMatrix::SharedPointer &mtx)
Sets the value of the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property of the molec...
CDPL_CHEM_API void clearRings(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::RINGS property of the molecular graph molgraph.
CDPL_CHEM_API bool hasMOL2ChargeType(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property of the molecular graph molg...
CDPL_CHEM_API void setMDLScalingFactor1(MolecularGraph &molgraph, long factor)
Sets the value of the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property of the molecular gra...
CDPL_CHEM_API const Math::DMatrix::SharedPointer & getGeometricalDistanceMatrix(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property of the mo...
CDPL_CHEM_API unsigned int getMOL2MoleculeType(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property of the molecular g...
CDPL_CHEM_API void setStoichiometricNumber(MolecularGraph &molgraph, double num)
Sets the value of the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property of the molecular g...
CDPL_CHEM_API std::size_t getMDLDimensionality(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property of the molecular g...
CDPL_CHEM_API void setRingFlags(MolecularGraph &molgraph, bool overwrite)
Perceives ring membership and sets the corresponding atom/bond ring flags on the molecular graph molg...
CDPL_CHEM_API void setAromaticSubstructure(MolecularGraph &molgraph, const Fragment::SharedPointer &substruct)
Sets the value of the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property of the molecular g...
CDPL_CHEM_API Fragment::SharedPointer perceiveCyclicSubstructure(const MolecularGraph &molgraph)
Perceives the cyclic substructure (union of all rings) of the molecular graph molgraph.
CDPL_CHEM_API bool containsMolecularGraph(const MolecularGraph &molgraph, const MolecularGraph &sub_molgraph, bool atoms=true, bool bonds=true)
Tells whether the molecular graph molgraph contains the atoms and/or bonds of sub_molgraph.
CDPL_CHEM_API void setComponentGroups(MolecularGraph &molgraph, const FragmentList::SharedPointer &comp_groups)
Sets the value of the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of the molecular graph ...
CDPL_CHEM_API void clearMDLProgramName(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of the molecular grap...
CDPL_CHEM_API void clearMDLCTABVersion(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property of the molecular grap...
CDPL_CHEM_API FragmentList::SharedPointer getAromaticRings(const MolecularGraph &molgraph)
Returns the subset of the aromatic rings of the molecular graph molgraph.
CDPL_CHEM_API void generateBondMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the bond order matrix of the molecular graph molgraph.
CDPL_CHEM_API void extractReactionCenter(const MolecularGraph &molgraph, Fragment &rxn_center)
Collects every atom and bond of the molecular graph molgraph that carries a reaction-center flag into...
CDPL_CHEM_API const FragmentList::SharedPointer & getComponentGroups(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of the molecular gra...
CDPL_CHEM_API long getMDLScalingFactor1(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property of the molecular ...
CDPL_CHEM_API void setMDLCTABVersion(MolecularGraph &molgraph, unsigned int version)
Sets the value of the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property of the molecular graph ...
CDPL_CHEM_API void initSubstructureSearchTarget(MolecularGraph &molgraph, bool overwrite)
Prepares the molecular graph molgraph for use as a substructure search target.
CDPL_CHEM_API FragmentList::SharedPointer perceiveComponentGroups(const MolecularGraph &molgraph)
Perceives the component groups of the molecular graph molgraph.
CDPL_CHEM_API void generateMatchExpressionStrings(MolecularGraph &molgraph, bool overwrite)
Generates and stores textual representations of the atom/bond match expressions of the molecular grap...
CDPL_CHEM_API void setMDLDimensionality(MolecularGraph &molgraph, std::size_t dim)
Sets the value of the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property of the molecular grap...
CDPL_CHEM_API void getContainedFragments(const MolecularGraph &molgraph, const FragmentList &frag_list, FragmentList &cont_frag_list, bool append=false, bool atoms=true, bool bonds=true)
Collects the fragments in frag_list that are fully contained in the molecular graph molgraph into con...
CDPL_CHEM_API void clearConformerEnergies(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property of the molecular gr...
CDPL_CHEM_API void calcBond2DStereoFlags(MolecularGraph &molgraph, bool overwrite)
Derives 2D wedge/hash bond stereo flags for the bonds of the molecular graph molgraph from the atoms'...
CDPL_CHEM_API void setMatchConstraints(Atom &atom, const MatchConstraintList::SharedPointer &constr)
Sets the value of the Chem::AtomProperty::MATCH_CONSTRAINTS property of the atom atom to constr.
CDPL_CHEM_API std::size_t getCompleteBondCount(const MolecularGraph &molgraph)
Returns the number of bonds of the molecular graph molgraph whose connected atoms are likewise contai...
CDPL_CHEM_API bool hasMOL2MoleculeType(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property of the molecular graph mo...
CDPL_CHEM_API void clearMDLEnergy(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_ENERGY property of the molecular graph molg...
CDPL_CHEM_API const FragmentList::SharedPointer & getComponents(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::COMPONENTS property of the molecular graph mol...
CDPL_CHEM_API double getStoichiometricNumber(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property of the molecula...
CDPL_CHEM_API std::uint64_t getHashCode(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::HASH_CODE property of the molecular graph molg...
CDPL_CHEM_API void calcHydrogen3DCoordinates(MolecularGraph &molgraph, bool undef_only=true)
Computes 3D coordinates for the hydrogen atoms of the molecular graph molgraph from the 3D coordinate...
CDPL_CHEM_API std::time_t getTimestamp(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::TIMESTAMP property of the molecular graph molg...
CDPL_CHEM_API std::uint64_t calcHashCode(const MolecularGraph &molgraph, unsigned int atom_flags=AtomPropertyFlag::DEFAULT, unsigned int bond_flags=BondPropertyFlag::DEFAULT, bool ord_h_deplete=true)
Computes a 64-bit hash code for the molecular graph molgraph taking into account the specified atom a...
CDPL_CHEM_API void setTopologicalDistanceMatrix(MolecularGraph &molgraph, const Math::ULMatrix::SharedPointer &mtx)
Sets the value of the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property of the molec...
CDPL_CHEM_API void generateBondElectronMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the bond-electron matrix of the molecular graph molgraph.
CDPL_CHEM_API double getConformationEnergy(const MolecularGraph &molgraph, std::size_t conf_idx)
Returns the energy of the conformation at index conf_idx.
CDPL_CHEM_API Math::ULMatrix::SharedPointer extractTopologicalDistanceSubMatrix(const MolecularGraph &src_molgraph, MolecularGraph &tgt_molgraph, bool overwrite)
Extracts the topological distance sub-matrix of the molecular graph src_molgraph that covers the atom...
CDPL_CHEM_API void canonicalize(MolecularGraph &molgraph, const AtomCompareFunction &func, bool atoms=true, bool atom_nbrs=true, bool bonds=true, bool bond_atoms=false)
Reorders the atoms (and optionally their neighbors and bonds) of the molecular graph molgraph accordi...
CDPL_CHEM_API void perceiveBondStereoCenters(MolecularGraph &molgraph, bool overwrite, bool check_asym=true, bool check_term_n=true, bool check_order=true, std::size_t min_ring_size=8)
Flags the bonds of the molecular graph molgraph that qualify as stereo centers under the supplied cri...
CDPL_CHEM_API bool hasMatchExpression(const Atom &atom)
Tells whether the Chem::AtomProperty::MATCH_EXPRESSION property of the atom atom is set.
CDPL_CHEM_API void calcAtomCIPConfigurations(MolecularGraph &molgraph, bool overwrite)
Computes and stores CIP configuration labels for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void setConformerEnergies(MolecularGraph &molgraph, const Util::DArray::SharedPointer &energies)
Sets the value of the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property of the molecular grap...
CDPL_CHEM_API void clearComment(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::COMMENT property of the molecular graph molgrap...
CDPL_CHEM_API void clearComponentGroups(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of the molecular grap...
CDPL_CHEM_API unsigned int getMDLCTABVersion(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property of the molecular gra...
CDPL_CHEM_API bool hasStructureData(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::STRUCTURE_DATA property of the molecular graph molgra...
CDPL_CHEM_API void perceiveSybylAtomTypes(MolecularGraph &molgraph, bool overwrite)
Perceives and assigns Sybyl MOL2 atom types for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void setConformationIndex(MolecularGraph &molgraph, std::size_t index)
Sets the value of the Chem::MolecularGraphProperty::CONFORMATION_INDEX property of the molecular grap...
CDPL_CHEM_API bool hasComponents(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::COMPONENTS property of the molecular graph molgraph i...
CDPL_CHEM_API bool hasMDLScalingFactor1(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property of the molecular graph m...
CDPL_CHEM_API void kekulizeBonds(MolecularGraph &molgraph)
Assigns Kekulé bond orders to the aromatic bonds of the molecular graph molgraph.
CDPL_CHEM_API void clearAromaticSubstructure(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property of the molecular...
CDPL_CHEM_API bool hasHashCode(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::HASH_CODE property of the molecular graph molgraph is...
CDPL_CHEM_API const ElectronSystemList::SharedPointer & getPiElectronSystems(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property of the molecular ...
CDPL_CHEM_API const std::string & getMDLProgramName(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of the molecular gra...
CDPL_CHEM_API void clearName(Atom &atom)
Clears the value of the Chem::AtomProperty::NAME property of the atom atom.
CDPL_CHEM_API void calcAtomStereoDescriptorsFromMDLParities(MolecularGraph &molgraph, bool overwrite)
Derives atom stereo descriptors of the molecular graph molgraph from previously-assigned MDL parities...
CDPL_CHEM_API bool hasComponentGroups(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of the molecular graph molg...
CDPL_CHEM_API bool hasCyclicSubstructure(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property of the molecular graph m...
CDPL_CHEM_API void translateFragments(const MolecularGraph &src_molgraph, const FragmentList &src_frag_list, const MolecularGraph &tgt_molgraph, FragmentList &tgt_frag_list, bool append=false)
Translates every fragment in src_frag_list to the corresponding fragments on tgt_molgraph.
CDPL_CHEM_API void setAtomMatchConstraints(MolecularGraph &molgraph, const MatchConstraintList::SharedPointer &constr, bool overwrite)
Sets the match constraint list constr on every atom of the molecular graph molgraph.
CDPL_CHEM_API void calcCIPPriorities(MolecularGraph &molgraph, bool overwrite)
Computes and stores topological CIP priorities for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void clearMDLScalingFactor1(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property of the molecular g...
CDPL_CHEM_API void calcMDLParities(MolecularGraph &molgraph, bool overwrite)
Computes and stores MDL parities for the atoms of the molecular graph molgraph.
CDPL_CHEM_API void clearPiElectronSystems(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property of the molecular g...
CDPL_CHEM_API void setMDLRegistryNumber(MolecularGraph &molgraph, std::size_t reg_no)
Sets the value of the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of the molecular gra...
CDPL_CHEM_API const FragmentList::SharedPointer & getRings(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::RINGS property of the molecular graph molgraph...
CDPL_CHEM_API std::size_t getMDLRegistryNumber(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of the molecular ...
CDPL_CHEM_API void clearMatchConstraints(Atom &atom)
Clears the value of the Chem::AtomProperty::MATCH_CONSTRAINTS property of the atom atom.
CDPL_CHEM_API void clearMDLUserInitials(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of the molecular gra...
CDPL_CHEM_API void setMDLScalingFactor2(MolecularGraph &molgraph, double factor)
Sets the value of the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property of the molecular gra...
CDPL_CHEM_API double getMDLScalingFactor2(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property of the molecular ...
CDPL_CHEM_API void generateAdjacencyMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the adjacency matrix of the molecular graph molgraph.
CDPL_CHEM_API bool hasMatchConstraints(const Atom &atom)
Tells whether the Chem::AtomProperty::MATCH_CONSTRAINTS property of the atom atom is set.
CDPL_CHEM_API void calcBasicProperties(MolecularGraph &molgraph, bool overwrite)
Computes basic atom/bond/molecular graph properties (aromaticity, SSSR, etc.) of the molecular graph ...
CDPL_CHEM_API void perceiveAtomStereoCenters(MolecularGraph &molgraph, bool overwrite, bool check_asym=true, bool check_inv_n=true, bool check_quart_n=true, bool check_plan_n=true, bool check_amide_n=true, bool check_res_ctrs=true)
Flags the atoms of the molecular graph molgraph that qualify as stereo centers under the supplied cri...
CDPL_CHEM_API void calcGeometricalDistanceMatrix(const Entity3DContainer &cntnr, Math::DMatrix &mtx)
Calculates the inter-entity geometric distance matrix for the entities of cntnr.
CDPL_CHEM_API void translateFragment(const MolecularGraph &src_molgraph, const Fragment &src_frag, const MolecularGraph &tgt_molgraph, Fragment &tgt_frag, bool append=false)
Translates the atoms/bonds of src_frag to the corresponding atoms/bonds of tgt_molgraph and stores th...
CDPL_CHEM_API void setRings(MolecularGraph &molgraph, const FragmentList::SharedPointer &rings)
Sets the value of the Chem::MolecularGraphProperty::RINGS property of the molecular graph molgraph to...
CDPL_CHEM_API bool hasMDLDimensionality(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property of the molecular graph mo...
CDPL_CHEM_API void clearStoichiometricNumber(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property of the molecular...
CDPL_CHEM_API FragmentList::SharedPointer extractSSSRSubset(const MolecularGraph &src_molgraph, const MolecularGraph &tgt_molgraph)
Extracts the SSSR subset of the molecular graph src_molgraph whose rings consist of atoms and bonds o...
CDPL_CHEM_API void calcBondCIPConfigurations(MolecularGraph &molgraph, bool overwrite)
Computes and stores CIP configuration labels for the bonds of the molecular graph molgraph.
CDPL_CHEM_API void clearMDLScalingFactor2(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property of the molecular g...
CDPL_CHEM_API void perceiveSymmetryClasses(MolecularGraph &molgraph, bool overwrite, unsigned int atom_flags=AtomPropertyFlag::DEFAULT, unsigned int bond_flags=BondPropertyFlag::DEFAULT, bool inc_impl_h=true)
Computes and stores topological symmetry classes for the atoms of the molecular graph molgraph.
CDPL_CHEM_API bool hasGeometricalDistanceMatrix(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property of the molecular...
CDPL_CHEM_API bool hasComment(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::COMMENT property of the molecular graph molgraph is s...
CDPL_CHEM_API void clearSSSR(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::SSSR property of the molecular graph molgraph.
CDPL_CHEM_API void setMDLProgramName(MolecularGraph &molgraph, const std::string &name)
Sets the value of the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of the molecular graph ...
CDPL_CHEM_API void splitIntoFragments(const MolecularGraph &molgraph, FragmentList &frag_list, const Util::BitSet &split_bond_mask, bool append=false)
Splits the molecular graph molgraph into connected fragments by removing the bonds flagged in split_b...
CDPL_CHEM_API const Fragment::SharedPointer & getCyclicSubstructure(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property of the molecular ...
CDPL_CHEM_API void setPiElectronSystems(MolecularGraph &molgraph, const ElectronSystemList::SharedPointer &pi_systems)
Sets the value of the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property of the molecular gra...
CDPL_CHEM_API void setBondMatchConstraints(MolecularGraph &molgraph, const MatchConstraintList::SharedPointer &constr, bool overwrite)
Sets the match constraint list constr on every bond of the molecular graph molgraph.
CDPL_CHEM_API bool hasPiElectronSystems(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property of the molecular graph m...
CDPL_CHEM_API bool generateSMILES(const MolecularGraph &molgraph, std::string &smiles, bool canonical=false, bool ord_h_deplete=true, unsigned int atom_flags=AtomPropertyFlag::DEFAULT, unsigned int bond_flags=BondPropertyFlag::DEFAULT)
Generates a SMILES string for the molecular graph molgraph.
CDPL_CHEM_API bool getMDLChiralFlag(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property of the molecular grap...
CDPL_CHEM_API void calcFormalCharges(MolecularGraph &molgraph, bool overwrite)
Computes and stores formal charges for the atoms of the molecular graph molgraph.
CDPL_CHEM_API const Math::ULMatrix::SharedPointer & getTopologicalDistanceMatrix(const MolecularGraph &molgraph)
Returns the value of the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property of the mo...
CDPL_CHEM_API void generateBondAtomTypeMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds a matrix combining bond order and atom type information of the endpoints of every bond in molg...
CDPL_CHEM_API void clearMDLDimensionality(MolecularGraph &molgraph)
Clears the value of the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property of the molecular gr...
CDPL_CHEM_API bool hasMDLProgramName(const MolecularGraph &molgraph)
Tells whether the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of the molecular graph molg...
CDPL_CHEM_API void setName(Atom &atom, const std::string &name)
Sets the value of the Chem::AtomProperty::NAME property of the atom atom to name.
SparseMatrix< unsigned long > SparseULMatrix
Unbounded sparse matrix holding unsigned integers of type unsigned long.
Definition: Matrix.hpp:3559
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:87
Matrix< unsigned long > ULMatrix
Unbounded dense matrix holding unsigned integers of type unsigned long.
Definition: Matrix.hpp:3479
VectorArray< Vector2D > Vector2DArray
Array storing vectors of type Math::Vector2D.
Definition: VectorArray.hpp:82
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.