RDKit
Open-source cheminformatics and machine learning.
MolDescriptors.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2021 Greg Landrum and other RDKit contributors
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 
11 #include <RDGeneral/export.h>
12 #ifndef RD_MOLDESCRIPTORS_H
13 #define RD_MOLDESCRIPTORS_H
14 
21 
22 namespace RDKit {
23 class ROMol;
24 namespace Descriptors {
25 /*!
26  Calculates a molecule's average molecular weight
27 
28  \param mol the molecule of interest
29  \param onlyHeavy (optional) if this is true (the default is false),
30  only heavy atoms will be included in the MW calculation
31 
32  \return the AMW
33 */
34 RDKIT_DESCRIPTORS_EXPORT extern const std::string amwVersion;
36  bool onlyHeavy = false);
37 /*!
38  Calculates a molecule's number of heavy (non-hydrogen) atoms
39 
40  \param mol the molecule of interest
41 
42  \return the number of heavy atoms
43 */
44 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumHeavyAtomsVersion;
46 /*!
47  Calculates a molecule's number of atoms
48 
49  \param mol the molecule of interest
50 
51  \return the number of atoms
52 */
53 RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAtomsVersion;
54 RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAtoms(const ROMol &mol);
55 /*!
56  Calculates a molecule's exact molecular weight
57 
58  \param mol the molecule of interest
59  \param onlyHeavy (optional) if this is true (the default is false),
60  only heavy atoms will be included in the MW calculation
61 
62  \return the exact MW
63 */
64 RDKIT_DESCRIPTORS_EXPORT extern const std::string exactmwVersion;
66  bool onlyHeavy = false);
67 /*!
68  Calculates a molecule's formula
69 
70  \param mol the molecule of interest
71  \param separateIsotopes if true, isotopes will show up separately in the
72  formula. So C[13CH2]O will give the formula: C[13C]H6O
73  \param abbreviateHIsotopes if true, 2H and 3H will be represented as
74  D and T instead of [2H] and [3H]. This only applies if \c separateIsotopes
75  is true
76 
77  \return the formula as a string
78 */
80  const ROMol &mol, bool separateIsotopes = false,
81  bool abbreviateHIsotopes = true);
82 
83 } // end of namespace Descriptors
84 } // end of namespace RDKit
85 
86 #endif
Use MolDescriptors.h in client code.
Use MolDescriptors.h in client code.
Contains Lipinski and Lipinski-like descriptors. Use MolDescriptors.h in client code.
Use MolDescriptors.h in client code.
Use MolDescriptors.h in client code.
#define RDKIT_DESCRIPTORS_EXPORT
Definition: export.h:105
RDKIT_DESCRIPTORS_EXPORT const std::string NumAtomsVersion
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHeavyAtoms(const ROMol &mol)
RDKIT_DESCRIPTORS_EXPORT const std::string NumHeavyAtomsVersion
RDKIT_DESCRIPTORS_EXPORT double calcExactMW(const ROMol &mol, bool onlyHeavy=false)
RDKIT_DESCRIPTORS_EXPORT double calcAMW(const ROMol &mol, bool onlyHeavy=false)
RDKIT_DESCRIPTORS_EXPORT std::string calcMolFormula(const ROMol &mol, bool separateIsotopes=false, bool abbreviateHIsotopes=true)
RDKIT_DESCRIPTORS_EXPORT const std::string exactmwVersion
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAtoms(const ROMol &mol)
RDKIT_DESCRIPTORS_EXPORT const std::string amwVersion
Std stuff.
Definition: Abbreviations.h:18