Chemical Data Processing Library C++ API - Version 1.4.0
Chem/AtomFunctions.hpp
Go to the documentation of this file.
1 /*
2  * AtomFunctions.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_ATOMFUNCTIONS_HPP
30 #define CDPL_CHEM_ATOMFUNCTIONS_HPP
31 
32 #include <cstddef>
33 #include <string>
34 #include <type_traits>
35 
36 #include "CDPL/Chem/APIPrefix.hpp"
42 #include "CDPL/Math/Vector.hpp"
44 #include "CDPL/Util/BitSet.hpp"
45 
46 
47 namespace CDPL
48 {
49 
50  namespace Chem
51  {
52 
53  class StereoDescriptor;
54 
60  CDPL_CHEM_API const std::string& getName(const Atom& atom);
61 
67  CDPL_CHEM_API void setName(Atom& atom, const std::string& name);
68 
74 
80  CDPL_CHEM_API bool hasName(const Atom& atom);
81 
82 
88  CDPL_CHEM_API const std::string& getSymbol(const Atom& atom);
89 
95  CDPL_CHEM_API void setSymbol(Atom& atom, const std::string& symbol);
96 
102 
108  CDPL_CHEM_API bool hasSymbol(const Atom& atom);
109 
115  CDPL_CHEM_API const std::string& getSymbolForType(const Atom& atom);
116 
117 
123  CDPL_CHEM_API unsigned int getType(const Atom& atom);
124 
130  CDPL_CHEM_API void setType(Atom& atom, unsigned int type);
131 
137 
143  CDPL_CHEM_API bool hasType(const Atom& atom);
144 
150  CDPL_CHEM_API unsigned int getTypeForSymbol(const Atom& atom);
151 
157  CDPL_CHEM_API unsigned int getGenericType(const Atom& atom); //move
158 
159 
165  CDPL_CHEM_API long getFormalCharge(const Atom& atom);
166 
172  CDPL_CHEM_API void setFormalCharge(Atom& atom, long charge);
173 
179 
185  CDPL_CHEM_API bool hasFormalCharge(const Atom& atom);
186 
193  CDPL_CHEM_API long calcFormalCharge(const Atom& atom, const MolecularGraph& molgraph);
194 
195 
201  CDPL_CHEM_API std::size_t getIsotope(const Atom& atom);
202 
208  CDPL_CHEM_API void setIsotope(Atom& atom, std::size_t isotope);
209 
215 
221  CDPL_CHEM_API bool hasIsotope(const Atom& atom);
222 
223 
229  CDPL_CHEM_API unsigned int getRadicalType(const Atom& atom);
230 
236  CDPL_CHEM_API void setRadicalType(Atom& atom, unsigned int type);
237 
243 
249  CDPL_CHEM_API bool hasRadicalType(const Atom& atom);
250 
251 
257  CDPL_CHEM_API unsigned int getHybridizationState(const Atom& atom);
258 
264  CDPL_CHEM_API void setHybridizationState(Atom& atom, unsigned int state);
265 
271 
278 
285  CDPL_CHEM_API unsigned int perceiveHybridizationState(const Atom& atom, const MolecularGraph& molgraph);
286 
287 
293  CDPL_CHEM_API bool getRingFlag(const Atom& atom);
294 
300  CDPL_CHEM_API void setRingFlag(Atom& atom, bool in_ring);
301 
307 
313  CDPL_CHEM_API bool hasRingFlag(const Atom& atom);
314 
315 
323  CDPL_CHEM_API bool isInFragmentOfSize(const Atom& atom, const FragmentList& frag_list, std::size_t size);
324 
331  CDPL_CHEM_API std::size_t getSizeOfSmallestContainingFragment(const Atom& atom, const FragmentList& frag_list);
332 
339  CDPL_CHEM_API std::size_t getSizeOfLargestContainingFragment(const Atom& atom, const FragmentList& frag_list);
340 
347  CDPL_CHEM_API std::size_t getNumContainingFragments(const Atom& atom, const FragmentList& frag_list);
348 
356  CDPL_CHEM_API void getContainingFragments(const Atom& atom, const FragmentList& frag_list, FragmentList& cont_frag_list, bool append = false);
357 
358 
365 
371  CDPL_CHEM_API void setAromaticityFlag(Atom& atom, bool aromatic);
372 
378 
385 
386 
392  CDPL_CHEM_API std::size_t getUnpairedElectronCount(const Atom& atom);
393 
399  CDPL_CHEM_API void setUnpairedElectronCount(Atom& atom, std::size_t count);
400 
406 
413 
414 
420  CDPL_CHEM_API std::size_t getImplicitHydrogenCount(const Atom& atom);
421 
427  CDPL_CHEM_API void setImplicitHydrogenCount(Atom& atom, std::size_t count);
428 
434 
441 
448  CDPL_CHEM_API std::size_t calcImplicitHydrogenCount(const Atom& atom, const MolecularGraph& molgraph);
449 
450 
457 
463  CDPL_CHEM_API void set2DCoordinates(Atom& atom, const Math::Vector2D& coords);
464 
470 
477 
478 
486  CDPL_CHEM_API const Math::Vector3D& getConformer3DCoordinates(const Atom& atom, std::size_t conf_idx);
487 
488 
494  CDPL_CHEM_API const Math::Vector3DArray::SharedPointer& get3DCoordinatesArray(const Atom& atom);
495 
501  CDPL_CHEM_API void set3DCoordinatesArray(Atom& atom, const Math::Vector3DArray::SharedPointer& coords_array);
502 
508 
515 
516 
522  CDPL_CHEM_API std::size_t getMorganNumber(const Atom& atom);
523 
529  CDPL_CHEM_API void setMorganNumber(Atom& atom, std::size_t num);
530 
536 
542  CDPL_CHEM_API bool hasMorganNumber(const Atom& atom);
543 
544 
550  CDPL_CHEM_API std::size_t getCanonicalNumber(const Atom& atom);
551 
557  CDPL_CHEM_API void setCanonicalNumber(Atom& atom, std::size_t num);
558 
564 
571 
572 
578  CDPL_CHEM_API std::size_t getCIPPriority(const Atom& atom);
579 
585  CDPL_CHEM_API void setCIPPriority(Atom& atom, std::size_t priority);
586 
592 
598  CDPL_CHEM_API bool hasCIPPriority(const Atom& atom);
599 
600 
606  CDPL_CHEM_API std::size_t getSymmetryClass(const Atom& atom);
607 
613  CDPL_CHEM_API void setSymmetryClass(Atom& atom, std::size_t class_id);
614 
620 
627 
628 
634  CDPL_CHEM_API unsigned int getCIPConfiguration(const Atom& atom);
635 
641  CDPL_CHEM_API void setCIPConfiguration(Atom& atom, unsigned int config);
642 
648 
655 
656 
663 
670 
676 
683 
692  CDPL_CHEM_API StereoDescriptor calcStereoDescriptor(const Atom& atom, const MolecularGraph& molgraph, std::size_t dim = 1);
693 
701 
710  CDPL_CHEM_API unsigned int calcConfiguration(const Atom& atom, const MolecularGraph& molgraph, const StereoDescriptor& descr,
711  const Math::Vector3DArray& coords);
712 
713 
720 
726  CDPL_CHEM_API void setStereoCenterFlag(Atom& atom, bool is_center);
727 
733 
740 
753  CDPL_CHEM_API bool isStereoCenter(const Atom& atom, const MolecularGraph& molgraph, bool check_asym = true,
754  bool check_inv_n = true, bool check_quart_n = true, bool check_plan_n = true,
755  bool check_amide_n = true, bool check_res_ctrs = true);
756 
757 
763  CDPL_CHEM_API unsigned int getSybylType(const Atom& atom);
764 
770  CDPL_CHEM_API void setSybylType(Atom& atom, unsigned int type);
771 
777 
783  CDPL_CHEM_API bool hasSybylType(const Atom& atom);
784 
791  CDPL_CHEM_API unsigned int perceiveSybylType(const Atom& atom, const MolecularGraph& molgraph);
792 
793 
799  CDPL_CHEM_API const std::string& getMOL2Name(const Atom& atom);
800 
806  CDPL_CHEM_API void setMOL2Name(Atom& atom, const std::string& name);
807 
813 
819  CDPL_CHEM_API bool hasMOL2Name(const Atom& atom);
820 
821 
827  CDPL_CHEM_API double getMOL2Charge(const Atom& atom);
828 
834  CDPL_CHEM_API void setMOL2Charge(Atom& atom, double charge);
835 
841 
847  CDPL_CHEM_API bool hasMOL2Charge(const Atom& atom);
848 
849 
855  CDPL_CHEM_API std::size_t getMOL2SubstructureID(const Atom& atom);
856 
862  CDPL_CHEM_API void setMOL2SubstructureID(Atom& atom, std::size_t id);
863 
869 
876 
877 
883  CDPL_CHEM_API const std::string& getMOL2SubstructureName(const Atom& atom);
884 
890  CDPL_CHEM_API void setMOL2SubstructureName(Atom& atom, const std::string& id);
891 
897 
904 
905 
911  CDPL_CHEM_API const std::string& getMOL2SubstructureSubtype(const Atom& atom);
912 
918  CDPL_CHEM_API void setMOL2SubstructureSubtype(Atom& atom, const std::string& subtype);
919 
925 
932 
933 
939  CDPL_CHEM_API const std::string& getMOL2SubstructureChain(const Atom& atom);
940 
946  CDPL_CHEM_API void setMOL2SubstructureChain(Atom& atom, const std::string& chain);
947 
953 
960 
961 
967  CDPL_CHEM_API unsigned int getMDLParity(const Atom& atom);
968 
974  CDPL_CHEM_API void setMDLParity(Atom& atom, unsigned int parity);
975 
981 
987  CDPL_CHEM_API bool hasMDLParity(const Atom& atom);
988 
995  CDPL_CHEM_API unsigned int calcMDLParity(const Atom& atom, const MolecularGraph& molgraph);
996 
997 
1004 
1010  CDPL_CHEM_API void setMDLStereoCareFlag(Atom& atom, bool flag);
1011 
1017 
1024 
1025 
1031  CDPL_CHEM_API unsigned int getReactionCenterStatus(const Atom& atom);
1032 
1038  CDPL_CHEM_API void setReactionCenterStatus(Atom& atom, unsigned int status);
1039 
1045 
1052 
1053 
1059  CDPL_CHEM_API std::size_t getAtomMappingID(const Atom& atom);
1060 
1066  CDPL_CHEM_API void setAtomMappingID(Atom& atom, std::size_t id);
1067 
1073 
1080 
1081 
1087  CDPL_CHEM_API std::size_t getComponentGroupID(const Atom& atom);
1088 
1094  CDPL_CHEM_API void setComponentGroupID(Atom& atom, std::size_t id);
1095 
1101 
1108 
1109 
1116 
1123 
1129 
1136 
1137 
1144 
1151 
1157 
1164 
1172 
1173 
1179  CDPL_CHEM_API const std::string& getMatchExpressionString(const Atom& atom);
1180 
1186  CDPL_CHEM_API void setMatchExpressionString(Atom& atom, const std::string& expr_str);
1187 
1193 
1200 
1208  CDPL_CHEM_API void generateMatchExpressionString(const Atom& atom, const MolecularGraph& molgraph, std::string& expr_str);
1209 
1210 
1219  CDPL_CHEM_API void markReachableAtoms(const Atom& atom, const MolecularGraph& molgraph,
1220  Util::BitSet& atom_mask, bool reset = true);
1221 
1229  CDPL_CHEM_API std::size_t getTopologicalDistance(const Atom& atom1, const Atom& atom2, const MolecularGraph& molgraph);
1230 
1240  CDPL_CHEM_API std::size_t getEnvironment(const Atom& atom, const MolecularGraph& molgraph, std::size_t max_dist, Fragment& env, bool append = false);
1241 
1242 
1254  template <typename AtomType, typename OutputIterator>
1255  std::size_t getConnectedAtoms(AtomType& atom, const MolecularGraph& molgraph, OutputIterator it, AtomType* excl_atom = 0)
1256  {
1257  typedef typename std::conditional<std::is_const<AtomType>::value, typename AtomType::ConstAtomIterator, typename AtomType::AtomIterator>::type AtomIterator;
1258 
1259  AtomIterator atoms_end = atom.getAtomsEnd();
1260  typename AtomType::ConstBondIterator b_it = atom.getBondsBegin();
1261  std::size_t count = 0;
1262 
1263  for (AtomIterator a_it = atom.getAtomsBegin(); a_it != atoms_end; ++a_it, ++b_it) {
1264  if (&(*a_it) == excl_atom)
1265  continue;
1266 
1267  if (molgraph.containsAtom(*a_it) && molgraph.containsBond(*b_it)) {
1268  *it = &(*a_it);
1269  ++it;
1270  count++;
1271  }
1272  }
1273 
1274  return count;
1275  }
1276 
1288  template <typename AtomType, typename OutputIterator>
1289  std::size_t getIncidentBonds(AtomType& atom, const MolecularGraph& molgraph, OutputIterator it, AtomType* excl_atom = 0)
1290  {
1291  typedef typename std::conditional<std::is_const<AtomType>::value, typename AtomType::ConstBondIterator, typename AtomType::BondIterator>::type BondIterator;
1292 
1293  BondIterator bonds_end = atom.getBondsEnd();
1294  typename AtomType::ConstAtomIterator a_it = atom.getAtomsBegin();
1295  std::size_t count = 0;
1296 
1297  for (BondIterator b_it = atom.getBondsBegin(); b_it != bonds_end; ++a_it, ++b_it) {
1298  if (&(*a_it) == excl_atom)
1299  continue;
1300 
1301  if (molgraph.containsAtom(*a_it) && molgraph.containsBond(*b_it)) {
1302  *it = &(*b_it);
1303  ++it;
1304  count++;
1305  }
1306  }
1307 
1308  return count;
1309  }
1310 
1324  template <typename AtomType, typename AtomOutputIterator, typename BondOutputIterator>
1325  std::size_t getConnectedAtomsAndBonds(AtomType& atom, const MolecularGraph& molgraph, AtomOutputIterator ao_it, BondOutputIterator bo_it, AtomType* excl_atom = 0)
1326  {
1327  typedef typename std::conditional<std::is_const<AtomType>::value, typename AtomType::ConstAtomIterator, typename AtomType::AtomIterator>::type AtomIterator;
1328  typedef typename std::conditional<std::is_const<AtomType>::value, typename AtomType::ConstBondIterator, typename AtomType::BondIterator>::type BondIterator;
1329 
1330  BondIterator bonds_end = atom.getBondsEnd();
1331  AtomIterator a_it = atom.getAtomsBegin();
1332  std::size_t count = 0;
1333 
1334  for (BondIterator b_it = atom.getBondsBegin(); b_it != bonds_end; ++a_it, ++b_it) {
1335  if (&(*a_it) == excl_atom)
1336  continue;
1337 
1338  if (molgraph.containsAtom(*a_it) && molgraph.containsBond(*b_it)) {
1339  *ao_it = &(*a_it);
1340  *bo_it = &(*b_it);
1341  ++ao_it;
1342  ++bo_it;
1343  count++;
1344  }
1345  }
1346 
1347  return count;
1348  }
1349  } // namespace Chem
1350 } // namespace CDPL
1351 
1352 #endif // CDPL_CHEM_ATOMFUNCTIONS_HPP
Type definition of a generic wrapper class for storing user-defined Chem::Atom priority functions.
Declaration of type CDPL::Util::BitSet.
Definition of the preprocessor macro CDPL_CHEM_API.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of constants in namespace CDPL::Chem::AtomPropertyFlag.
Definition of class CDPL::Chem::FragmentList.
Definition of class CDPL::Chem::MatchConstraintList.
Definition of class CDPL::Chem::MatchExpression.
Definition of class CDPL::Math::VectorArray.
Definition of vector data types.
virtual bool containsAtom(const Atom &atom) const =0
Tells whether the specified Chem::Atom instance is stored in this container.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
virtual bool containsBond(const Bond &bond) const =0
Tells whether the specified Chem::Bond instance is stored in this container.
Data structure for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
Concrete Chem::MolecularGraph implementation that stores references to a selectable subset of atoms a...
Definition: Fragment.hpp:57
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
Data structure for the storage and retrieval of stereochemical information about atoms and bonds.
Definition: StereoDescriptor.hpp:102
CDPL_CHEM_API bool hasFormalCharge(const Atom &atom)
Tells whether the Chem::AtomProperty::FORMAL_CHARGE property of the atom atom is set.
CDPL_CHEM_API bool hasMDLParity(const Atom &atom)
Tells whether the Chem::AtomProperty::MDL_PARITY property of the atom atom is set.
CDPL_CHEM_API std::size_t getEnvironment(const Atom &atom, const MolecularGraph &molgraph, std::size_t max_dist, Fragment &env, bool append=false)
Collects every atom of the molecular graph molgraph that is within max_dist bonds of the atom atom in...
CDPL_CHEM_API std::size_t getSizeOfSmallestContainingFragment(const Atom &atom, const FragmentList &frag_list)
Returns the size (in atoms) of the smallest fragment in frag_list that contains the atom atom.
CDPL_CHEM_API void setRingFlag(Atom &atom, bool in_ring)
Sets the value of the Chem::AtomProperty::RING_FLAG property of the atom atom to in_ring.
std::size_t getConnectedAtomsAndBonds(AtomType &atom, const MolecularGraph &molgraph, AtomOutputIterator ao_it, BondOutputIterator bo_it, AtomType *excl_atom=0)
Writes every connected neighbor of the atom atom and the corresponding incident bond that are both me...
Definition: Chem/AtomFunctions.hpp:1325
CDPL_CHEM_API std::size_t getSymmetryClass(const Atom &atom)
Returns the value of the Chem::AtomProperty::SYMMETRY_CLASS property of the atom atom.
CDPL_CHEM_API bool hasSymmetryClass(const Atom &atom)
Tells whether the Chem::AtomProperty::SYMMETRY_CLASS property of the atom atom is set.
CDPL_CHEM_API void setCanonicalNumber(Atom &atom, std::size_t num)
Sets the value of the Chem::AtomProperty::CANONICAL_NUMBER property of the atom atom to num.
CDPL_CHEM_API bool hasIsotope(const Atom &atom)
Tells whether the Chem::AtomProperty::ISOTOPE property of the atom atom is set.
CDPL_CHEM_API long getFormalCharge(const Atom &atom)
Returns the value of the Chem::AtomProperty::FORMAL_CHARGE property of the atom atom.
CDPL_CHEM_API unsigned int getTypeForSymbol(const Atom &atom)
Returns the numeric atom type that corresponds to the symbol property of the atom atom.
CDPL_CHEM_API bool hasMOL2SubstructureChain(const Atom &atom)
Tells whether the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property of the atom atom is set.
CDPL_CHEM_API void clear2DCoordinates(Atom &atom)
Clears the value of the Chem::AtomProperty::COORDINATES_2D property of the atom atom.
CDPL_CHEM_API bool hasCIPPriority(const Atom &atom)
Tells whether the Chem::AtomProperty::CIP_PRIORITY property of the atom atom is set.
CDPL_CHEM_API void clearFormalCharge(Atom &atom)
Clears the value of the Chem::AtomProperty::FORMAL_CHARGE property of the atom atom.
CDPL_CHEM_API bool getAromaticityFlag(const Atom &atom)
Returns the value of the Chem::AtomProperty::AROMATICITY_FLAG property of the atom atom.
CDPL_CHEM_API void clearRingFlag(Atom &atom)
Clears the value of the Chem::AtomProperty::RING_FLAG property of the atom atom.
CDPL_CHEM_API void clearSymmetryClass(Atom &atom)
Clears the value of the Chem::AtomProperty::SYMMETRY_CLASS property of the atom atom.
CDPL_CHEM_API void clearMatchExpression(Atom &atom)
Clears the value of the Chem::AtomProperty::MATCH_EXPRESSION property of the atom atom.
CDPL_CHEM_API bool hasSymbol(const Atom &atom)
Tells whether the Chem::AtomProperty::SYMBOL property of the atom atom is set.
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 hasMOL2Charge(const Atom &atom)
Tells whether the Chem::AtomProperty::MOL2_CHARGE property of the atom atom is set.
CDPL_CHEM_API void setSymbol(Atom &atom, const std::string &symbol)
Sets the value of the Chem::AtomProperty::SYMBOL property of the atom atom to symbol.
CDPL_CHEM_API const std::string & getMOL2SubstructureChain(const Atom &atom)
Returns the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property of the atom atom.
std::size_t getIncidentBonds(AtomType &atom, const MolecularGraph &molgraph, OutputIterator it, AtomType *excl_atom=0)
Writes every bond incident to the atom atom where the bond itself and both atoms are members of the m...
Definition: Chem/AtomFunctions.hpp:1289
CDPL_CHEM_API bool hasHybridizationState(const Atom &atom)
Tells whether the Chem::AtomProperty::HYBRIDIZATION property of the atom atom is set.
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 setRadicalType(Atom &atom, unsigned int type)
Sets the value of the Chem::AtomProperty::RADICAL_TYPE property of the atom atom to type.
CDPL_CHEM_API bool hasMOL2SubstructureName(const Atom &atom)
Tells whether the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property of the atom atom is set.
CDPL_CHEM_API bool getRingFlag(const Atom &atom)
Returns the value of the Chem::AtomProperty::RING_FLAG property of the atom atom.
CDPL_CHEM_API const Math::Vector3DArray::SharedPointer & get3DCoordinatesArray(const Atom &atom)
Returns the value of the Chem::AtomProperty::COORDINATES_3D_ARRAY property of the atom atom.
CDPL_CHEM_API unsigned int calcConfiguration(const Atom &atom, const MolecularGraph &molgraph, const StereoDescriptor &descr, const Math::Vector3DArray &coords)
Calculates the atom configuration from the supplied descriptor and reference atom 3D coordinates.
CDPL_CHEM_API void clearMOL2SubstructureChain(Atom &atom)
Clears the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property of the atom atom.
CDPL_CHEM_API bool hasReactionCenterStatus(const Atom &atom)
Tells whether the Chem::AtomProperty::REACTION_CENTER_STATUS property of the atom atom is set.
CDPL_CHEM_API bool hasCanonicalNumber(const Atom &atom)
Tells whether the Chem::AtomProperty::CANONICAL_NUMBER property of the atom atom is set.
CDPL_CHEM_API bool hasName(const Atom &atom)
Tells whether the Chem::AtomProperty::NAME property of the atom atom is set.
CDPL_CHEM_API std::size_t getMorganNumber(const Atom &atom)
Returns the value of the Chem::AtomProperty::MORGAN_NUMBER property of the atom atom.
CDPL_CHEM_API void setSybylType(Atom &atom, unsigned int type)
Sets the value of the Chem::AtomProperty::SYBYL_TYPE property of the atom atom to type.
CDPL_CHEM_API void setMDLParity(Atom &atom, unsigned int parity)
Sets the value of the Chem::AtomProperty::MDL_PARITY property of the atom atom to parity.
CDPL_CHEM_API void clearStereoCenterFlag(Atom &atom)
Clears the value of the Chem::AtomProperty::STEREO_CENTER_FLAG property of the atom atom.
CDPL_CHEM_API void clearMOL2Name(Atom &atom)
Clears the value of the Chem::AtomProperty::MOL2_NAME property of the atom atom.
CDPL_CHEM_API void clearReactionCenterStatus(Atom &atom)
Clears the value of the Chem::AtomProperty::REACTION_CENTER_STATUS property of the atom atom.
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 void clearCIPConfiguration(Atom &atom)
Clears the value of the Chem::AtomProperty::CIP_CONFIGURATION property of the atom atom.
CDPL_CHEM_API std::size_t getNumContainingFragments(const Atom &atom, const FragmentList &frag_list)
Returns the number of fragments in frag_list that contain the atom atom.
CDPL_CHEM_API bool hasMDLStereoCareFlag(const Atom &atom)
Tells whether the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property of the atom atom is set.
CDPL_CHEM_API void get2DCoordinates(const AtomContainer &cntnr, Math::Vector2DArray &coords, bool append=false)
Extracts the 2D coordinates of all atoms in cntnr into coords.
CDPL_CHEM_API std::size_t getCIPPriority(const Atom &atom)
Returns the value of the Chem::AtomProperty::CIP_PRIORITY property of the atom atom.
CDPL_CHEM_API bool hasMOL2SubstructureSubtype(const Atom &atom)
Tells whether the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property of the atom atom is set.
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 bool hasStereoCenterFlag(const Atom &atom)
Tells whether the Chem::AtomProperty::STEREO_CENTER_FLAG property of the atom atom is set.
CDPL_CHEM_API void clearType(Atom &atom)
Clears the value of the Chem::AtomProperty::TYPE property of the atom atom.
CDPL_CHEM_API bool has3DCoordinatesArray(const Atom &atom)
Tells whether the Chem::AtomProperty::COORDINATES_3D_ARRAY property of the atom atom is set.
CDPL_CHEM_API void setMOL2Charge(Atom &atom, double charge)
Sets the value of the Chem::AtomProperty::MOL2_CHARGE property of the atom atom to charge.
CDPL_CHEM_API void clear3DCoordinatesArray(Atom &atom)
Clears the value of the Chem::AtomProperty::COORDINATES_3D_ARRAY property of the atom atom.
CDPL_CHEM_API bool hasAtomMappingID(const Atom &atom)
Tells whether the Chem::AtomProperty::ATOM_MAPPING_ID property of the atom atom is set.
CDPL_CHEM_API void setMOL2SubstructureID(Atom &atom, std::size_t id)
Sets the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property of the atom atom to id.
CDPL_CHEM_API void clearMorganNumber(Atom &atom)
Clears the value of the Chem::AtomProperty::MORGAN_NUMBER property of the atom atom.
CDPL_CHEM_API unsigned int perceiveSybylType(const Atom &atom, const MolecularGraph &molgraph)
Derives the Sybyl MOL2 atom type of the atom atom in the molecular graph molgraph.
CDPL_CHEM_API void setMOL2SubstructureName(Atom &atom, const std::string &id)
Sets the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property of the atom atom to id.
CDPL_CHEM_API void clearStereoDescriptor(Atom &atom)
Clears the value of the Chem::AtomProperty::STEREO_DESCRIPTOR property of the atom atom.
CDPL_CHEM_API void setHybridizationState(Atom &atom, unsigned int state)
Sets the value of the Chem::AtomProperty::HYBRIDIZATION property of the atom atom to state.
CDPL_CHEM_API unsigned int getSybylType(const Atom &atom)
Returns the value of the Chem::AtomProperty::SYBYL_TYPE property of the atom atom.
CDPL_CHEM_API void setMorganNumber(Atom &atom, std::size_t num)
Sets the value of the Chem::AtomProperty::MORGAN_NUMBER property of the atom atom to num.
CDPL_CHEM_API std::size_t calcImplicitHydrogenCount(const Atom &atom, const MolecularGraph &molgraph)
Computes the implicit hydrogen count of the atom atom from its connectivity in the molecular graph mo...
CDPL_CHEM_API void clearMDLParity(Atom &atom)
Clears the value of the Chem::AtomProperty::MDL_PARITY property of the atom atom.
CDPL_CHEM_API bool hasCIPConfiguration(const Atom &atom)
Tells whether the Chem::AtomProperty::CIP_CONFIGURATION property of the atom atom is set.
CDPL_CHEM_API std::size_t getSizeOfLargestContainingFragment(const Atom &atom, const FragmentList &frag_list)
Returns the size (in atoms) of the largest fragment in frag_list that contains the atom atom.
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 std::size_t getComponentGroupID(const Atom &atom)
Returns the value of the Chem::AtomProperty::COMPONENT_GROUP_ID property of the atom atom.
CDPL_CHEM_API void setAromaticityFlag(Atom &atom, bool aromatic)
Sets the value of the Chem::AtomProperty::AROMATICITY_FLAG property of the atom atom to aromatic.
CDPL_CHEM_API void markReachableAtoms(const Atom &atom, const MolecularGraph &molgraph, Util::BitSet &atom_mask, bool reset=true)
Sets bits in atom_mask for every atom of the molecular graph molgraph that is reachable from the atom...
CDPL_CHEM_API long calcFormalCharge(const Atom &atom, const MolecularGraph &molgraph)
Computes the formal charge of the atom atom from its connectivity in the molecular graph molgraph.
CDPL_CHEM_API unsigned int getMDLParity(const Atom &atom)
Returns the value of the Chem::AtomProperty::MDL_PARITY property of the atom atom.
CDPL_CHEM_API void setStereoCenterFlag(Atom &atom, bool is_center)
Sets the value of the Chem::AtomProperty::STEREO_CENTER_FLAG property of the atom atom to is_center.
CDPL_CHEM_API void clearMDLStereoCareFlag(Atom &atom)
Clears the value of the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property of the atom atom.
std::size_t getConnectedAtoms(AtomType &atom, const MolecularGraph &molgraph, OutputIterator it, AtomType *excl_atom=0)
Writes every neighbor of the atom atom that is connected by a bond belonging to the molecular graph m...
Definition: Chem/AtomFunctions.hpp:1255
CDPL_CHEM_API void setMDLStereoCareFlag(Atom &atom, bool flag)
Sets the value of the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property of the atom atom to flag.
CDPL_CHEM_API void setCIPConfiguration(Atom &atom, unsigned int config)
Sets the value of the Chem::AtomProperty::CIP_CONFIGURATION property of the atom atom to config.
CDPL_CHEM_API void clearMOL2Charge(Atom &atom)
Clears the value of the Chem::AtomProperty::MOL2_CHARGE property of the atom atom.
CDPL_CHEM_API StereoDescriptor calcStereoDescriptor(const Atom &atom, const MolecularGraph &molgraph, std::size_t dim=1)
Computes the stereo descriptor for the atom atom in the molecular graph molgraph.
CDPL_CHEM_API void setReactionCenterStatus(Atom &atom, unsigned int status)
Sets the value of the Chem::AtomProperty::REACTION_CENTER_STATUS property of the atom atom to status.
CDPL_CHEM_API const StereoDescriptor & getStereoDescriptor(const Atom &atom)
Returns the value of the Chem::AtomProperty::STEREO_DESCRIPTOR property of the atom atom.
CDPL_CHEM_API void clearCanonicalNumber(Atom &atom)
Clears the value of the Chem::AtomProperty::CANONICAL_NUMBER property of the atom atom.
CDPL_CHEM_API void generateMatchExpressionString(const Atom &atom, const MolecularGraph &molgraph, std::string &expr_str)
Generates a textual representation of the match expression resulting from the match constraint list a...
CDPL_CHEM_API unsigned int getRadicalType(const Atom &atom)
Returns the value of the Chem::AtomProperty::RADICAL_TYPE property of the atom atom.
CDPL_CHEM_API const std::string & getMOL2SubstructureName(const Atom &atom)
Returns the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property of the atom atom.
CDPL_CHEM_API void clearMOL2SubstructureID(Atom &atom)
Clears the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property of the atom atom.
CDPL_CHEM_API void clearAromaticityFlag(Atom &atom)
Clears the value of the Chem::AtomProperty::AROMATICITY_FLAG property of the atom atom.
CDPL_CHEM_API void clearRadicalType(Atom &atom)
Clears the value of the Chem::AtomProperty::RADICAL_TYPE property of the atom atom.
CDPL_CHEM_API void setUnpairedElectronCount(Atom &atom, std::size_t count)
Sets the value of the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property of the atom atom to count.
CDPL_CHEM_API bool isStereoCenter(const Atom &atom, const MolecularGraph &molgraph, 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)
Tells whether the atom atom qualifies as a stereo center in the context of the molecular graph molgra...
CDPL_CHEM_API bool hasMOL2Name(const Atom &atom)
Tells whether the Chem::AtomProperty::MOL2_NAME property of the atom atom is set.
CDPL_CHEM_API void setAtomMappingID(Atom &atom, std::size_t id)
Sets the value of the Chem::AtomProperty::ATOM_MAPPING_ID property of the atom atom to id.
CDPL_CHEM_API StereoDescriptor calcStereoDescriptorFromMDLParity(const Atom &atom, const MolecularGraph &molgraph)
Calculates the stereo descriptor of the atom atom from its MDL parity in the molecular graph molgraph...
CDPL_CHEM_API void clearSybylType(Atom &atom)
Clears the value of the Chem::AtomProperty::SYBYL_TYPE property of the atom atom.
CDPL_CHEM_API void setIsotope(Atom &atom, std::size_t isotope)
Sets the value of the Chem::AtomProperty::ISOTOPE property of the atom atom to isotope.
CDPL_CHEM_API void setCIPPriority(Atom &atom, std::size_t priority)
Sets the value of the Chem::AtomProperty::CIP_PRIORITY property of the atom atom to priority.
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 unsigned int getType(const Atom &atom)
Returns the value of the Chem::AtomProperty::TYPE property of the atom atom.
CDPL_CHEM_API bool has2DCoordinates(const Atom &atom)
Tells whether the Chem::AtomProperty::COORDINATES_2D property of the atom atom is set.
CDPL_CHEM_API std::size_t getImplicitHydrogenCount(const Atom &atom)
Returns the value of the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property of the atom atom.
CDPL_CHEM_API const std::string & getMOL2SubstructureSubtype(const Atom &atom)
Returns the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property of the atom atom.
CDPL_CHEM_API void clearAtomMappingID(Atom &atom)
Clears the value of the Chem::AtomProperty::ATOM_MAPPING_ID property of the atom atom.
CDPL_CHEM_API bool hasMorganNumber(const Atom &atom)
Tells whether the Chem::AtomProperty::MORGAN_NUMBER property of the atom atom is set.
CDPL_CHEM_API void clearIsotope(Atom &atom)
Clears the value of the Chem::AtomProperty::ISOTOPE property of the atom atom.
CDPL_CHEM_API void setStereoDescriptor(Atom &atom, const StereoDescriptor &descr)
Sets the value of the Chem::AtomProperty::STEREO_DESCRIPTOR property of the atom atom to descr.
CDPL_CHEM_API const std::string & getMatchExpressionString(const Atom &atom)
Returns the value of the Chem::AtomProperty::MATCH_EXPRESSION_STRING property of the atom atom.
CDPL_CHEM_API bool hasMatchExpressionString(const Atom &atom)
Tells whether the Chem::AtomProperty::MATCH_EXPRESSION_STRING property of the atom atom is set.
CDPL_CHEM_API const Math::Vector3D & getConformer3DCoordinates(const Atom &atom, std::size_t conf_idx)
Returns the 3D coordinates of the atom atom in the conformer with index conf_idx.
CDPL_CHEM_API void clearSymbol(Atom &atom)
Clears the value of the Chem::AtomProperty::SYMBOL property of the atom atom.
CDPL_CHEM_API void clearHybridizationState(Atom &atom)
Clears the value of the Chem::AtomProperty::HYBRIDIZATION property of the atom atom.
CDPL_CHEM_API bool hasRingFlag(const Atom &atom)
Tells whether the Chem::AtomProperty::RING_FLAG property of the atom atom is set.
CDPL_CHEM_API bool hasComponentGroupID(const Atom &atom)
Tells whether the Chem::AtomProperty::COMPONENT_GROUP_ID property of the atom atom is set.
CDPL_CHEM_API std::size_t getUnpairedElectronCount(const Atom &atom)
Returns the value of the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property of the atom atom.
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 std::size_t getCanonicalNumber(const Atom &atom)
Returns the value of the Chem::AtomProperty::CANONICAL_NUMBER property of the atom atom.
CDPL_CHEM_API void clearUnpairedElectronCount(Atom &atom)
Clears the value of the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property of the atom atom.
CDPL_CHEM_API bool hasType(const Atom &atom)
Tells whether the Chem::AtomProperty::TYPE property of the atom atom is set.
CDPL_CHEM_API bool hasMOL2SubstructureID(const Atom &atom)
Tells whether the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property of the atom atom is set.
CDPL_CHEM_API unsigned int getHybridizationState(const Atom &atom)
Returns the value of the Chem::AtomProperty::HYBRIDIZATION property of the atom atom.
CDPL_CHEM_API void setMOL2SubstructureChain(Atom &atom, const std::string &chain)
Sets the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property of the atom atom to chain.
CDPL_CHEM_API bool hasStereoDescriptor(const Atom &atom)
Tells whether the Chem::AtomProperty::STEREO_DESCRIPTOR property of the atom atom is set.
CDPL_CHEM_API void clearMOL2SubstructureSubtype(Atom &atom)
Clears the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property of the atom atom.
CDPL_CHEM_API void clearName(Atom &atom)
Clears the value of the Chem::AtomProperty::NAME property of the atom atom.
CDPL_CHEM_API void setSymmetryClass(Atom &atom, std::size_t class_id)
Sets the value of the Chem::AtomProperty::SYMMETRY_CLASS property of the atom atom to class_id.
CDPL_CHEM_API void set3DCoordinatesArray(Atom &atom, const Math::Vector3DArray::SharedPointer &coords_array)
Sets the value of the Chem::AtomProperty::COORDINATES_3D_ARRAY property of the atom atom to coords_ar...
CDPL_CHEM_API const std::string & getSymbol(const Atom &atom)
Returns the value of the Chem::AtomProperty::SYMBOL property of the atom atom.
CDPL_CHEM_API bool hasRadicalType(const Atom &atom)
Tells whether the Chem::AtomProperty::RADICAL_TYPE property of the atom atom is set.
CDPL_CHEM_API void set2DCoordinates(AtomContainer &cntnr, const Math::Vector2DArray &coords)
Writes the 2D coordinates in coords back to the corresponding atoms of cntnr.
CDPL_CHEM_API void clearComponentGroupID(Atom &atom)
Clears the value of the Chem::AtomProperty::COMPONENT_GROUP_ID property of the atom atom.
CDPL_CHEM_API void setMOL2SubstructureSubtype(Atom &atom, const std::string &subtype)
Sets the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property of the atom atom to subt...
CDPL_CHEM_API void clearMatchConstraints(Atom &atom)
Clears the value of the Chem::AtomProperty::MATCH_CONSTRAINTS property of the atom atom.
CDPL_CHEM_API unsigned int getGenericType(const Atom &atom)
Returns the generic atom type associated with numeric type property of the atom atom.
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 bool hasUnpairedElectronCount(const Atom &atom)
Tells whether the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property of the atom atom is set.
CDPL_CHEM_API unsigned int perceiveHybridizationState(const Atom &atom, const MolecularGraph &molgraph)
Derives the hybridization state of the atom atom from its connectivity in the molecular graph molgrap...
CDPL_CHEM_API void setImplicitHydrogenCount(Atom &atom, std::size_t count)
Sets the value of the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property of the atom atom to count.
CDPL_CHEM_API bool getStereoCenterFlag(const Atom &atom)
Returns the value of the Chem::AtomProperty::STEREO_CENTER_FLAG property of the atom atom.
CDPL_CHEM_API bool getMDLStereoCareFlag(const Atom &atom)
Returns the value of the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property of the atom atom.
CDPL_CHEM_API double getMOL2Charge(const Atom &atom)
Returns the value of the Chem::AtomProperty::MOL2_CHARGE property of the atom atom.
CDPL_CHEM_API bool hasAromaticityFlag(const Atom &atom)
Tells whether the Chem::AtomProperty::AROMATICITY_FLAG property of the atom atom is set.
CDPL_CHEM_API unsigned int getReactionCenterStatus(const Atom &atom)
Returns the value of the Chem::AtomProperty::REACTION_CENTER_STATUS property of the atom atom.
CDPL_CHEM_API void setMatchExpressionString(Atom &atom, const std::string &expr_str)
Sets the value of the Chem::AtomProperty::MATCH_EXPRESSION_STRING property of the atom atom to expr_s...
CDPL_CHEM_API std::size_t getMOL2SubstructureID(const Atom &atom)
Returns the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property of the atom atom.
CDPL_CHEM_API void clearImplicitHydrogenCount(Atom &atom)
Clears the value of the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property of the atom atom.
CDPL_CHEM_API bool isInFragmentOfSize(const Atom &atom, const FragmentList &frag_list, std::size_t size)
Tells whether the atom atom is a member of any fragment in frag_list whose size matches size.
CDPL_CHEM_API void setComponentGroupID(Atom &atom, std::size_t id)
Sets the value of the Chem::AtomProperty::COMPONENT_GROUP_ID property of the atom atom to id.
CDPL_CHEM_API void setFormalCharge(Atom &atom, long charge)
Sets the value of the Chem::AtomProperty::FORMAL_CHARGE property of the atom atom to charge.
CDPL_CHEM_API void setType(Atom &atom, unsigned int type)
Sets the value of the Chem::AtomProperty::TYPE property of the atom atom to type.
CDPL_CHEM_API unsigned int calcMDLParity(const Atom &atom, const MolecularGraph &molgraph)
Calculates the MDL parity of the atom atom in the molecular graph molgraph.
CDPL_CHEM_API void clearCIPPriority(Atom &atom)
Clears the value of the Chem::AtomProperty::CIP_PRIORITY property of the atom atom.
CDPL_CHEM_API std::size_t getAtomMappingID(const Atom &atom)
Returns the value of the Chem::AtomProperty::ATOM_MAPPING_ID property of the atom atom.
CDPL_CHEM_API const std::string & getSymbolForType(const Atom &atom)
Returns the symbol that corresponds to the numeric type property of the atom atom.
CDPL_CHEM_API void clearMatchExpressionString(Atom &atom)
Clears the value of the Chem::AtomProperty::MATCH_EXPRESSION_STRING property of the atom atom.
CDPL_CHEM_API void clearMOL2SubstructureName(Atom &atom)
Clears the value of the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property of the atom atom.
CDPL_CHEM_API std::size_t getIsotope(const Atom &atom)
Returns the value of the Chem::AtomProperty::ISOTOPE property of the atom atom.
CDPL_CHEM_API bool hasSybylType(const Atom &atom)
Tells whether the Chem::AtomProperty::SYBYL_TYPE property of the atom atom is set.
CDPL_CHEM_API void setMOL2Name(Atom &atom, const std::string &name)
Sets the value of the Chem::AtomProperty::MOL2_NAME property of the atom atom to name.
CDPL_CHEM_API std::size_t getTopologicalDistance(const Atom &atom1, const Atom &atom2, const MolecularGraph &molgraph)
Returns the topological distance between the two atoms in the molecular graph molgraph.
CDPL_CHEM_API bool hasImplicitHydrogenCount(const Atom &atom)
Tells whether the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property of the atom atom is set.
CDPL_CHEM_API unsigned int getCIPConfiguration(const Atom &atom)
Returns the value of the Chem::AtomProperty::CIP_CONFIGURATION property of the atom atom.
CDPL_CHEM_API const std::string & getMOL2Name(const Atom &atom)
Returns the value of the Chem::AtomProperty::MOL2_NAME property of the atom atom.
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.
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:87
CVector< double, 2 > Vector2D
Bounded 2 element vector holding floating-point values of type double.
Definition: Vector.hpp:3213
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating-point values of type double.
Definition: Vector.hpp:3218
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.