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 
65  CDPL_CHEM_API const std::string& getName(const MolecularGraph& molgraph);
66 
70  CDPL_CHEM_API void setName(MolecularGraph& molgraph, const std::string& name);
71 
75 
79  CDPL_CHEM_API bool hasName(const MolecularGraph& molgraph);
80 
81 
85  CDPL_CHEM_API std::time_t getTimestamp(const MolecularGraph& molgraph);
86 
90  CDPL_CHEM_API void setTimestamp(MolecularGraph& molgraph, std::time_t time);
91 
95 
99  CDPL_CHEM_API bool hasTimestamp(const MolecularGraph& molgraph);
100 
101 
105  CDPL_CHEM_API const std::string& getComment(const MolecularGraph& molgraph);
106 
110  CDPL_CHEM_API void setComment(MolecularGraph& molgraph, const std::string& comment);
111 
115 
119  CDPL_CHEM_API bool hasComment(const MolecularGraph& molgraph);
120 
121 
126 
131 
135 
140 
141 
146 
151 
155 
160 
165 
171 
172 
177 
182 
186 
190  CDPL_CHEM_API bool hasRings(const MolecularGraph& molgraph);
191 
196 
202 
203 
208 
213 
217 
221  CDPL_CHEM_API bool hasSSSR(const MolecularGraph& molgraph);
222 
227 
233 
239 
245  CDPL_CHEM_API FragmentList::SharedPointer extractSSSRSubset(const MolecularGraph& src_molgraph, MolecularGraph& tgt_molgraph, bool overwrite);
246 
247 
252 
257 
261 
266 
271 
277 
278 
283 
288 
292 
297 
302 
308 
309 
314 
319 
323 
328 
333 
339 
340 
344  CDPL_CHEM_API std::size_t getConformationIndex(const MolecularGraph& molgraph);
345 
349  CDPL_CHEM_API void setConformationIndex(MolecularGraph& molgraph, std::size_t index);
350 
354 
359 
360 
364  CDPL_CHEM_API const Util::DArray::SharedPointer& getConformerEnergies(const MolecularGraph& molgraph);
365 
369  CDPL_CHEM_API void setConformerEnergies(MolecularGraph& molgraph, const Util::DArray::SharedPointer& energies);
370 
374 
379 
380 
386  CDPL_CHEM_API void setConformation(MolecularGraph& molgraph, std::size_t conf_idx, const Math::Vector3DArray& coords, double energy);
387 
392  CDPL_CHEM_API void addConformation(MolecularGraph& molgraph, const Math::Vector3DArray& coords, double energy);
393 
398  CDPL_CHEM_API double getConformationEnergy(const MolecularGraph& molgraph, std::size_t conf_idx);
399 
400 
404  CDPL_CHEM_API std::uint64_t getHashCode(const MolecularGraph& molgraph);
405 
409  CDPL_CHEM_API void setHashCode(MolecularGraph& molgraph, std::uint64_t hash_code);
410 
414 
418  CDPL_CHEM_API bool hasHashCode(const MolecularGraph& molgraph);
419 
426  CDPL_CHEM_API std::uint64_t calcHashCode(const MolecularGraph& molgraph, unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
427  unsigned int bond_flags = BondPropertyFlag::DEFAULT, bool ord_h_deplete = true);
428 
429 
433  CDPL_CHEM_API void extractReactionCenter(const MolecularGraph& molgraph, Fragment& rxn_center);
434 
435 
440 
445 
449 
454 
455 
459  CDPL_CHEM_API const std::string& getMDLUserInitials(const MolecularGraph& molgraph);
460 
464  CDPL_CHEM_API void setMDLUserInitials(MolecularGraph& molgraph, const std::string& initials);
465 
469 
474 
475 
479  CDPL_CHEM_API const std::string& getMDLProgramName(const MolecularGraph& molgraph);
480 
484  CDPL_CHEM_API void setMDLProgramName(MolecularGraph& molgraph, const std::string& name);
485 
489 
494 
495 
499  CDPL_CHEM_API std::size_t getMDLRegistryNumber(const MolecularGraph& molgraph);
500 
504  CDPL_CHEM_API void setMDLRegistryNumber(MolecularGraph& molgraph, std::size_t reg_no);
505 
509 
514 
515 
519  CDPL_CHEM_API unsigned int getMDLCTABVersion(const MolecularGraph& molgraph);
520 
524  CDPL_CHEM_API void setMDLCTABVersion(MolecularGraph& molgraph, unsigned int version);
525 
529 
534 
535 
540 
545 
549 
554 
555 
559  CDPL_CHEM_API std::size_t getMDLDimensionality(const MolecularGraph& molgraph);
560 
564  CDPL_CHEM_API void setMDLDimensionality(MolecularGraph& molgraph, std::size_t dim);
565 
569 
574 
575 
580 
584  CDPL_CHEM_API void setMDLScalingFactor1(MolecularGraph& molgraph, long factor);
585 
589 
594 
595 
600 
604  CDPL_CHEM_API void setMDLScalingFactor2(MolecularGraph& molgraph, double factor);
605 
609 
614 
615 
619  CDPL_CHEM_API double getMDLEnergy(const MolecularGraph& molgraph);
620 
624  CDPL_CHEM_API void setMDLEnergy(MolecularGraph& molgraph, double energy);
625 
629 
634 
635 
640 
644  CDPL_CHEM_API void setMDLChiralFlag(MolecularGraph& molgraph, bool flag);
645 
649 
654 
655 
659  CDPL_CHEM_API unsigned int getMOL2MoleculeType(const MolecularGraph& molgraph);
660 
664  CDPL_CHEM_API void setMOL2MoleculeType(MolecularGraph& molgraph, unsigned int type);
665 
669 
674 
675 
679  CDPL_CHEM_API unsigned int getMOL2ChargeType(const MolecularGraph& molgraph);
680 
684  CDPL_CHEM_API void setMOL2ChargeType(MolecularGraph& molgraph, unsigned int type);
685 
689 
694 
695 
700 
705 
710 
715 
720 
721 
725  CDPL_CHEM_API const Math::ULMatrix::SharedPointer& getTopologicalDistanceMatrix(const MolecularGraph& molgraph);
726 
730  CDPL_CHEM_API void setTopologicalDistanceMatrix(MolecularGraph& molgraph, const Math::ULMatrix::SharedPointer& mtx);
731 
735 
740 
745  CDPL_CHEM_API Math::ULMatrix::SharedPointer calcTopologicalDistanceMatrix(MolecularGraph& molgraph, bool overwrite);
746 
751 
757  CDPL_CHEM_API Math::ULMatrix::SharedPointer extractTopologicalDistanceSubMatrix(const MolecularGraph& src_molgraph, MolecularGraph& tgt_molgraph, bool overwrite);
758 
764 
765 
770 
775 
779 
784 
790 
791 
796 
801 
805 
810 
815 
821 
822 
827 
832 
836 
841 
846 
852 
853 
862  CDPL_CHEM_API bool generateSMILES(const MolecularGraph& molgraph, std::string& smiles, bool canonical = false,
863  bool ord_h_deplete = true, unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
864  unsigned int bond_flags = BondPropertyFlag::DEFAULT);
865 
872  CDPL_CHEM_API int generateINCHI(const MolecularGraph& molgraph, std::string& inchi,
873  const std::string& options = ControlParameterDefault::INCHI_OUTPUT_OPTIONS,
874  std::size_t dim = 0);
875 
880  CDPL_CHEM_API int generateINCHIKey(const MolecularGraph& molgraph, std::string& inchi_key);
881 
889  CDPL_CHEM_API void canonicalize(MolecularGraph& molgraph, const AtomCompareFunction& func, bool atoms = true,
890  bool atom_nbrs = true, bool bonds = true, bool bond_atoms = false);
891 
898  CDPL_CHEM_API void canonicalize(MolecularGraph& molgraph, bool atoms = true, bool atom_nbrs = true,
899  bool bonds = true, bool bond_atoms = false);
900 
904  CDPL_CHEM_API void calc2DCoordinates(MolecularGraph& molgraph, bool overwrite);
905 
915  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const AtomContainer& atoms, const Math::Vector2DArray& ref_coords, bool fix_bond_stereo = true);
916 
925  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const AtomMapping& ref_atom_mpg, bool fix_bond_stereo = true);
926 
936  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const MolecularGraph& ref_molgraph, bool use_mcss, bool fix_bond_stereo = true);
937 
947  CDPL_CHEM_API bool align2DCoordinates(MolecularGraph& molgraph, const MolecularGraph& ref_molgraph, const MolecularGraph& substr_ptn, bool fix_bond_stereo = true);
948 
949 
953  CDPL_CHEM_API void calcHydrogen3DCoordinates(MolecularGraph& molgraph, bool undef_only = true);
954 
958  CDPL_CHEM_API void calcBond2DStereoFlags(MolecularGraph& molgraph, bool overwrite);
959 
963  CDPL_CHEM_API void calcCIPPriorities(MolecularGraph& molgraph, bool overwrite);
964 
971  CDPL_CHEM_API void perceiveSymmetryClasses(MolecularGraph& molgraph, bool overwrite,
972  unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
973  unsigned int bond_flags = BondPropertyFlag::DEFAULT, bool inc_impl_h = true);
974 
980  CDPL_CHEM_API void calcCanonicalNumbering(MolecularGraph& molgraph, bool overwrite,
981  unsigned int atom_flags = AtomPropertyFlag::DEFAULT,
982  unsigned int bond_flags = BondPropertyFlag::DEFAULT);
983 
987  CDPL_CHEM_API void calcMorganNumbering(MolecularGraph& molgraph, bool overwrite);
988 
992  CDPL_CHEM_API void calcImplicitHydrogenCounts(MolecularGraph& molgraph, bool overwrite);
993 
997  CDPL_CHEM_API void calcFormalCharges(MolecularGraph& molgraph, bool overwrite);
998 
1003 
1007  CDPL_CHEM_API void perceiveBondOrders(MolecularGraph& molgraph, bool overwrite);
1008 
1012 
1022  CDPL_CHEM_API void perceiveAtomStereoCenters(MolecularGraph& molgraph, bool overwrite, bool check_asym = true,
1023  bool check_inv_n = true, bool check_quart_n = true, bool check_plan_n = true,
1024  bool check_amide_n = true, bool check_res_ctrs = true);
1025 
1033  CDPL_CHEM_API void perceiveBondStereoCenters(MolecularGraph& molgraph, bool overwrite, bool check_asym = true,
1034  bool check_term_n = true, bool check_order = true, std::size_t min_ring_size = 8);
1035 
1039  CDPL_CHEM_API void calcMDLParities(MolecularGraph& molgraph, bool overwrite);
1040 
1046  CDPL_CHEM_API void calcAtomStereoDescriptors(MolecularGraph& molgraph, bool overwrite, std::size_t dim = 1, bool check_stc_flag = true);
1047 
1052 
1058  CDPL_CHEM_API void calcBondStereoDescriptors(MolecularGraph& molgraph, bool overwrite, std::size_t dim = 1,
1059  bool check_stc_flag = true);
1060 
1064  CDPL_CHEM_API void calcAtomCIPConfigurations(MolecularGraph& molgraph, bool overwrite);
1065 
1069  CDPL_CHEM_API void calcBondCIPConfigurations(MolecularGraph& molgraph, bool overwrite);
1070 
1076  bool overwrite);
1077 
1083  bool overwrite);
1084 
1088  CDPL_CHEM_API void generateMatchExpressions(MolecularGraph& molgraph, bool overwrite);
1089 
1094 
1099 
1104 
1108  CDPL_CHEM_API void setAromaticityFlags(MolecularGraph& molgraph, bool overwrite);
1109 
1113  CDPL_CHEM_API void setRingFlags(MolecularGraph& molgraph, bool overwrite);
1114 
1118  CDPL_CHEM_API void setAtomTypesFromSymbols(MolecularGraph& molgraph, bool overwrite);
1119 
1123  CDPL_CHEM_API void setAtomSymbolsFromTypes(MolecularGraph& molgraph, bool overwrite);
1124 
1128  CDPL_CHEM_API void perceiveSybylAtomTypes(MolecularGraph& molgraph, bool overwrite);
1129 
1134 
1139 
1146  CDPL_CHEM_API bool containsMolecularGraph(const MolecularGraph& molgraph, const MolecularGraph& sub_molgraph,
1147  bool atoms = true, bool bonds = true);
1148 
1156  CDPL_CHEM_API void getContainedFragments(const MolecularGraph& molgraph, const FragmentList& frag_list,
1157  FragmentList& cont_frag_list, bool append = false, bool atoms = true,
1158  bool bonds = true);
1159 
1167  CDPL_CHEM_API void getContainingFragments(const MolecularGraph& molgraph, const FragmentList& frag_list,
1168  FragmentList& cont_frag_list, bool append = false, bool atoms = true,
1169  bool bonds = true);
1170 
1177  CDPL_CHEM_API void translateFragment(const MolecularGraph& src_molgraph, const Fragment& src_frag,
1178  const MolecularGraph& tgt_molgraph, Fragment& tgt_frag, bool append = false);
1179 
1186  CDPL_CHEM_API void translateFragments(const MolecularGraph& src_molgraph, const FragmentList& src_frag_list,
1187  const MolecularGraph& tgt_molgraph, FragmentList& tgt_frag_list, bool append = false);
1188 
1195  const Util::BitSet& split_bond_mask, bool append = false);
1196 
1200  CDPL_CHEM_API std::size_t getCompleteBondCount(const MolecularGraph& molgraph);
1201 
1208  CDPL_CHEM_API void calcBasicProperties(MolecularGraph& molgraph, bool overwrite);
1209 
1220  CDPL_CHEM_API std::size_t editSubstructures(const MolecularGraph& molgraph, Molecule& result_mol, const std::string& search_ptns,
1221  const std::string& result_ptn, const std::string& exclude_ptns = std::string());
1222 
1223  } // namespace Chem
1224 } // namespace CDPL
1225 
1226 #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:53
Data type 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:53
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:153
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Matrix instances.
Definition: Matrix.hpp:485
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 setting (= "/WarnOnEmptyStructure /AuxNone /NEWPSOFF") for the control-parameter Chem::Contro...
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 Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property of molgraph to substruct.
CDPL_CHEM_API void setMOL2MoleculeType(MolecularGraph &molgraph, unsigned int type)
Sets the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property of molgraph to type (see namespace...
CDPL_CHEM_API void setAtomTypesFromSymbols(MolecularGraph &molgraph, bool overwrite)
Sets the atom types of molgraph from their element symbols.
CDPL_CHEM_API Math::ULMatrix::SharedPointer calcTopologicalDistanceMatrix(MolecularGraph &molgraph, bool overwrite)
Computes and (optionally) stores the topological-distance matrix of molgraph.
CDPL_CHEM_API void calcImplicitHydrogenCounts(MolecularGraph &molgraph, bool overwrite)
Computes and stores implicit-hydrogen counts for the atoms of molgraph.
CDPL_CHEM_API void setMDLUserInitials(MolecularGraph &molgraph, const std::string &initials)
Sets the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of molgraph to initials.
CDPL_CHEM_API const Fragment::SharedPointer & getAromaticSubstructure(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property of molgraph.
CDPL_CHEM_API bool align2DCoordinates(MolecularGraph &molgraph, const AtomContainer &atoms, const Math::Vector2DArray &ref_coords, bool fix_bond_stereo=true)
Aligns molgraph's 2D coordinates so that the atoms of atoms come to lie at the reference coordinates ...
CDPL_CHEM_API Fragment::SharedPointer perceiveAromaticSubstructure(const MolecularGraph &molgraph)
Perceives the aromatic substructure of molgraph without modifying it.
CDPL_CHEM_API unsigned int getMOL2ChargeType(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property of molgraph (see namespace Chem::...
CDPL_CHEM_API FragmentList::SharedPointer perceiveComponents(const MolecularGraph &molgraph)
Perceives the connected components of molgraph without modifying it.
CDPL_CHEM_API void calc2DCoordinates(MolecularGraph &molgraph, bool overwrite)
Computes 2D atom coordinates for molgraph and stores them as Chem::AtomProperty::COORDINATES_2D.
CDPL_CHEM_API void setStructureData(MolecularGraph &molgraph, const StringDataBlock::SharedPointer &data)
Sets the Chem::MolecularGraphProperty::STRUCTURE_DATA property of molgraph to data.
CDPL_CHEM_API bool hasConformerEnergies(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property.
CDPL_CHEM_API void setHashCode(MolecularGraph &molgraph, std::uint64_t hash_code)
Sets the Chem::MolecularGraphProperty::HASH_CODE property of molgraph to hash_code.
CDPL_CHEM_API int generateINCHIKey(const MolecularGraph &molgraph, std::string &inchi_key)
Generates an InChIKey for molgraph using the InChI C-API.
CDPL_CHEM_API const std::string & getComment(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::COMMENT property of molgraph.
CDPL_CHEM_API FragmentList::SharedPointer getAromaticSSSRSubset(const MolecularGraph &molgraph)
Returns the subset of the SSSR of molgraph that contains only aromatic rings (a fresh list,...
CDPL_CHEM_API void calcMorganNumbering(MolecularGraph &molgraph, bool overwrite)
Computes and stores Morgan numbers for the atoms of molgraph.
CDPL_CHEM_API void setAromaticityFlags(MolecularGraph &molgraph, bool overwrite)
Perceives aromaticity and sets the corresponding atom/bond aromaticity flags on molgraph.
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 molgraph from their geometric layout.
CDPL_CHEM_API bool hasAromaticSubstructure(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property.
CDPL_CHEM_API void clearMatchExpression(Atom &atom)
Removes the Chem::AtomProperty::MATCH_EXPRESSION property from atom.
CDPL_CHEM_API void clearCyclicSubstructure(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property from molgraph.
CDPL_CHEM_API void setMOL2ChargeType(MolecularGraph &molgraph, unsigned int type)
Sets the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property of molgraph to type (see namespace C...
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 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 atom into cont_frag_list.
CDPL_CHEM_API bool hasTimestamp(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::TIMESTAMP property.
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 Chem::MolecularGraphProperty::TIMESTAMP property of molgraph to time.
CDPL_CHEM_API std::size_t getConformationIndex(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::CONFORMATION_INDEX property of molgraph.
CDPL_CHEM_API bool hasMDLUserInitials(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_USER_INITIALS property.
CDPL_CHEM_API bool hasMDLCTABVersion(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property.
CDPL_CHEM_API bool hasMDLChiralFlag(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property.
CDPL_CHEM_API void clearHashCode(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::HASH_CODE property from molgraph.
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 molgraph from their geometric layout.
CDPL_CHEM_API bool hasSSSR(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::SSSR property.
CDPL_CHEM_API void initSubstructureSearchQuery(MolecularGraph &molgraph, bool overwrite)
Prepares molgraph for use as a substructure search query (precomputes match expressions and required ...
CDPL_CHEM_API void clearMOL2ChargeType(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property from molgraph.
CDPL_CHEM_API void setSSSR(MolecularGraph &molgraph, const FragmentList::SharedPointer &sssr)
Sets the Chem::MolecularGraphProperty::SSSR property of molgraph to sssr.
CDPL_CHEM_API const MatchConstraintList::SharedPointer & getMatchConstraints(const Atom &atom)
Returns the Chem::AtomProperty::MATCH_CONSTRAINTS property of atom.
CDPL_CHEM_API void generateMatchExpressions(MolecularGraph &molgraph, bool overwrite)
Generates and stores match expressions for every atom, bond and the molecular graph itself.
CDPL_CHEM_API bool hasRings(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::RINGS property.
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 atom carries the Chem::AtomProperty::NAME property.
CDPL_CHEM_API const std::string & getMDLUserInitials(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_USER_INITIALS property of molgraph.
CDPL_CHEM_API void clearMDLRegistryNumber(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property from molgraph.
CDPL_CHEM_API void setAtomSymbolsFromTypes(MolecularGraph &molgraph, bool overwrite)
Sets the atom symbols of molgraph from their atom types.
CDPL_CHEM_API void generateIncidenceMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the atom/bond incidence matrix of molgraph (entry (i,j) is 1 if atom i is an endpoint of bond ...
CDPL_CHEM_API double getMDLEnergy(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_ENERGY property of molgraph.
CDPL_CHEM_API bool hasMDLEnergy(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_ENERGY property.
CDPL_CHEM_API void setComponents(MolecularGraph &molgraph, const FragmentList::SharedPointer &comps)
Sets the Chem::MolecularGraphProperty::COMPONENTS property of molgraph to comps.
CDPL_CHEM_API const std::string & getName(const Atom &atom)
Returns the Chem::AtomProperty::NAME property of atom.
CDPL_CHEM_API const FragmentList::SharedPointer & getSSSR(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::SSSR property of molgraph.
CDPL_CHEM_API void setMDLChiralFlag(MolecularGraph &molgraph, bool flag)
Sets the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property of molgraph to flag.
CDPL_CHEM_API bool hasConformationIndex(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::CONFORMATION_INDEX property.
CDPL_CHEM_API FragmentList::SharedPointer perceiveRings(const MolecularGraph &molgraph)
Perceives the full set of rings of molgraph without modifying it.
CDPL_CHEM_API bool hasTopologicalDistanceMatrix(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property...
CDPL_CHEM_API void perceiveHybridizationStates(MolecularGraph &molgraph, bool overwrite)
Computes and stores hybridization states for the atoms of molgraph from their valence environment.
CDPL_CHEM_API void clearMOL2MoleculeType(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property from molgraph.
CDPL_CHEM_API void clearConformationIndex(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::CONFORMATION_INDEX property from molgraph.
CDPL_CHEM_API void clearGeometricalDistanceMatrix(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property from molgraph.
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 molgraph using the InChI C-API.
CDPL_CHEM_API void clearMDLChiralFlag(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property from molgraph.
CDPL_CHEM_API void setMatchExpression(Atom &atom, const MatchExpression< Atom, MolecularGraph >::SharedPointer &expr)
Sets the Chem::AtomProperty::MATCH_EXPRESSION property of atom to expr.
CDPL_CHEM_API void clearStructureData(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::STRUCTURE_DATA property from molgraph.
CDPL_CHEM_API const StringDataBlock::SharedPointer & getStructureData(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::STRUCTURE_DATA property of molgraph.
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 result_mol from molgraph by replacing all substructures matching the SMARTS patterns in search...
CDPL_CHEM_API void clearTimestamp(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::TIMESTAMP property from molgraph.
CDPL_CHEM_API bool hasMDLRegistryNumber(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property.
CDPL_CHEM_API void setMDLEnergy(MolecularGraph &molgraph, double energy)
Sets the Chem::MolecularGraphProperty::MDL_ENERGY property of molgraph to energy.
CDPL_CHEM_API bool hasMDLScalingFactor2(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property.
CDPL_CHEM_API bool hasStoichiometricNumber(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property.
CDPL_CHEM_API const Util::DArray::SharedPointer & getConformerEnergies(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property of molgraph.
CDPL_CHEM_API FragmentList::SharedPointer perceiveSSSR(const MolecularGraph &molgraph)
Perceives the Smallest Set of Smallest Rings of molgraph without modifying it.
CDPL_CHEM_API void clearTopologicalDistanceMatrix(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property from molgraph.
CDPL_CHEM_API MatchExpression< Atom, MolecularGraph >::SharedPointer generateMatchExpression(const Atom &atom, const MolecularGraph &molgraph)
Builds an atom-level match expression from the match-constraint list attached to atom.
CDPL_CHEM_API const MatchExpression< Atom, MolecularGraph >::SharedPointer & getMatchExpression(const Atom &atom)
Returns the Chem::AtomProperty::MATCH_EXPRESSION property of atom.
CDPL_CHEM_API void setComment(MolecularGraph &molgraph, const std::string &comment)
Sets the Chem::MolecularGraphProperty::COMMENT property of molgraph to comment.
CDPL_CHEM_API ElectronSystemList::SharedPointer perceivePiElectronSystems(const MolecularGraph &molgraph)
Perceives the pi-electron systems of molgraph without modifying it.
CDPL_CHEM_API void clearComponents(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::COMPONENTS property from molgraph.
CDPL_CHEM_API void perceiveBondOrders(MolecularGraph &molgraph, bool overwrite)
Perceives bond orders for the bonds of molgraph from atom geometry and ligand environment.
CDPL_CHEM_API void setGeometricalDistanceMatrix(MolecularGraph &molgraph, const Math::DMatrix::SharedPointer &mtx)
Sets the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property of molgraph to mtx.
CDPL_CHEM_API void clearRings(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::RINGS property from molgraph.
CDPL_CHEM_API bool hasMOL2ChargeType(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MOL2_CHARGE_TYPE property.
CDPL_CHEM_API void setMDLScalingFactor1(MolecularGraph &molgraph, long factor)
Sets the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property of molgraph to factor.
CDPL_CHEM_API const Math::DMatrix::SharedPointer & getGeometricalDistanceMatrix(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property of molgraph.
CDPL_CHEM_API unsigned int getMOL2MoleculeType(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property of molgraph (see namespace Chem...
CDPL_CHEM_API void setStoichiometricNumber(MolecularGraph &molgraph, double num)
Sets the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property of molgraph to num.
CDPL_CHEM_API std::size_t getMDLDimensionality(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property of molgraph.
CDPL_CHEM_API void setRingFlags(MolecularGraph &molgraph, bool overwrite)
Perceives ring membership and sets the corresponding atom/bond ring flags on molgraph.
CDPL_CHEM_API void setAromaticSubstructure(MolecularGraph &molgraph, const Fragment::SharedPointer &substruct)
Sets the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property of molgraph to substruct.
CDPL_CHEM_API Fragment::SharedPointer perceiveCyclicSubstructure(const MolecularGraph &molgraph)
Perceives the cyclic substructure (union of all rings) of molgraph without modifying it.
CDPL_CHEM_API bool containsMolecularGraph(const MolecularGraph &molgraph, const MolecularGraph &sub_molgraph, bool atoms=true, bool bonds=true)
Tells whether molgraph contains the atoms and/or bonds of sub_molgraph.
CDPL_CHEM_API void setComponentGroups(MolecularGraph &molgraph, const FragmentList::SharedPointer &comp_groups)
Sets the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of molgraph to comp_groups.
CDPL_CHEM_API void clearMDLProgramName(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property from molgraph.
CDPL_CHEM_API void clearMDLCTABVersion(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property from molgraph.
CDPL_CHEM_API FragmentList::SharedPointer getAromaticRings(const MolecularGraph &molgraph)
Returns the subset of the aromatic rings of molgraph (a fresh list, not stored on molgraph).
CDPL_CHEM_API void generateBondMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the bond-order matrix of molgraph (entry (i,j) is the order of the bond between atoms i and j)...
CDPL_CHEM_API void extractReactionCenter(const MolecularGraph &molgraph, Fragment &rxn_center)
Collects every atom and bond of molgraph that carries a reaction-center flag into the fragment rxn_ce...
CDPL_CHEM_API const FragmentList::SharedPointer & getComponentGroups(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::COMPONENT_GROUPS property of molgraph.
CDPL_CHEM_API long getMDLScalingFactor1(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property of molgraph.
CDPL_CHEM_API void setMDLCTABVersion(MolecularGraph &molgraph, unsigned int version)
Sets the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property of molgraph to version (see namespac...
CDPL_CHEM_API void initSubstructureSearchTarget(MolecularGraph &molgraph, bool overwrite)
Prepares molgraph for use as a substructure search target (precomputes required cached properties).
CDPL_CHEM_API FragmentList::SharedPointer perceiveComponentGroups(const MolecularGraph &molgraph)
Perceives the component groups of molgraph (from atom-level Chem::AtomProperty::COMPONENT_GROUP_ID va...
CDPL_CHEM_API void generateMatchExpressionStrings(MolecularGraph &molgraph, bool overwrite)
Generates and stores textual representations of the match expressions of molgraph.
CDPL_CHEM_API void setMDLDimensionality(MolecularGraph &molgraph, std::size_t dim)
Sets the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property of molgraph to dim.
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 molgraph into cont_frag_list.
CDPL_CHEM_API void clearConformerEnergies(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property from molgraph.
CDPL_CHEM_API void calcBond2DStereoFlags(MolecularGraph &molgraph, bool overwrite)
Derives 2D wedge/hash bond stereo flags for the bonds of molgraph from the atoms' stereo descriptors ...
CDPL_CHEM_API void setMatchConstraints(Atom &atom, const MatchConstraintList::SharedPointer &constr)
Sets the Chem::AtomProperty::MATCH_CONSTRAINTS property of atom to constr.
CDPL_CHEM_API std::size_t getCompleteBondCount(const MolecularGraph &molgraph)
Returns the number of bonds of molgraph that lie between two atoms of molgraph (i....
CDPL_CHEM_API bool hasMOL2MoleculeType(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MOL2_MOLECULE_TYPE property.
CDPL_CHEM_API void clearMDLEnergy(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_ENERGY property from molgraph.
CDPL_CHEM_API const FragmentList::SharedPointer & getComponents(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::COMPONENTS property of molgraph.
CDPL_CHEM_API double getStoichiometricNumber(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property of molgraph.
CDPL_CHEM_API std::uint64_t getHashCode(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::HASH_CODE property of molgraph.
CDPL_CHEM_API void calcHydrogen3DCoordinates(MolecularGraph &molgraph, bool undef_only=true)
Computes 3D coordinates for the hydrogen atoms of molgraph from the geometry of their non-hydrogen ne...
CDPL_CHEM_API std::time_t getTimestamp(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::TIMESTAMP property of molgraph.
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 molgraph taking into account the specified atom and bond properties.
CDPL_CHEM_API void setTopologicalDistanceMatrix(MolecularGraph &molgraph, const Math::ULMatrix::SharedPointer &mtx)
Sets the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property of molgraph to mtx.
CDPL_CHEM_API void generateBondElectronMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the bond-electron-count matrix of molgraph (entry (i,j) is the number of bonding electrons bet...
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 src_molgraph that covers the atoms of tgt_molgraph an...
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 molgraph according to a user-supplie...
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 molgraph that qualify as stereo centers under the supplied criteria.
CDPL_CHEM_API bool hasMatchExpression(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MATCH_EXPRESSION property.
CDPL_CHEM_API void calcAtomCIPConfigurations(MolecularGraph &molgraph, bool overwrite)
Computes and stores CIP configuration labels for the atoms of molgraph.
CDPL_CHEM_API void setConformerEnergies(MolecularGraph &molgraph, const Util::DArray::SharedPointer &energies)
Sets the Chem::MolecularGraphProperty::CONFORMER_ENERGIES property of molgraph to energies.
CDPL_CHEM_API void clearComment(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::COMMENT property from molgraph.
CDPL_CHEM_API void clearComponentGroups(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::COMPONENT_GROUPS property from molgraph.
CDPL_CHEM_API unsigned int getMDLCTABVersion(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_CTAB_VERSION property of molgraph (see namespace Chem::...
CDPL_CHEM_API bool hasStructureData(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::STRUCTURE_DATA property.
CDPL_CHEM_API void perceiveSybylAtomTypes(MolecularGraph &molgraph, bool overwrite)
Perceives Sybyl atom types for the atoms of molgraph.
CDPL_CHEM_API void setConformationIndex(MolecularGraph &molgraph, std::size_t index)
Sets the Chem::MolecularGraphProperty::CONFORMATION_INDEX property of molgraph to index.
CDPL_CHEM_API bool hasComponents(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::COMPONENTS property.
CDPL_CHEM_API bool hasMDLScalingFactor1(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property.
CDPL_CHEM_API void kekulizeBonds(MolecularGraph &molgraph)
Assigns Kekulé bond orders to the aromatic bonds of molgraph.
CDPL_CHEM_API void clearAromaticSubstructure(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::AROMATIC_SUBSTRUCTURE property from molgraph.
CDPL_CHEM_API bool hasHashCode(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::HASH_CODE property.
CDPL_CHEM_API const ElectronSystemList::SharedPointer & getPiElectronSystems(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property of molgraph.
CDPL_CHEM_API const std::string & getMDLProgramName(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of molgraph.
CDPL_CHEM_API void clearName(Atom &atom)
Removes the Chem::AtomProperty::NAME property from atom.
CDPL_CHEM_API void calcAtomStereoDescriptorsFromMDLParities(MolecularGraph &molgraph, bool overwrite)
Derives atom stereo descriptors of molgraph from previously-assigned MDL parities.
CDPL_CHEM_API bool hasComponentGroups(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::COMPONENT_GROUPS property.
CDPL_CHEM_API bool hasCyclicSubstructure(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property.
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 (defined on src_molgraph) to the corresponding fragments o...
CDPL_CHEM_API void setAtomMatchConstraints(MolecularGraph &molgraph, const MatchConstraintList::SharedPointer &constr, bool overwrite)
Sets the atom-level match-constraint list constr on every atom of molgraph.
CDPL_CHEM_API void calcCIPPriorities(MolecularGraph &molgraph, bool overwrite)
Computes and stores CIP priorities for the atoms of molgraph.
CDPL_CHEM_API void clearMDLScalingFactor1(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR1 property from molgraph.
CDPL_CHEM_API void calcMDLParities(MolecularGraph &molgraph, bool overwrite)
Computes and stores MDL parities for the atoms of molgraph.
CDPL_CHEM_API void clearPiElectronSystems(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property from molgraph.
CDPL_CHEM_API void setMDLRegistryNumber(MolecularGraph &molgraph, std::size_t reg_no)
Sets the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of molgraph to reg_no.
CDPL_CHEM_API const FragmentList::SharedPointer & getRings(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::RINGS property of molgraph.
CDPL_CHEM_API std::size_t getMDLRegistryNumber(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_REGISTRY_NUMBER property of molgraph.
CDPL_CHEM_API void clearMatchConstraints(Atom &atom)
Removes the Chem::AtomProperty::MATCH_CONSTRAINTS property from atom.
CDPL_CHEM_API void clearMDLUserInitials(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_USER_INITIALS property from molgraph.
CDPL_CHEM_API void setMDLScalingFactor2(MolecularGraph &molgraph, double factor)
Sets the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property of molgraph to factor.
CDPL_CHEM_API double getMDLScalingFactor2(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property of molgraph.
CDPL_CHEM_API void generateAdjacencyMatrix(const MolecularGraph &molgraph, Math::SparseULMatrix &mtx)
Builds the adjacency matrix of molgraph (entry (i,j) is the bond count between atoms i and j).
CDPL_CHEM_API bool hasMatchConstraints(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MATCH_CONSTRAINTS property.
CDPL_CHEM_API void calcBasicProperties(MolecularGraph &molgraph, bool overwrite)
Computes the basic per-atom/per-bond properties (aromaticity, ring info, etc.) of molgraph.
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 molgraph that qualify as stereo centers under the supplied criteria.
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 (a fragment of src_molgraph) to the corresponding atoms/bonds ...
CDPL_CHEM_API void setRings(MolecularGraph &molgraph, const FragmentList::SharedPointer &rings)
Sets the Chem::MolecularGraphProperty::RINGS property of molgraph to rings.
CDPL_CHEM_API bool hasMDLDimensionality(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property.
CDPL_CHEM_API void clearStoichiometricNumber(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::STOICHIOMETRIC_NUMBER property from molgraph.
CDPL_CHEM_API FragmentList::SharedPointer extractSSSRSubset(const MolecularGraph &src_molgraph, const MolecularGraph &tgt_molgraph)
Extracts the subset of the SSSR of src_molgraph whose rings consist of atoms and bonds of tgt_molgrap...
CDPL_CHEM_API void calcBondCIPConfigurations(MolecularGraph &molgraph, bool overwrite)
Computes and stores CIP configuration labels for the bonds of molgraph.
CDPL_CHEM_API void clearMDLScalingFactor2(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::MDL_SCALING_FACTOR2 property from molgraph.
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 molgraph.
CDPL_CHEM_API bool hasGeometricalDistanceMatrix(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::GEOMETRICAL_DISTANCE_MATRIX property...
CDPL_CHEM_API bool hasComment(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::COMMENT property.
CDPL_CHEM_API void clearSSSR(MolecularGraph &molgraph)
Removes the Chem::MolecularGraphProperty::SSSR property from molgraph.
CDPL_CHEM_API void setMDLProgramName(MolecularGraph &molgraph, const std::string &name)
Sets the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property of molgraph to name.
CDPL_CHEM_API void splitIntoFragments(const MolecularGraph &molgraph, FragmentList &frag_list, const Util::BitSet &split_bond_mask, bool append=false)
Splits molgraph into connected fragments by removing the bonds flagged in split_bond_mask.
CDPL_CHEM_API const Fragment::SharedPointer & getCyclicSubstructure(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::CYCLIC_SUBSTRUCTURE property of molgraph.
CDPL_CHEM_API void setPiElectronSystems(MolecularGraph &molgraph, const ElectronSystemList::SharedPointer &pi_systems)
Sets the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property of molgraph to pi_systems.
CDPL_CHEM_API void setBondMatchConstraints(MolecularGraph &molgraph, const MatchConstraintList::SharedPointer &constr, bool overwrite)
Sets the bond-level match-constraint list constr on every bond of molgraph.
CDPL_CHEM_API bool hasPiElectronSystems(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::PI_ELECTRON_SYSTEMS property.
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 molgraph.
CDPL_CHEM_API bool getMDLChiralFlag(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::MDL_CHIRAL_FLAG property of molgraph.
CDPL_CHEM_API void calcFormalCharges(MolecularGraph &molgraph, bool overwrite)
Computes and stores formal charges for the atoms of molgraph from their valence environment.
CDPL_CHEM_API const Math::ULMatrix::SharedPointer & getTopologicalDistanceMatrix(const MolecularGraph &molgraph)
Returns the Chem::MolecularGraphProperty::TOPOLOGICAL_DISTANCE_MATRIX property of molgraph.
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)
Removes the Chem::MolecularGraphProperty::MDL_DIMENSIONALITY property from molgraph.
CDPL_CHEM_API bool hasMDLProgramName(const MolecularGraph &molgraph)
Tells whether molgraph carries the Chem::MolecularGraphProperty::MDL_PROGRAM_NAME property.
CDPL_CHEM_API void setName(Atom &atom, const std::string &name)
Sets the Chem::AtomProperty::NAME property of atom to name.
SparseMatrix< unsigned long > SparseULMatrix
Unbounded sparse matrix holding unsigned integers of type unsigned long.
Definition: Matrix.hpp:3235
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:85
Matrix< unsigned long > ULMatrix
Unbounded dense matrix holding unsigned integers of type unsigned long.
Definition: Matrix.hpp:3155
VectorArray< Vector2D > Vector2DArray
Array storing vectors of type Math::Vector2D.
Definition: VectorArray.hpp:80
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.