rdkit.Chem.rdchem module¶
Module contents¶
Module containing the core chemistry functionality of the RDKit
-
class
rdkit.Chem.rdchem.Atom¶ Bases:
Boost.Python.instanceThe class to store Atoms. Note that, though it is possible to create one, having an Atom on its own (i.e not associated with a molecule) is not particularly useful.
-
ClearProp((Atom)arg1, (str)arg2) → None :¶ Removes a particular property from an Atom (does nothing if not already set).
- ARGUMENTS:
- key: the name of the property to be removed.
- C++ signature :
- void ClearProp(RDKit::Atom const*,char const*)
-
DescribeQuery((Atom)arg1) → str :¶ returns a text description of the query. Primarily intended for debugging purposes.
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > DescribeQuery(RDKit::Atom const*)
-
GetAtomMapNum((Atom)arg1) → int :¶ Gets the atoms map number, returns 0 if not set
- C++ signature :
- int GetAtomMapNum(RDKit::Atom {lvalue})
-
GetAtomicNum((Atom)arg1) → int :¶ Returns the atomic number.
- C++ signature :
- int GetAtomicNum(RDKit::Atom {lvalue})
-
GetBonds((Atom)arg1) → tuple :¶ Returns a read-only sequence of the atom’s bonds
- C++ signature :
- boost::python::tuple GetBonds(RDKit::Atom*)
-
GetBoolProp((Atom)arg1, (str)arg2) → bool :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (a bool).
RETURNS: a bool
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- bool GetBoolProp(RDKit::Atom*,char const*)
-
GetChiralTag((Atom)arg1) → ChiralType :¶ - C++ signature :
- RDKit::Atom::ChiralType GetChiralTag(RDKit::Atom {lvalue})
-
GetDegree((Atom)arg1) → int :¶ Returns the degree of the atom in the molecule.
The degree of an atom is defined to be its number of directly-bonded neighbors. The degree is independent of bond orders, but is dependent
on whether or not Hs are explicit in the graph.- C++ signature :
- unsigned int GetDegree(RDKit::Atom {lvalue})
-
GetDoubleProp((Atom)arg1, (str)arg2) → float :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (a double).
RETURNS: a double
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- double GetDoubleProp(RDKit::Atom*,char const*)
-
GetExplicitValence((Atom)arg1) → int :¶ Returns the explicit valence of the atom.
- C++ signature :
- int GetExplicitValence(RDKit::Atom {lvalue})
-
GetFormalCharge((Atom)arg1) → int :¶ - C++ signature :
- int GetFormalCharge(RDKit::Atom {lvalue})
-
GetHybridization((Atom)arg1) → HybridizationType :¶ Returns the atom’s hybridization.
- C++ signature :
- RDKit::Atom::HybridizationType GetHybridization(RDKit::Atom {lvalue})
-
GetIdx((Atom)arg1) → int :¶ Returns the atom’s index (ordering in the molecule)
- C++ signature :
- unsigned int GetIdx(RDKit::Atom {lvalue})
-
GetImplicitValence((Atom)arg1) → int :¶ Returns the number of implicit Hs on the atom.
- C++ signature :
- int GetImplicitValence(RDKit::Atom {lvalue})
-
GetIntProp((Atom)arg1, (str)arg2) → int :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (an int).
RETURNS: an int
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- int GetIntProp(RDKit::Atom*,char const*)
-
GetIsAromatic((Atom)arg1) → bool :¶ - C++ signature :
- bool GetIsAromatic(RDKit::Atom {lvalue})
-
GetIsotope((Atom)arg1) → int :¶ - C++ signature :
- unsigned int GetIsotope(RDKit::Atom {lvalue})
-
GetMass((Atom)arg1) → float :¶ - C++ signature :
- double GetMass(RDKit::Atom {lvalue})
-
GetMonomerInfo((Atom)arg1) → AtomMonomerInfo :¶ Returns the atom’s MonomerInfo object, if there is one.
- C++ signature :
- RDKit::AtomMonomerInfo* GetMonomerInfo(RDKit::Atom*)
-
GetNeighbors((Atom)arg1) → tuple :¶ Returns a read-only sequence of the atom’s neighbors
- C++ signature :
- boost::python::tuple GetNeighbors(RDKit::Atom*)
-
GetNoImplicit((Atom)arg1) → bool :¶ Returns whether or not the atom is allowed to have implicit Hs.
- C++ signature :
- bool GetNoImplicit(RDKit::Atom {lvalue})
-
GetNumExplicitHs((Atom)arg1) → int :¶ - C++ signature :
- unsigned int GetNumExplicitHs(RDKit::Atom {lvalue})
-
GetNumImplicitHs((Atom)arg1) → int :¶ Returns the total number of implicit Hs on the atom.
- C++ signature :
- unsigned int GetNumImplicitHs(RDKit::Atom {lvalue})
-
GetNumRadicalElectrons((Atom)arg1) → int :¶ - C++ signature :
- unsigned int GetNumRadicalElectrons(RDKit::Atom {lvalue})
-
GetOwningMol((Atom)arg1) → Mol :¶ Returns the Mol that owns this atom.
- C++ signature :
- RDKit::ROMol {lvalue} GetOwningMol(RDKit::Atom {lvalue})
-
GetPDBResidueInfo((Atom)arg1) → AtomPDBResidueInfo :¶ Returns the atom’s MonomerInfo object, if there is one.
- C++ signature :
- RDKit::AtomPDBResidueInfo* GetPDBResidueInfo(RDKit::Atom*)
-
GetProp((Atom)arg1, (str)arg2) → str :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (a string).
RETURNS: a string
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetProp(RDKit::Atom*,char const*)
-
GetPropNames((Atom)self[, (bool)includePrivate=False[, (bool)includeComputed=False]]) → _vectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE :¶ Returns a list of the properties set on the Atom.
- C++ signature :
- std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > GetPropNames(RDKit::Atom {lvalue} [,bool=False [,bool=False]])
-
GetPropsAsDict((Atom)self[, (bool)includePrivate=True[, (bool)includeComputed=True]]) → dict :¶ - Returns a dictionary of the properties set on the Atom.
- n.b. some properties cannot be converted to python types.
- C++ signature :
- boost::python::dict GetPropsAsDict(RDKit::Atom [,bool=True [,bool=True]])
-
GetSmarts((Atom)arg1) → str :¶ returns the SMARTS (or SMILES) string for an Atom
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetSmarts(RDKit::Atom const*)
-
GetSymbol((Atom)arg1) → str :¶ Returns the atomic symbol (a string)
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetSymbol(RDKit::Atom {lvalue})
-
GetTotalDegree((Atom)arg1) → int :¶ Returns the degree of the atom in the molecule including Hs.
The degree of an atom is defined to be its number of directly-bonded neighbors. The degree is independent of bond orders.- C++ signature :
- unsigned int GetTotalDegree(RDKit::Atom {lvalue})
-
GetTotalNumHs((Atom)self[, (bool)includeNeighbors=False]) → int :¶ Returns the total number of Hs (explicit and implicit) on the atom.
ARGUMENTS:
- includeNeighbors: (optional) toggles inclusion of neighboring H atoms in the sum. Defaults to 0.
- C++ signature :
- unsigned int GetTotalNumHs(RDKit::Atom {lvalue} [,bool=False])
-
GetTotalValence((Atom)arg1) → int :¶ Returns the total valence (explicit + implicit) of the atom.
- C++ signature :
- unsigned int GetTotalValence(RDKit::Atom {lvalue})
-
GetUnsignedProp((Atom)arg1, (str)arg2) → int :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (an unsigned integer).
RETURNS: an integer (Python has no unsigned type)
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- unsigned int GetUnsignedProp(RDKit::Atom*,char const*)
-
HasProp((Atom)arg1, (str)arg2) → int :¶ Queries a Atom to see if a particular property has been assigned.
- ARGUMENTS:
- key: the name of the property to check for (a string).
- C++ signature :
- int HasProp(RDKit::Atom const*,char const*)
-
HasQuery((Atom)arg1) → bool :¶ Returns whether or not the atom has an associated query
- C++ signature :
- bool HasQuery(RDKit::Atom {lvalue})
-
InvertChirality((Atom)arg1) → None :¶ - C++ signature :
- void InvertChirality(RDKit::Atom {lvalue})
-
IsInRing((Atom)arg1) → bool :¶ Returns whether or not the atom is in a ring
- C++ signature :
- bool IsInRing(RDKit::Atom const*)
-
IsInRingSize((Atom)arg1, (int)arg2) → bool :¶ Returns whether or not the atom is in a ring of a particular size.
- ARGUMENTS:
- size: the ring size to look for
- C++ signature :
- bool IsInRingSize(RDKit::Atom const*,int)
-
Match((Atom)arg1, (Atom)arg2) → bool :¶ Returns whether or not this atom matches another Atom.
Each Atom (or query Atom) has a query function which is used for this type of matching.
- ARGUMENTS:
- other: the other Atom to which to compare
- C++ signature :
- bool Match(RDKit::Atom {lvalue},RDKit::Atom const*)
-
NeedsUpdatePropertyCache((Atom)self) → bool :¶ Returns true or false depending on whether implicit and explicit valence of the molecule have already been calculated.
- C++ signature :
- bool NeedsUpdatePropertyCache(RDKit::Atom {lvalue})
-
SetAtomMapNum((Atom)self, (int)mapno[, (bool)strict=False]) → None :¶ Sets the atoms map number, a value of 0 clears the atom map
- C++ signature :
- void SetAtomMapNum(RDKit::Atom {lvalue},int [,bool=False])
-
SetAtomicNum((Atom)arg1, (int)arg2) → None :¶ Sets the atomic number, takes an integer value as an argument
- C++ signature :
- void SetAtomicNum(RDKit::Atom {lvalue},int)
-
SetBoolProp((Atom)self, (str)key, (bool)val) → None :¶ Sets an atomic property
- ARGUMENTS:
- key: the name of the property to be set (a bool).
- value: the property value (a bool).
- C++ signature :
- void SetBoolProp(RDKit::Atom const*,char const*,bool)
-
SetChiralTag((Atom)arg1, (ChiralType)arg2) → None :¶ - C++ signature :
- void SetChiralTag(RDKit::Atom {lvalue},RDKit::Atom::ChiralType)
-
SetDoubleProp((Atom)self, (str)key, (float)val) → None :¶ Sets an atomic property
- ARGUMENTS:
- key: the name of the property to be set (a double).
- value: the property value (a double).
- C++ signature :
- void SetDoubleProp(RDKit::Atom const*,char const*,double)
-
SetFormalCharge((Atom)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetFormalCharge(RDKit::Atom {lvalue},int)
-
SetHybridization((Atom)arg1, (HybridizationType)arg2) → None :¶ - Sets the hybridization of the atom.
- The argument should be a HybridizationType
- C++ signature :
- void SetHybridization(RDKit::Atom {lvalue},RDKit::Atom::HybridizationType)
-
SetIntProp((Atom)self, (str)key, (int)val) → None :¶ Sets an atomic property
- ARGUMENTS:
- key: the name of the property to be set (a int).
- value: the property value (a int).
- C++ signature :
- void SetIntProp(RDKit::Atom const*,char const*,int)
-
SetIsAromatic((Atom)arg1, (bool)arg2) → None :¶ - C++ signature :
- void SetIsAromatic(RDKit::Atom {lvalue},bool)
-
SetIsotope((Atom)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetIsotope(RDKit::Atom {lvalue},unsigned int)
-
SetMonomerInfo((Atom)arg1, (AtomMonomerInfo)arg2) → None :¶ Sets the atom’s MonomerInfo object.
- C++ signature :
- void SetMonomerInfo(RDKit::Atom*,RDKit::AtomMonomerInfo const*)
-
SetNoImplicit((Atom)arg1, (bool)arg2) → None :¶ - Sets a marker on the atom that disallows implicit Hs.
- This holds even if the atom would otherwise have implicit Hs added.
- C++ signature :
- void SetNoImplicit(RDKit::Atom {lvalue},bool)
-
SetNumExplicitHs((Atom)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetNumExplicitHs(RDKit::Atom {lvalue},unsigned int)
-
SetNumRadicalElectrons((Atom)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetNumRadicalElectrons(RDKit::Atom {lvalue},unsigned int)
-
SetProp((Atom)self, (str)key, (str)val) → None :¶ Sets an atomic property
- ARGUMENTS:
- key: the name of the property to be set (a string).
- value: the property value (a string).
- C++ signature :
- void SetProp(RDKit::Atom const*,char const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
SetUnsignedProp((Atom)self, (str)key, (int)val) → None :¶ Sets an atomic property
- ARGUMENTS:
- key: the name of the property to be set (an unsigned integer).
- value: the property value (a int >= 0).
- C++ signature :
- void SetUnsignedProp(RDKit::Atom const*,char const*,unsigned int)
-
UpdatePropertyCache((Atom)self[, (bool)strict=True]) → None :¶ Regenerates computed properties like implicit valence and ring information.
- C++ signature :
- void UpdatePropertyCache(RDKit::Atom {lvalue} [,bool=True])
-
-
class
rdkit.Chem.rdchem.AtomMonomerInfo¶ Bases:
Boost.Python.instanceThe class to store monomer information attached to Atoms
-
GetMonomerType((AtomMonomerInfo)arg1) → AtomMonomerType :¶ - C++ signature :
- RDKit::AtomMonomerInfo::AtomMonomerType GetMonomerType(RDKit::AtomMonomerInfo {lvalue})
-
GetName((AtomMonomerInfo)arg1) → str :¶ - C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetName(RDKit::AtomMonomerInfo {lvalue})
-
SetMonomerType((AtomMonomerInfo)arg1, (AtomMonomerType)arg2) → None :¶ - C++ signature :
- void SetMonomerType(RDKit::AtomMonomerInfo {lvalue},RDKit::AtomMonomerInfo::AtomMonomerType)
-
SetName((AtomMonomerInfo)arg1, (str)arg2) → None :¶ - C++ signature :
- void SetName(RDKit::AtomMonomerInfo {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
-
class
rdkit.Chem.rdchem.AtomMonomerType¶ Bases:
Boost.Python.enum-
OTHER= rdkit.Chem.rdchem.AtomMonomerType.OTHER¶
-
PDBRESIDUE= rdkit.Chem.rdchem.AtomMonomerType.PDBRESIDUE¶
-
UNKNOWN= rdkit.Chem.rdchem.AtomMonomerType.UNKNOWN¶
-
names= {'UNKNOWN': rdkit.Chem.rdchem.AtomMonomerType.UNKNOWN, 'PDBRESIDUE': rdkit.Chem.rdchem.AtomMonomerType.PDBRESIDUE, 'OTHER': rdkit.Chem.rdchem.AtomMonomerType.OTHER}¶
-
values= {0: rdkit.Chem.rdchem.AtomMonomerType.UNKNOWN, 1: rdkit.Chem.rdchem.AtomMonomerType.PDBRESIDUE, 2: rdkit.Chem.rdchem.AtomMonomerType.OTHER}¶
-
-
class
rdkit.Chem.rdchem.AtomPDBResidueInfo¶ Bases:
rdkit.Chem.rdchem.AtomMonomerInfoThe class to store PDB residue information attached to Atoms
-
GetAltLoc((AtomPDBResidueInfo)arg1) → str :¶ - C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetAltLoc(RDKit::AtomPDBResidueInfo {lvalue})
-
GetChainId((AtomPDBResidueInfo)arg1) → str :¶ - C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetChainId(RDKit::AtomPDBResidueInfo {lvalue})
-
GetInsertionCode((AtomPDBResidueInfo)arg1) → str :¶ - C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetInsertionCode(RDKit::AtomPDBResidueInfo {lvalue})
-
GetIsHeteroAtom((AtomPDBResidueInfo)arg1) → bool :¶ - C++ signature :
- bool GetIsHeteroAtom(RDKit::AtomPDBResidueInfo {lvalue})
-
GetOccupancy((AtomPDBResidueInfo)arg1) → float :¶ - C++ signature :
- double GetOccupancy(RDKit::AtomPDBResidueInfo {lvalue})
-
GetResidueName((AtomPDBResidueInfo)arg1) → str :¶ - C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetResidueName(RDKit::AtomPDBResidueInfo {lvalue})
-
GetResidueNumber((AtomPDBResidueInfo)arg1) → int :¶ - C++ signature :
- int GetResidueNumber(RDKit::AtomPDBResidueInfo {lvalue})
-
GetSecondaryStructure((AtomPDBResidueInfo)arg1) → int :¶ - C++ signature :
- unsigned int GetSecondaryStructure(RDKit::AtomPDBResidueInfo {lvalue})
-
GetSegmentNumber((AtomPDBResidueInfo)arg1) → int :¶ - C++ signature :
- unsigned int GetSegmentNumber(RDKit::AtomPDBResidueInfo {lvalue})
-
GetSerialNumber((AtomPDBResidueInfo)arg1) → int :¶ - C++ signature :
- int GetSerialNumber(RDKit::AtomPDBResidueInfo {lvalue})
-
GetTempFactor((AtomPDBResidueInfo)arg1) → float :¶ - C++ signature :
- double GetTempFactor(RDKit::AtomPDBResidueInfo {lvalue})
-
SetAltLoc((AtomPDBResidueInfo)arg1, (str)arg2) → None :¶ - C++ signature :
- void SetAltLoc(RDKit::AtomPDBResidueInfo {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
SetChainId((AtomPDBResidueInfo)arg1, (str)arg2) → None :¶ - C++ signature :
- void SetChainId(RDKit::AtomPDBResidueInfo {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
SetInsertionCode((AtomPDBResidueInfo)arg1, (str)arg2) → None :¶ - C++ signature :
- void SetInsertionCode(RDKit::AtomPDBResidueInfo {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
SetIsHeteroAtom((AtomPDBResidueInfo)arg1, (bool)arg2) → None :¶ - C++ signature :
- void SetIsHeteroAtom(RDKit::AtomPDBResidueInfo {lvalue},bool)
-
SetOccupancy((AtomPDBResidueInfo)arg1, (float)arg2) → None :¶ - C++ signature :
- void SetOccupancy(RDKit::AtomPDBResidueInfo {lvalue},double)
-
SetResidueName((AtomPDBResidueInfo)arg1, (str)arg2) → None :¶ - C++ signature :
- void SetResidueName(RDKit::AtomPDBResidueInfo {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
SetResidueNumber((AtomPDBResidueInfo)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetResidueNumber(RDKit::AtomPDBResidueInfo {lvalue},int)
-
SetSecondaryStructure((AtomPDBResidueInfo)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetSecondaryStructure(RDKit::AtomPDBResidueInfo {lvalue},unsigned int)
-
SetSegmentNumber((AtomPDBResidueInfo)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetSegmentNumber(RDKit::AtomPDBResidueInfo {lvalue},unsigned int)
-
SetSerialNumber((AtomPDBResidueInfo)arg1, (int)arg2) → None :¶ - C++ signature :
- void SetSerialNumber(RDKit::AtomPDBResidueInfo {lvalue},int)
-
SetTempFactor((AtomPDBResidueInfo)arg1, (float)arg2) → None :¶ - C++ signature :
- void SetTempFactor(RDKit::AtomPDBResidueInfo {lvalue},double)
-
-
class
rdkit.Chem.rdchem.Bond¶ Bases:
Boost.Python.instanceThe class to store Bonds. Note: unlike Atoms, is it currently impossible to construct Bonds from Python.
-
ClearProp((Bond)arg1, (str)arg2) → None :¶ Removes a particular property from an Bond (does nothing if not already set).
- ARGUMENTS:
- key: the name of the property to be removed.
- C++ signature :
- void ClearProp(RDKit::Bond const*,char const*)
-
DescribeQuery((Bond)arg1) → str :¶ returns a text description of the query. Primarily intended for debugging purposes.
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > DescribeQuery(RDKit::Bond const*)
-
GetBeginAtom((Bond)arg1) → Atom :¶ Returns the bond’s first atom.
- C++ signature :
- RDKit::Atom* GetBeginAtom(RDKit::Bond {lvalue})
-
GetBeginAtomIdx((Bond)arg1) → int :¶ Returns the index of the bond’s first atom.
- C++ signature :
- unsigned int GetBeginAtomIdx(RDKit::Bond {lvalue})
-
GetBondDir((Bond)arg1) → BondDir :¶ Returns the type of the bond as a BondDir
- C++ signature :
- RDKit::Bond::BondDir GetBondDir(RDKit::Bond {lvalue})
-
GetBondType((Bond)arg1) → BondType :¶ Returns the type of the bond as a BondType
- C++ signature :
- RDKit::Bond::BondType GetBondType(RDKit::Bond {lvalue})
-
GetBondTypeAsDouble((Bond)arg1) → float :¶ Returns the type of the bond as a double (i.e. 1.0 for SINGLE, 1.5 for AROMATIC, 2.0 for DOUBLE)
- C++ signature :
- double GetBondTypeAsDouble(RDKit::Bond {lvalue})
-
GetBoolProp((Bond)arg1, (str)arg2) → bool :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (a boolean).
RETURNS: a boolean
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- bool GetBoolProp(RDKit::Bond*,char const*)
-
GetDoubleProp((Bond)arg1, (str)arg2) → float :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (a double).
RETURNS: a double
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- double GetDoubleProp(RDKit::Bond*,char const*)
-
GetEndAtom((Bond)arg1) → Atom :¶ Returns the bond’s second atom.
- C++ signature :
- RDKit::Atom* GetEndAtom(RDKit::Bond {lvalue})
-
GetEndAtomIdx((Bond)arg1) → int :¶ Returns the index of the bond’s first atom.
- C++ signature :
- unsigned int GetEndAtomIdx(RDKit::Bond {lvalue})
-
GetIdx((Bond)arg1) → int :¶ Returns the bond’s index (ordering in the molecule)
- C++ signature :
- unsigned int GetIdx(RDKit::Bond {lvalue})
-
GetIntProp((Bond)arg1, (str)arg2) → int :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (an int).
RETURNS: an int
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- int GetIntProp(RDKit::Bond*,char const*)
-
GetIsAromatic((Bond)arg1) → bool :¶ - C++ signature :
- bool GetIsAromatic(RDKit::Bond {lvalue})
-
GetIsConjugated((Bond)arg1) → bool :¶ Returns whether or not the bond is considered to be conjugated.
- C++ signature :
- bool GetIsConjugated(RDKit::Bond {lvalue})
-
GetOtherAtom((Bond)arg1, (Atom)arg2) → Atom :¶ Given one of the bond’s atoms, returns the other one.
- C++ signature :
- RDKit::Atom* GetOtherAtom(RDKit::Bond {lvalue},RDKit::Atom const*)
-
GetOtherAtomIdx((Bond)arg1, (int)arg2) → int :¶ Given the index of one of the bond’s atoms, returns the index of the other.
- C++ signature :
- unsigned int GetOtherAtomIdx(RDKit::Bond {lvalue},unsigned int)
-
GetOwningMol((Bond)arg1) → Mol :¶ Returns the Mol that owns this bond.
- C++ signature :
- RDKit::ROMol {lvalue} GetOwningMol(RDKit::Bond {lvalue})
-
GetProp((Bond)arg1, (str)arg2) → str :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (a string).
RETURNS: a string
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetProp(RDKit::Bond*,char const*)
-
GetPropNames((Bond)self[, (bool)includePrivate=False[, (bool)includeComputed=False]]) → _vectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE :¶ Returns a list of the properties set on the Bond.
- C++ signature :
- std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > GetPropNames(RDKit::Bond {lvalue} [,bool=False [,bool=False]])
-
GetPropsAsDict((Bond)self[, (bool)includePrivate=True[, (bool)includeComputed=True]]) → dict :¶ - Returns a dictionary of the properties set on the Bond.
- n.b. some properties cannot be converted to python types.
- C++ signature :
- boost::python::dict GetPropsAsDict(RDKit::Bond [,bool=True [,bool=True]])
-
GetSmarts((Bond)bond[, (bool)allBondsExplicit=False]) → str :¶ returns the SMARTS (or SMILES) string for a Bond
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetSmarts(RDKit::Bond const* [,bool=False])
-
GetStereo((Bond)arg1) → BondStereo :¶ Returns the stereo configuration of the bond as a BondStereo
- C++ signature :
- RDKit::Bond::BondStereo GetStereo(RDKit::Bond {lvalue})
-
GetStereoAtoms((Bond)arg1) → _vecti :¶ Returns the indices of the atoms setting this bond’s stereochemistry.
- C++ signature :
- std::vector<int, std::allocator<int> > GetStereoAtoms(RDKit::Bond const*)
-
GetUnsignedProp((Bond)arg1, (str)arg2) → int :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (an unsigned integer).
RETURNS: an int (Python has no unsigned type)
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- unsigned int GetUnsignedProp(RDKit::Bond*,char const*)
-
GetValenceContrib((Bond)arg1, (Atom)arg2) → float :¶ Returns the contribution of the bond to the valence of an Atom.
ARGUMENTS:
- atom: the Atom to consider.
- C++ signature :
- double GetValenceContrib(RDKit::Bond {lvalue},RDKit::Atom const*)
-
HasProp((Bond)arg1, (str)arg2) → int :¶ Queries a Bond to see if a particular property has been assigned.
- ARGUMENTS:
- key: the name of the property to check for (a string).
- C++ signature :
- int HasProp(RDKit::Bond const*,char const*)
-
HasQuery((Bond)arg1) → bool :¶ Returns whether or not the bond has an associated query
- C++ signature :
- bool HasQuery(RDKit::Bond {lvalue})
-
IsInRing((Bond)arg1) → bool :¶ Returns whether or not the bond is in a ring of any size.
- C++ signature :
- bool IsInRing(RDKit::Bond const*)
-
IsInRingSize((Bond)arg1, (int)arg2) → bool :¶ Returns whether or not the bond is in a ring of a particular size.
- ARGUMENTS:
- size: the ring size to look for
- C++ signature :
- bool IsInRingSize(RDKit::Bond const*,int)
-
Match((Bond)arg1, (Bond)arg2) → bool :¶ Returns whether or not this bond matches another Bond.
Each Bond (or query Bond) has a query function which is used for this type of matching.
- ARGUMENTS:
- other: the other Bond to which to compare
- C++ signature :
- bool Match(RDKit::Bond {lvalue},RDKit::Bond const*)
-
SetBondDir((Bond)arg1, (BondDir)arg2) → None :¶ Set the type of the bond as a BondDir
- C++ signature :
- void SetBondDir(RDKit::Bond {lvalue},RDKit::Bond::BondDir)
-
SetBondType((Bond)arg1, (BondType)arg2) → None :¶ Set the type of the bond as a BondType
- C++ signature :
- void SetBondType(RDKit::Bond {lvalue},RDKit::Bond::BondType)
-
SetBoolProp((Bond)self, (str)key, (bool)val) → None :¶ Sets a bond property
- ARGUMENTS:
- key: the name of the property to be set (a string).
- value: the property value (a boolean).
- C++ signature :
- void SetBoolProp(RDKit::Bond const*,char const*,bool)
-
SetDoubleProp((Bond)self, (str)key, (float)val) → None :¶ Sets a bond property
- ARGUMENTS:
- key: the name of the property to be set (a string).
- value: the property value (a double).
- C++ signature :
- void SetDoubleProp(RDKit::Bond const*,char const*,double)
-
SetIntProp((Bond)self, (str)key, (int)val) → None :¶ Sets a bond property
- ARGUMENTS:
- key: the name of the property to be set (a string).
- value: the property value (an int).
- C++ signature :
- void SetIntProp(RDKit::Bond const*,char const*,int)
-
SetIsAromatic((Bond)arg1, (bool)arg2) → None :¶ - C++ signature :
- void SetIsAromatic(RDKit::Bond {lvalue},bool)
-
SetIsConjugated((Bond)arg1, (bool)arg2) → None :¶ - C++ signature :
- void SetIsConjugated(RDKit::Bond {lvalue},bool)
-
SetProp((Bond)self, (str)key, (str)val) → None :¶ Sets a bond property
- ARGUMENTS:
- key: the name of the property to be set (a string).
- value: the property value (a string).
- C++ signature :
- void SetProp(RDKit::Bond const*,char const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
SetStereo((Bond)arg1, (BondStereo)arg2) → None :¶ Set the stereo configuration of the bond as a BondStereo
- C++ signature :
- void SetStereo(RDKit::Bond {lvalue},RDKit::Bond::BondStereo)
-
SetStereoAtoms((Bond)arg1, (int)arg2, (int)arg3) → None :¶ Set the indices of the atoms setting this bond’s stereochemistry.
- C++ signature :
- void SetStereoAtoms(RDKit::Bond {lvalue},unsigned int,unsigned int)
-
SetUnsignedProp((Bond)self, (str)key, (int)val) → None :¶ Sets a bond property
- ARGUMENTS:
- key: the name of the property to be set (a string).
- value: the property value (an int >= 0).
- C++ signature :
- void SetUnsignedProp(RDKit::Bond const*,char const*,unsigned int)
-
-
class
rdkit.Chem.rdchem.BondDir¶ Bases:
Boost.Python.enum-
BEGINDASH= rdkit.Chem.rdchem.BondDir.BEGINDASH¶
-
BEGINWEDGE= rdkit.Chem.rdchem.BondDir.BEGINWEDGE¶
-
EITHERDOUBLE= rdkit.Chem.rdchem.BondDir.EITHERDOUBLE¶
-
ENDDOWNRIGHT= rdkit.Chem.rdchem.BondDir.ENDDOWNRIGHT¶
-
ENDUPRIGHT= rdkit.Chem.rdchem.BondDir.ENDUPRIGHT¶
-
NONE= rdkit.Chem.rdchem.BondDir.NONE¶
-
UNKNOWN= rdkit.Chem.rdchem.BondDir.UNKNOWN¶
-
names= {'UNKNOWN': rdkit.Chem.rdchem.BondDir.UNKNOWN, 'ENDDOWNRIGHT': rdkit.Chem.rdchem.BondDir.ENDDOWNRIGHT, 'BEGINWEDGE': rdkit.Chem.rdchem.BondDir.BEGINWEDGE, 'ENDUPRIGHT': rdkit.Chem.rdchem.BondDir.ENDUPRIGHT, 'EITHERDOUBLE': rdkit.Chem.rdchem.BondDir.EITHERDOUBLE, 'NONE': rdkit.Chem.rdchem.BondDir.NONE, 'BEGINDASH': rdkit.Chem.rdchem.BondDir.BEGINDASH}¶
-
values= {0: rdkit.Chem.rdchem.BondDir.NONE, 1: rdkit.Chem.rdchem.BondDir.BEGINWEDGE, 2: rdkit.Chem.rdchem.BondDir.BEGINDASH, 3: rdkit.Chem.rdchem.BondDir.ENDDOWNRIGHT, 4: rdkit.Chem.rdchem.BondDir.ENDUPRIGHT, 5: rdkit.Chem.rdchem.BondDir.EITHERDOUBLE, 6: rdkit.Chem.rdchem.BondDir.UNKNOWN}¶
-
-
class
rdkit.Chem.rdchem.BondStereo¶ Bases:
Boost.Python.enum-
STEREOANY= rdkit.Chem.rdchem.BondStereo.STEREOANY¶
-
STEREOCIS= rdkit.Chem.rdchem.BondStereo.STEREOCIS¶
-
STEREOE= rdkit.Chem.rdchem.BondStereo.STEREOE¶
-
STEREONONE= rdkit.Chem.rdchem.BondStereo.STEREONONE¶
-
STEREOTRANS= rdkit.Chem.rdchem.BondStereo.STEREOTRANS¶
-
STEREOZ= rdkit.Chem.rdchem.BondStereo.STEREOZ¶
-
names= {'STEREOANY': rdkit.Chem.rdchem.BondStereo.STEREOANY, 'STEREOZ': rdkit.Chem.rdchem.BondStereo.STEREOZ, 'STEREONONE': rdkit.Chem.rdchem.BondStereo.STEREONONE, 'STEREOCIS': rdkit.Chem.rdchem.BondStereo.STEREOCIS, 'STEREOE': rdkit.Chem.rdchem.BondStereo.STEREOE, 'STEREOTRANS': rdkit.Chem.rdchem.BondStereo.STEREOTRANS}¶
-
values= {0: rdkit.Chem.rdchem.BondStereo.STEREONONE, 1: rdkit.Chem.rdchem.BondStereo.STEREOANY, 2: rdkit.Chem.rdchem.BondStereo.STEREOZ, 3: rdkit.Chem.rdchem.BondStereo.STEREOE, 4: rdkit.Chem.rdchem.BondStereo.STEREOCIS, 5: rdkit.Chem.rdchem.BondStereo.STEREOTRANS}¶
-
-
class
rdkit.Chem.rdchem.BondType¶ Bases:
Boost.Python.enum-
AROMATIC= rdkit.Chem.rdchem.BondType.AROMATIC¶
-
DATIVE= rdkit.Chem.rdchem.BondType.DATIVE¶
-
DATIVEL= rdkit.Chem.rdchem.BondType.DATIVEL¶
-
DATIVEONE= rdkit.Chem.rdchem.BondType.DATIVEONE¶
-
DATIVER= rdkit.Chem.rdchem.BondType.DATIVER¶
-
DOUBLE= rdkit.Chem.rdchem.BondType.DOUBLE¶
-
FIVEANDAHALF= rdkit.Chem.rdchem.BondType.FIVEANDAHALF¶
-
FOURANDAHALF= rdkit.Chem.rdchem.BondType.FOURANDAHALF¶
-
HEXTUPLE= rdkit.Chem.rdchem.BondType.HEXTUPLE¶
-
HYDROGEN= rdkit.Chem.rdchem.BondType.HYDROGEN¶
-
IONIC= rdkit.Chem.rdchem.BondType.IONIC¶
-
ONEANDAHALF= rdkit.Chem.rdchem.BondType.ONEANDAHALF¶
-
OTHER= rdkit.Chem.rdchem.BondType.OTHER¶
-
QUADRUPLE= rdkit.Chem.rdchem.BondType.QUADRUPLE¶
-
QUINTUPLE= rdkit.Chem.rdchem.BondType.QUINTUPLE¶
-
SINGLE= rdkit.Chem.rdchem.BondType.SINGLE¶
-
THREEANDAHALF= rdkit.Chem.rdchem.BondType.THREEANDAHALF¶
-
THREECENTER= rdkit.Chem.rdchem.BondType.THREECENTER¶
-
TRIPLE= rdkit.Chem.rdchem.BondType.TRIPLE¶
-
TWOANDAHALF= rdkit.Chem.rdchem.BondType.TWOANDAHALF¶
-
UNSPECIFIED= rdkit.Chem.rdchem.BondType.UNSPECIFIED¶
-
ZERO= rdkit.Chem.rdchem.BondType.ZERO¶
-
names= {'FOURANDAHALF': rdkit.Chem.rdchem.BondType.FOURANDAHALF, 'DATIVE': rdkit.Chem.rdchem.BondType.DATIVE, 'SINGLE': rdkit.Chem.rdchem.BondType.SINGLE, 'DATIVEONE': rdkit.Chem.rdchem.BondType.DATIVEONE, 'DATIVER': rdkit.Chem.rdchem.BondType.DATIVER, 'UNSPECIFIED': rdkit.Chem.rdchem.BondType.UNSPECIFIED, 'OTHER': rdkit.Chem.rdchem.BondType.OTHER, 'DATIVEL': rdkit.Chem.rdchem.BondType.DATIVEL, 'ONEANDAHALF': rdkit.Chem.rdchem.BondType.ONEANDAHALF, 'HEXTUPLE': rdkit.Chem.rdchem.BondType.HEXTUPLE, 'QUADRUPLE': rdkit.Chem.rdchem.BondType.QUADRUPLE, 'QUINTUPLE': rdkit.Chem.rdchem.BondType.QUINTUPLE, 'DOUBLE': rdkit.Chem.rdchem.BondType.DOUBLE, 'THREECENTER': rdkit.Chem.rdchem.BondType.THREECENTER, 'HYDROGEN': rdkit.Chem.rdchem.BondType.HYDROGEN, 'AROMATIC': rdkit.Chem.rdchem.BondType.AROMATIC, 'IONIC': rdkit.Chem.rdchem.BondType.IONIC, 'ZERO': rdkit.Chem.rdchem.BondType.ZERO, 'THREEANDAHALF': rdkit.Chem.rdchem.BondType.THREEANDAHALF, 'FIVEANDAHALF': rdkit.Chem.rdchem.BondType.FIVEANDAHALF, 'TWOANDAHALF': rdkit.Chem.rdchem.BondType.TWOANDAHALF, 'TRIPLE': rdkit.Chem.rdchem.BondType.TRIPLE}¶
-
values= {0: rdkit.Chem.rdchem.BondType.UNSPECIFIED, 1: rdkit.Chem.rdchem.BondType.SINGLE, 2: rdkit.Chem.rdchem.BondType.DOUBLE, 3: rdkit.Chem.rdchem.BondType.TRIPLE, 4: rdkit.Chem.rdchem.BondType.QUADRUPLE, 5: rdkit.Chem.rdchem.BondType.QUINTUPLE, 6: rdkit.Chem.rdchem.BondType.HEXTUPLE, 7: rdkit.Chem.rdchem.BondType.ONEANDAHALF, 8: rdkit.Chem.rdchem.BondType.TWOANDAHALF, 9: rdkit.Chem.rdchem.BondType.THREEANDAHALF, 10: rdkit.Chem.rdchem.BondType.FOURANDAHALF, 11: rdkit.Chem.rdchem.BondType.FIVEANDAHALF, 12: rdkit.Chem.rdchem.BondType.AROMATIC, 13: rdkit.Chem.rdchem.BondType.IONIC, 14: rdkit.Chem.rdchem.BondType.HYDROGEN, 15: rdkit.Chem.rdchem.BondType.THREECENTER, 16: rdkit.Chem.rdchem.BondType.DATIVEONE, 17: rdkit.Chem.rdchem.BondType.DATIVE, 18: rdkit.Chem.rdchem.BondType.DATIVEL, 19: rdkit.Chem.rdchem.BondType.DATIVER, 20: rdkit.Chem.rdchem.BondType.OTHER, 21: rdkit.Chem.rdchem.BondType.ZERO}¶
-
-
class
rdkit.Chem.rdchem.ChiralType¶ Bases:
Boost.Python.enum-
CHI_OTHER= rdkit.Chem.rdchem.ChiralType.CHI_OTHER¶
-
CHI_TETRAHEDRAL_CCW= rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CCW¶
-
CHI_TETRAHEDRAL_CW= rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CW¶
-
CHI_UNSPECIFIED= rdkit.Chem.rdchem.ChiralType.CHI_UNSPECIFIED¶
-
names= {'CHI_TETRAHEDRAL_CCW': rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CCW, 'CHI_UNSPECIFIED': rdkit.Chem.rdchem.ChiralType.CHI_UNSPECIFIED, 'CHI_OTHER': rdkit.Chem.rdchem.ChiralType.CHI_OTHER, 'CHI_TETRAHEDRAL_CW': rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CW}¶
-
values= {0: rdkit.Chem.rdchem.ChiralType.CHI_UNSPECIFIED, 1: rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CW, 2: rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CCW, 3: rdkit.Chem.rdchem.ChiralType.CHI_OTHER}¶
-
-
class
rdkit.Chem.rdchem.CompositeQueryType¶ Bases:
Boost.Python.enum-
COMPOSITE_AND= rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_AND¶
-
COMPOSITE_OR= rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_OR¶
-
COMPOSITE_XOR= rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_XOR¶
-
names= {'COMPOSITE_XOR': rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_XOR, 'COMPOSITE_OR': rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_OR, 'COMPOSITE_AND': rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_AND}¶
-
values= {0: rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_AND, 1: rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_OR, 2: rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_XOR}¶
-
-
class
rdkit.Chem.rdchem.Conformer¶ Bases:
Boost.Python.instanceThe class to store 2D or 3D conformation of a molecule
-
GetAtomPosition((Conformer)arg1, (int)arg2) → Point3D :¶ Get the posistion of an atom
- C++ signature :
- RDGeom::Point3D GetAtomPosition(RDKit::Conformer const*,unsigned int)
-
GetId((Conformer)arg1) → int :¶ Get the ID of the conformer
- C++ signature :
- unsigned int GetId(RDKit::Conformer {lvalue})
-
GetNumAtoms((Conformer)arg1) → int :¶ Get the number of atoms in the conformer
- C++ signature :
- unsigned int GetNumAtoms(RDKit::Conformer {lvalue})
-
GetOwningMol((Conformer)arg1) → Mol :¶ Get the owning molecule
- C++ signature :
- RDKit::ROMol {lvalue} GetOwningMol(RDKit::Conformer {lvalue})
-
GetPositions((Conformer)arg1) → object :¶ Get positions of all the atoms
- C++ signature :
- _object* GetPositions(RDKit::Conformer const*)
-
Is3D((Conformer)arg1) → bool :¶ returns the 3D flag of the conformer
- C++ signature :
- bool Is3D(RDKit::Conformer {lvalue})
-
Set3D((Conformer)arg1, (bool)arg2) → None :¶ Set the 3D flag of the conformer
- C++ signature :
- void Set3D(RDKit::Conformer {lvalue},bool)
-
SetAtomPosition((Conformer)arg1, (int)arg2, (AtomPairsParameters)arg3) → None :¶ Set the position of the specified atom
- C++ signature :
- void SetAtomPosition(RDKit::Conformer*,unsigned int,boost::python::api::object)
- SetAtomPosition( (Conformer)arg1, (int)arg2, (Point3D)arg3) -> None :
Set the position of the specified atom
- C++ signature :
- void SetAtomPosition(RDKit::Conformer {lvalue},unsigned int,RDGeom::Point3D)
-
SetId((Conformer)arg1, (int)arg2) → None :¶ Set the ID of the conformer
- C++ signature :
- void SetId(RDKit::Conformer {lvalue},unsigned int)
-
-
class
rdkit.Chem.rdchem.EditableMol¶ Bases:
Boost.Python.instancean editable molecule class
-
AddAtom((EditableMol)mol, (Atom)atom) → int :¶ add an atom, returns the index of the newly added atom
- C++ signature :
- int AddAtom(RDKit::(anonymous namespace)::EditableMol {lvalue},RDKit::Atom*)
-
AddBond((EditableMol)mol, (int)beginAtomIdx, (int)endAtomIdx[, (BondType)order=rdkit.Chem.rdchem.BondType.UNSPECIFIED]) → int :¶ add a bond, returns the index of the newly added bond
- C++ signature :
- int AddBond(RDKit::(anonymous namespace)::EditableMol {lvalue},unsigned int,unsigned int [,RDKit::Bond::BondType=rdkit.Chem.rdchem.BondType.UNSPECIFIED])
-
GetMol((EditableMol)arg1) → Mol :¶ Returns a Mol (a normal molecule)
- C++ signature :
- RDKit::ROMol* GetMol(RDKit::(anonymous namespace)::EditableMol {lvalue})
-
RemoveAtom((EditableMol)arg1, (int)arg2) → None :¶ Remove the specified atom from the molecule
- C++ signature :
- void RemoveAtom(RDKit::(anonymous namespace)::EditableMol {lvalue},unsigned int)
-
RemoveBond((EditableMol)arg1, (int)arg2, (int)arg3) → None :¶ Remove the specified bond from the molecule
- C++ signature :
- void RemoveBond(RDKit::(anonymous namespace)::EditableMol {lvalue},unsigned int,unsigned int)
-
ReplaceAtom((EditableMol)mol, (int)index, (Atom)newAtom) → None :¶ replaces the specified atom with the provided one
- C++ signature :
- void ReplaceAtom(RDKit::(anonymous namespace)::EditableMol {lvalue},unsigned int,RDKit::Atom*)
-
-
rdkit.Chem.rdchem.GetAtomAlias((Atom)atom) → str :¶ Returns the atom’s MDL alias text
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetAtomAlias(RDKit::Atom const*)
-
rdkit.Chem.rdchem.GetAtomRLabel((Atom)atom) → int :¶ Returns the atom’s MDL AtomRLabel (this is an integer from 0 to 99)
- C++ signature :
- int GetAtomRLabel(RDKit::Atom const*)
-
rdkit.Chem.rdchem.GetAtomValue((Atom)atom) → str :¶ Returns the atom’s MDL alias text
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetAtomValue(RDKit::Atom const*)
-
rdkit.Chem.rdchem.GetDefaultPickleProperties() → int :¶ Get the current global mol pickler options.
- C++ signature :
- unsigned int GetDefaultPickleProperties()
-
rdkit.Chem.rdchem.GetPeriodicTable() → PeriodicTable :¶ Returns the application’s PeriodicTable instance.
- C++ signature :
- RDKit::PeriodicTable* GetPeriodicTable()
-
rdkit.Chem.rdchem.GetSupplementalSmilesLabel((Atom)atom) → str :¶ Gets the supplemental smiles label on an atom, returns an empty string if not present.
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetSupplementalSmilesLabel(RDKit::Atom const*)
-
class
rdkit.Chem.rdchem.HybridizationType¶ Bases:
Boost.Python.enum-
OTHER= rdkit.Chem.rdchem.HybridizationType.OTHER¶
-
S= rdkit.Chem.rdchem.HybridizationType.S¶
-
SP= rdkit.Chem.rdchem.HybridizationType.SP¶
-
SP2= rdkit.Chem.rdchem.HybridizationType.SP2¶
-
SP3= rdkit.Chem.rdchem.HybridizationType.SP3¶
-
SP3D= rdkit.Chem.rdchem.HybridizationType.SP3D¶
-
SP3D2= rdkit.Chem.rdchem.HybridizationType.SP3D2¶
-
UNSPECIFIED= rdkit.Chem.rdchem.HybridizationType.UNSPECIFIED¶
-
names= {'SP3D2': rdkit.Chem.rdchem.HybridizationType.SP3D2, 'S': rdkit.Chem.rdchem.HybridizationType.S, 'SP': rdkit.Chem.rdchem.HybridizationType.SP, 'SP2': rdkit.Chem.rdchem.HybridizationType.SP2, 'SP3': rdkit.Chem.rdchem.HybridizationType.SP3, 'SP3D': rdkit.Chem.rdchem.HybridizationType.SP3D, 'UNSPECIFIED': rdkit.Chem.rdchem.HybridizationType.UNSPECIFIED, 'OTHER': rdkit.Chem.rdchem.HybridizationType.OTHER}¶
-
values= {0: rdkit.Chem.rdchem.HybridizationType.UNSPECIFIED, 1: rdkit.Chem.rdchem.HybridizationType.S, 2: rdkit.Chem.rdchem.HybridizationType.SP, 3: rdkit.Chem.rdchem.HybridizationType.SP2, 4: rdkit.Chem.rdchem.HybridizationType.SP3, 5: rdkit.Chem.rdchem.HybridizationType.SP3D, 6: rdkit.Chem.rdchem.HybridizationType.SP3D2, 7: rdkit.Chem.rdchem.HybridizationType.OTHER}¶
-
-
rdkit.Chem.rdchem.LogErrorMsg((str)arg1) → None :¶ Log a warning message to the RDKit error logs
- C++ signature :
- void LogErrorMsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
rdkit.Chem.rdchem.LogWarningMsg((str)arg1) → None :¶ Log a warning message to the RDKit warning logs
- C++ signature :
- void LogWarningMsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
class
rdkit.Chem.rdchem.Mol¶ Bases:
Boost.Python.instanceThe Molecule class.
- In addition to the expected Atoms and Bonds, molecules contain:
- a collection of Atom and Bond bookmarks indexed with integers
that can be used to flag and retrieve particular Atoms or Bonds using the {get|set}{Atom|Bond}Bookmark() methods.
- a set of string-valued properties. These can have arbitrary string
labels and can be set and retrieved using the {set|get}Prop() methods Molecular properties can be tagged as being computed, in which case
they will be automatically cleared under certain circumstances (when the molecule itself is modified, for example).
- Molecules also have the concept of private properties, which are tagged
by beginning the property name with an underscore (_).
-
AddConformer((Mol)self, (Conformer)conf[, (bool)assignId=False]) → int :¶ Add a conformer to the molecule and return the conformer ID
- C++ signature :
- unsigned int AddConformer(RDKit::ROMol {lvalue},RDKit::Conformer* [,bool=False])
-
ClearComputedProps((Mol)arg1) → None :¶ Removes all computed properties from the molecule.
- C++ signature :
- void ClearComputedProps(RDKit::ROMol)
-
ClearProp((Mol)arg1, (str)arg2) → None :¶ Removes a property from the molecule.
- ARGUMENTS:
- key: the name of the property to clear (a string).
- C++ signature :
- void ClearProp(RDKit::ROMol,char const*)
-
Compute2DCoords((Mol)mol[, (bool)canonOrient=True[, (bool)clearConfs=True[, (dict)coordMap={}[, (int)nFlipsPerSample=0[, (int)nSample=0[, (int)sampleSeed=0[, (bool)permuteDeg4Nodes=False[, (float)bondLength=-1.0]]]]]]]]) → int :¶ - Compute 2D coordinates for a molecule.
The resulting coordinates are stored on each atom of the molecule
ARGUMENTS:
mol - the molecule of interest canonOrient - orient the molecule in a canonical way clearConfs - if true, all existing conformations on the molecule
will be cleared- coordMap - a dictionary mapping atom Ids -> Point2D objects
- with starting coordinates for atoms that should have their positions locked.
- nFlipsPerSample - number of rotatable bonds that are
- flipped at random at a time.
nSample - Number of random samplings of rotatable bonds. sampleSeed - seed for the random sampling process. permuteDeg4Nodes - allow permutation of bonds at a degree 4
node during the sampling processbondLength - change the default bond length for depiction
RETURNS:
ID of the conformation added to the molecule- C++ signature :
- unsigned int Compute2DCoords(RDKit::ROMol {lvalue} [,bool=True [,bool=True [,boost::python::dict {lvalue}={} [,unsigned int=0 [,unsigned int=0 [,int=0 [,bool=False [,double=-1.0]]]]]]]])
-
ComputeGasteigerCharges((Mol)mol[, (int)nIter=12[, (bool)throwOnParamFailure=False]]) → None :¶ Compute Gasteiger partial charges for molecule
The charges are computed using an iterative procedure presented in
Ref : J.Gasteiger, M. Marseli, Iterative Equalization of Oribital Electronegatiity A Rapid Access to Atomic Charges, Tetrahedron Vol 36 p3219 1980
The computed charges are stored on each atom are stored a computed property ( under the name _GasteigerCharge). In addition, each atom also stored the total charge for the implicit hydrogens on the atom (under the property name _GasteigerHCharge)
ARGUMENTS:
- mol : the molecule of interrest
- nIter : number of iteration (defaults to 12)
- throwOnParamFailure : toggles whether or not an exception should be raised if parameters for an atom cannot be found. If this is false (the default), all parameters for unknown atoms will be set to zero. This has the effect of removing that atom from the iteration.
- C++ signature :
- void ComputeGasteigerCharges(RDKit::ROMol const* [,int=12 [,bool=False]])
-
Debug((Mol)mol[, (bool)useStdout=True]) → None :¶ Prints debugging information about the molecule.
- C++ signature :
- void Debug(RDKit::ROMol [,bool=True])
-
GetAromaticAtoms((Mol)arg1) → _ROQAtomSeq :¶ Returns a read-only sequence containing all of the molecule’s aromatic Atoms.
- C++ signature :
- RDKit::ReadOnlySeq<RDKit::QueryAtomIterator_<RDKit::Atom, RDKit::ROMol>, RDKit::Atom*>* GetAromaticAtoms(RDKit::ROMol*)
-
GetAtomWithIdx((Mol)arg1, (int)arg2) → Atom :¶ Returns a particular Atom.
- ARGUMENTS:
- idx: which Atom to return
NOTE: atom indices start at 0
- C++ signature :
- RDKit::Atom* GetAtomWithIdx(RDKit::ROMol {lvalue},unsigned int)
-
GetAtoms((Mol)arg1) → _ROAtomSeq :¶ Returns a read-only sequence containing all of the molecule’s Atoms.
- C++ signature :
- RDKit::ReadOnlySeq<RDKit::AtomIterator_<RDKit::Atom, RDKit::ROMol>, RDKit::Atom*>* GetAtoms(RDKit::ROMol*)
-
GetAtomsMatchingQuery((Mol)arg1, (QueryAtom)arg2) → _ROQAtomSeq :¶ Returns a read-only sequence containing all of the atoms in a molecule that match the query atom.
- C++ signature :
- RDKit::ReadOnlySeq<RDKit::QueryAtomIterator_<RDKit::Atom, RDKit::ROMol>, RDKit::Atom*>* GetAtomsMatchingQuery(RDKit::ROMol*,RDKit::QueryAtom*)
-
GetBondBetweenAtoms((Mol)arg1, (int)arg2, (int)arg3) → Bond :¶ Returns the bond between two atoms, if there is one.
- ARGUMENTS:
- idx1,idx2: the Atom indices
- Returns:
- The Bond between the two atoms, if such a bond exists. If there is no Bond between the atoms, None is returned instead.
NOTE: bond indices start at 0
- C++ signature :
- RDKit::Bond* GetBondBetweenAtoms(RDKit::ROMol {lvalue},unsigned int,unsigned int)
-
GetBondWithIdx((Mol)arg1, (int)arg2) → Bond :¶ Returns a particular Bond.
- ARGUMENTS:
- idx: which Bond to return
NOTE: bond indices start at 0
- C++ signature :
- RDKit::Bond* GetBondWithIdx(RDKit::ROMol {lvalue},unsigned int)
-
GetBonds((Mol)arg1) → _ROBondSeq :¶ Returns a read-only sequence containing all of the molecule’s Bonds.
- C++ signature :
- RDKit::ReadOnlySeq<RDKit::BondIterator_, RDKit::Bond*>* GetBonds(RDKit::ROMol*)
-
GetBoolProp((Mol)arg1, (str)arg2) → bool :¶ Returns the double value of the property if possible.
- ARGUMENTS:
- key: the name of the property to return (a string).
RETURNS: a bool
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- bool GetBoolProp(RDKit::ROMol*,char const*)
-
GetConformer((Mol)self[, (int)id=-1]) → Conformer :¶ Get the conformer with a specified ID
- C++ signature :
- RDKit::Conformer* GetConformer(RDKit::ROMol {lvalue} [,int=-1])
-
GetConformers((Mol)arg1) → object :¶ Get all the conformers as a tuple
- C++ signature :
- _object* GetConformers(RDKit::ROMol {lvalue})
-
GetDoubleProp((Mol)arg1, (str)arg2) → float :¶ Returns the double value of the property if possible.
- ARGUMENTS:
- key: the name of the property to return (a string).
RETURNS: a double
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- double GetDoubleProp(RDKit::ROMol*,char const*)
-
GetIntProp((Mol)arg1, (str)arg2) → int :¶ Returns the integer value of the property if possible.
- ARGUMENTS:
- key: the name of the property to return (a string).
RETURNS: an integer
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- int GetIntProp(RDKit::ROMol*,char const*)
-
GetNumAtoms((Mol)arg1[, (int)onlyHeavy=-1[, (bool)onlyExplicit=True]]) → int :¶ Returns the number of atoms in the molecule.
- ARGUMENTS:
- onlyExplicit: (optional) include only explicit atoms (atoms in the molecular graph)
defaults to 1.
NOTE: the onlyHeavy argument is deprecated
- C++ signature :
- int GetNumAtoms(RDKit::ROMol [,int=-1 [,bool=True]])
-
GetNumBonds((Mol)arg1[, (bool)onlyHeavy=True]) → int :¶ Returns the number of Bonds in the molecule.
- ARGUMENTS:
- onlyHeavy: (optional) include only bonds to heavy atoms (not Hs)
defaults to 1.
- C++ signature :
- unsigned int GetNumBonds(RDKit::ROMol {lvalue} [,bool=True])
-
GetNumConformers((Mol)arg1) → int :¶ Return the number of conformations on the molecule
- C++ signature :
- unsigned int GetNumConformers(RDKit::ROMol {lvalue})
-
GetNumHeavyAtoms((Mol)arg1) → int :¶ Returns the number of heavy atoms (atomic number >1) in the molecule.
- C++ signature :
- unsigned int GetNumHeavyAtoms(RDKit::ROMol {lvalue})
-
GetProp((Mol)arg1, (str)arg2) → str :¶ Returns the value of the property.
- ARGUMENTS:
- key: the name of the property to return (a string).
RETURNS: a string
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetProp(RDKit::ROMol*,char const*)
-
GetPropNames((Mol)self[, (bool)includePrivate=False[, (bool)includeComputed=False]]) → _vectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE :¶ Returns a tuple with all property names for this molecule.
- ARGUMENTS:
- includePrivate: (optional) toggles inclusion of private properties in the result set.
Defaults to 0.
- includeComputed: (optional) toggles inclusion of computed properties in the result set.
Defaults to 0.
RETURNS: a tuple of strings
- C++ signature :
- std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > GetPropNames(RDKit::ROMol {lvalue} [,bool=False [,bool=False]])
-
GetPropsAsDict((Mol)self[, (bool)includePrivate=False[, (bool)includeComputed=False]]) → dict :¶ - Returns a dictionary populated with the molecules properties.
n.b. Some properties are not able to be converted to python types.
- ARGUMENTS:
- includePrivate: (optional) toggles inclusion of private properties in the result set.
Defaults to False.
- includeComputed: (optional) toggles inclusion of computed properties in the result set.
Defaults to False.
RETURNS: a dictionary
- C++ signature :
- boost::python::dict GetPropsAsDict(RDKit::ROMol [,bool=False [,bool=False]])
-
GetRingInfo((Mol)arg1) → RingInfo :¶ Returns the number of molecule’s RingInfo object.
- C++ signature :
- RDKit::RingInfo* GetRingInfo(RDKit::ROMol {lvalue})
-
GetSubstructMatch((Mol)self, (Mol)query[, (bool)useChirality=False[, (bool)useQueryQueryMatches=False]]) → object :¶ Returns the indices of the molecule’s atoms that match a substructure query.
- ARGUMENTS:
- query: a Molecule
- useChirality: enables the use of stereochemistry in the matching
- useQueryQueryMatches: use query-query matching logic
RETURNS: a tuple of integers
- NOTES:
only a single match is returned
- the ordering of the indices corresponds to the atom ordering
in the query. For example, the first index is for the atom in this molecule that matches the first atom in the query.
- C++ signature :
- _object* GetSubstructMatch(RDKit::ROMol,RDKit::ROMol [,bool=False [,bool=False]])
-
GetSubstructMatches((Mol)self, (Mol)query[, (bool)uniquify=True[, (bool)useChirality=False[, (bool)useQueryQueryMatches=False[, (int)maxMatches=1000]]]]) → object :¶ Returns tuples of the indices of the molecule’s atoms that match a substructure query.
- ARGUMENTS:
query: a Molecule.
- uniquify: (optional) determines whether or not the matches are uniquified.
Defaults to 1.
useChirality: enables the use of stereochemistry in the matching
useQueryQueryMatches: use query-query matching logic
- maxMatches: The maximum number of matches that will be returned.
In high-symmetry cases with medium-sized molecules, it is very easy to end up with a combinatorial explosion in the number of possible matches. This argument prevents that from having unintended consequences
RETURNS: a tuple of tuples of integers
- NOTE:
- the ordering of the indices corresponds to the atom ordering
in the query. For example, the first index is for the atom in this molecule that matches the first atom in the query.
- C++ signature :
- _object* GetSubstructMatches(RDKit::ROMol,RDKit::ROMol [,bool=True [,bool=False [,bool=False [,unsigned int=1000]]]])
-
GetUnsignedProp((Mol)arg1, (str)arg2) → int :¶ Returns the unsigned int value of the property if possible.
- ARGUMENTS:
- key: the name of the property to return (a string).
RETURNS: an unsigned integer
- NOTE:
- If the property has not been set, a KeyError exception will be raised.
- C++ signature :
- unsigned int GetUnsignedProp(RDKit::ROMol*,char const*)
-
HasProp((Mol)arg1, (str)arg2) → int :¶ Queries a molecule to see if a particular property has been assigned.
- ARGUMENTS:
- key: the name of the property to check for (a string).
- C++ signature :
- int HasProp(RDKit::ROMol,char const*)
-
HasSubstructMatch((Mol)self, (Mol)query[, (bool)recursionPossible=True[, (bool)useChirality=False[, (bool)useQueryQueryMatches=False]]]) → bool :¶ Queries whether or not the molecule contains a particular substructure.
- ARGUMENTS:
- query: a Molecule
- recursionPossible: (optional)
- useChirality: enables the use of stereochemistry in the matching
- useQueryQueryMatches: use query-query matching logic
RETURNS: True or False
- C++ signature :
- bool HasSubstructMatch(RDKit::ROMol,RDKit::ROMol [,bool=True [,bool=False [,bool=False]]])
-
NeedsUpdatePropertyCache((Mol)self) → bool :¶ Returns true or false depending on whether implicit and explicit valence of the molecule have already been calculated.
- C++ signature :
- bool NeedsUpdatePropertyCache(RDKit::ROMol {lvalue})
-
RemoveAllConformers((Mol)arg1) → None :¶ Remove all the conformations on the molecule
- C++ signature :
- void RemoveAllConformers(RDKit::ROMol {lvalue})
-
RemoveConformer((Mol)arg1, (int)arg2) → None :¶ Remove the conformer with the specified ID
- C++ signature :
- void RemoveConformer(RDKit::ROMol {lvalue},unsigned int)
-
SetBoolProp((Mol)self, (str)key, (bool)val[, (bool)computed=False]) → None :¶ Sets a boolean valued molecular property
- ARGUMENTS:
key: the name of the property to be set (a string).
value: the property value as a bool.
- computed: (optional) marks the property as being computed.
Defaults to False.
- C++ signature :
- void SetBoolProp(RDKit::ROMol,char const*,bool [,bool=False])
-
SetDoubleProp((Mol)self, (str)key, (float)val[, (bool)computed=False]) → None :¶ Sets a double valued molecular property
- ARGUMENTS:
key: the name of the property to be set (a string).
value: the property value as a double.
- computed: (optional) marks the property as being computed.
Defaults to 0.
- C++ signature :
- void SetDoubleProp(RDKit::ROMol,char const*,double [,bool=False])
-
SetIntProp((Mol)self, (str)key, (int)val[, (bool)computed=False]) → None :¶ Sets an integer valued molecular property
- ARGUMENTS:
key: the name of the property to be set (an unsigned number).
value: the property value as an integer.
- computed: (optional) marks the property as being computed.
Defaults to False.
- C++ signature :
- void SetIntProp(RDKit::ROMol,char const*,int [,bool=False])
-
SetProp((Mol)self, (str)key, (str)val[, (bool)computed=False]) → None :¶ Sets a molecular property
- ARGUMENTS:
key: the name of the property to be set (a string).
value: the property value (a string).
- computed: (optional) marks the property as being computed.
Defaults to False.
- C++ signature :
- void SetProp(RDKit::ROMol,char const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=False])
-
SetUnsignedProp((Mol)self, (str)key, (int)val[, (bool)computed=False]) → None :¶ Sets an unsigned integer valued molecular property
- ARGUMENTS:
key: the name of the property to be set (a string).
value: the property value as an unsigned integer.
- computed: (optional) marks the property as being computed.
Defaults to False.
- C++ signature :
- void SetUnsignedProp(RDKit::ROMol,char const*,unsigned int [,bool=False])
-
ToBinary((Mol)arg1) → object :¶ Returns a binary string representation of the molecule.
- C++ signature :
- boost::python::api::object ToBinary(RDKit::ROMol)
- ToBinary( (Mol)mol, (int)propertyFlags) -> object :
Returns a binary string representation of the molecule pickling the specified properties.
- C++ signature :
- boost::python::api::object ToBinary(RDKit::ROMol,unsigned int)
-
UpdatePropertyCache((Mol)self[, (bool)strict=True]) → None :¶ Regenerates computed properties like implicit valence and ring information.
- C++ signature :
- void UpdatePropertyCache(RDKit::ROMol {lvalue} [,bool=True])
-
class
rdkit.Chem.rdchem.PeriodicTable¶ Bases:
Boost.Python.instanceA class which stores information from the Periodic Table.
It is not possible to create a PeriodicTable object directly from Python, use GetPeriodicTable() to get the global table.
The PeriodicTable object can be queried for a variety of properties:
- GetAtomicWeight
- GetAtomicNumber
- GetElementSymbol
- GetRvdw (van der Waals radius)
- GetRCovalent (covalent radius)
- GetDefaultValence
- GetValenceList
- GetNOuterElecs (number of valence electrons)
- GetMostCommonIsotope
- GetMostCommonIsotopeMass
- GetRb0
- GetAbundanceForIsotope
- GetMassForIsotope
When it makes sense, these can be queried using either an atomic number (integer) or an atomic symbol (string)
-
GetAbundanceForIsotope((PeriodicTable)arg1, (int)arg2, (int)arg3) → float :¶ - C++ signature :
- double GetAbundanceForIsotope(RDKit::PeriodicTable {lvalue},unsigned int,unsigned int)
GetAbundanceForIsotope( (PeriodicTable)arg1, (str)arg2, (int)arg3) -> float :
- C++ signature :
- double GetAbundanceForIsotope(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,unsigned int)
-
GetAtomicNumber((PeriodicTable)arg1, (str)arg2) → int :¶ - C++ signature :
- int GetAtomicNumber(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetAtomicWeight((PeriodicTable)arg1, (int)arg2) → float :¶ - C++ signature :
- double GetAtomicWeight(RDKit::PeriodicTable {lvalue},unsigned int)
GetAtomicWeight( (PeriodicTable)arg1, (str)arg2) -> float :
- C++ signature :
- double GetAtomicWeight(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetDefaultValence((PeriodicTable)arg1, (int)arg2) → int :¶ - C++ signature :
- int GetDefaultValence(RDKit::PeriodicTable {lvalue},unsigned int)
GetDefaultValence( (PeriodicTable)arg1, (str)arg2) -> int :
- C++ signature :
- int GetDefaultValence(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetElementSymbol((PeriodicTable)arg1, (int)arg2) → str :¶ - C++ signature :
- std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetElementSymbol(RDKit::PeriodicTable {lvalue},unsigned int)
-
GetMassForIsotope((PeriodicTable)arg1, (int)arg2, (int)arg3) → float :¶ - C++ signature :
- double GetMassForIsotope(RDKit::PeriodicTable {lvalue},unsigned int,unsigned int)
GetMassForIsotope( (PeriodicTable)arg1, (str)arg2, (int)arg3) -> float :
- C++ signature :
- double GetMassForIsotope(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,unsigned int)
-
GetMostCommonIsotope((PeriodicTable)arg1, (int)arg2) → int :¶ - C++ signature :
- int GetMostCommonIsotope(RDKit::PeriodicTable {lvalue},unsigned int)
GetMostCommonIsotope( (PeriodicTable)arg1, (str)arg2) -> int :
- C++ signature :
- int GetMostCommonIsotope(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetMostCommonIsotopeMass((PeriodicTable)arg1, (int)arg2) → float :¶ - C++ signature :
- double GetMostCommonIsotopeMass(RDKit::PeriodicTable {lvalue},unsigned int)
GetMostCommonIsotopeMass( (PeriodicTable)arg1, (str)arg2) -> float :
- C++ signature :
- double GetMostCommonIsotopeMass(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetNOuterElecs((PeriodicTable)arg1, (int)arg2) → int :¶ - C++ signature :
- int GetNOuterElecs(RDKit::PeriodicTable {lvalue},unsigned int)
GetNOuterElecs( (PeriodicTable)arg1, (str)arg2) -> int :
- C++ signature :
- int GetNOuterElecs(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetRb0((PeriodicTable)arg1, (int)arg2) → float :¶ - C++ signature :
- double GetRb0(RDKit::PeriodicTable {lvalue},unsigned int)
GetRb0( (PeriodicTable)arg1, (str)arg2) -> float :
- C++ signature :
- double GetRb0(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetRcovalent((PeriodicTable)arg1, (int)arg2) → float :¶ - C++ signature :
- double GetRcovalent(RDKit::PeriodicTable {lvalue},unsigned int)
GetRcovalent( (PeriodicTable)arg1, (str)arg2) -> float :
- C++ signature :
- double GetRcovalent(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetRvdw((PeriodicTable)arg1, (int)arg2) → float :¶ - C++ signature :
- double GetRvdw(RDKit::PeriodicTable {lvalue},unsigned int)
GetRvdw( (PeriodicTable)arg1, (str)arg2) -> float :
- C++ signature :
- double GetRvdw(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
GetValenceList((PeriodicTable)arg1, (int)arg2) → _vecti :¶ - C++ signature :
- std::vector<int, std::allocator<int> > GetValenceList(RDKit::PeriodicTable {lvalue},unsigned int)
GetValenceList( (PeriodicTable)arg1, (str)arg2) -> _vecti :
- C++ signature :
- std::vector<int, std::allocator<int> > GetValenceList(RDKit::PeriodicTable {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
class
rdkit.Chem.rdchem.PropertyPickleOptions¶ Bases:
Boost.Python.enum-
AllProps= rdkit.Chem.rdchem.PropertyPickleOptions.AllProps¶
-
AtomProps= rdkit.Chem.rdchem.PropertyPickleOptions.AtomProps¶
-
BondProps= rdkit.Chem.rdchem.PropertyPickleOptions.BondProps¶
-
ComputedProps= rdkit.Chem.rdchem.PropertyPickleOptions.ComputedProps¶
-
MolProps= rdkit.Chem.rdchem.PropertyPickleOptions.MolProps¶
-
NoProps= rdkit.Chem.rdchem.PropertyPickleOptions.NoProps¶
-
PrivateProps= rdkit.Chem.rdchem.PropertyPickleOptions.PrivateProps¶
-
QueryAtomData= rdkit.Chem.rdchem.PropertyPickleOptions.QueryAtomData¶
-
names= {'MolProps': rdkit.Chem.rdchem.PropertyPickleOptions.MolProps, 'AtomProps': rdkit.Chem.rdchem.PropertyPickleOptions.AtomProps, 'PrivateProps': rdkit.Chem.rdchem.PropertyPickleOptions.PrivateProps, 'ComputedProps': rdkit.Chem.rdchem.PropertyPickleOptions.ComputedProps, 'NoProps': rdkit.Chem.rdchem.PropertyPickleOptions.NoProps, 'AllProps': rdkit.Chem.rdchem.PropertyPickleOptions.AllProps, 'QueryAtomData': rdkit.Chem.rdchem.PropertyPickleOptions.QueryAtomData, 'BondProps': rdkit.Chem.rdchem.PropertyPickleOptions.BondProps}¶
-
values= {0: rdkit.Chem.rdchem.PropertyPickleOptions.NoProps, 1: rdkit.Chem.rdchem.PropertyPickleOptions.MolProps, 65536: rdkit.Chem.rdchem.PropertyPickleOptions.PrivateProps, 2147483647: rdkit.Chem.rdchem.PropertyPickleOptions.AllProps, 1048576: rdkit.Chem.rdchem.PropertyPickleOptions.ComputedProps, 256: rdkit.Chem.rdchem.PropertyPickleOptions.QueryAtomData, 16: rdkit.Chem.rdchem.PropertyPickleOptions.AtomProps}¶
-
-
class
rdkit.Chem.rdchem.QueryAtom¶ Bases:
rdkit.Chem.rdchem.AtomThe class to store QueryAtoms. These cannot currently be constructed directly from Python
-
ExpandQuery((QueryAtom)self, (QueryAtom)other[, (CompositeQueryType)how=rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_AND[, (bool)maintainOrder=True]]) → None :¶ combines the query from other with ours
- C++ signature :
- void ExpandQuery(RDKit::QueryAtom*,RDKit::QueryAtom const* [,Queries::CompositeQueryType=rdkit.Chem.rdchem.CompositeQueryType.COMPOSITE_AND [,bool=True]])
-
-
class
rdkit.Chem.rdchem.QueryBond¶ Bases:
rdkit.Chem.rdchem.BondThe class to store QueryBonds. These cannot currently be constructed directly from Python
-
class
rdkit.Chem.rdchem.RWMol¶ Bases:
rdkit.Chem.rdchem.MolThe RW molecule class (read/write)
This class is a more-performant version of the EditableMolecule class in that it is a ‘live’ molecule and shares the interface from the Mol class. All changes are performed without the need to create a copy of the molecule using GetMol() (this is still available, however).
n.b. Eventually this class may become a direct replacement for EditableMol
-
AddAtom((RWMol)mol, (Atom)atom) → int :¶ add an atom, returns the index of the newly added atom
- C++ signature :
- int AddAtom(RDKit::ReadWriteMol {lvalue},RDKit::Atom*)
-
AddBond((RWMol)mol, (int)beginAtomIdx, (int)endAtomIdx[, (BondType)order=rdkit.Chem.rdchem.BondType.UNSPECIFIED]) → int :¶ add a bond, returns the new number of bonds
- C++ signature :
- int AddBond(RDKit::ReadWriteMol {lvalue},unsigned int,unsigned int [,RDKit::Bond::BondType=rdkit.Chem.rdchem.BondType.UNSPECIFIED])
-
GetMol((RWMol)arg1) → Mol :¶ Returns a Mol (a normal molecule)
- C++ signature :
- RDKit::ROMol* GetMol(RDKit::ReadWriteMol {lvalue})
-
RemoveAtom((RWMol)arg1, (int)arg2) → None :¶ Remove the specified atom from the molecule
- C++ signature :
- void RemoveAtom(RDKit::ReadWriteMol {lvalue},unsigned int)
-
RemoveBond((RWMol)arg1, (int)arg2, (int)arg3) → None :¶ Remove the specified bond from the molecule
- C++ signature :
- void RemoveBond(RDKit::ReadWriteMol {lvalue},unsigned int,unsigned int)
-
ReplaceAtom((RWMol)mol, (int)index, (Atom)newAtom) → None :¶ replaces the specified atom with the provided one
- C++ signature :
- void ReplaceAtom(RDKit::ReadWriteMol {lvalue},unsigned int,RDKit::Atom*)
-
ReplaceBond((RWMol)mol, (int)index, (Bond)newBond) → None :¶ replaces the specified bond with the provided one
- C++ signature :
- void ReplaceBond(RDKit::ReadWriteMol {lvalue},unsigned int,RDKit::Bond*)
-
-
class
rdkit.Chem.rdchem.ResonanceFlags¶ Bases:
Boost.Python.enum-
ALLOW_CHARGE_SEPARATION= rdkit.Chem.rdchem.ResonanceFlags.ALLOW_CHARGE_SEPARATION¶
-
ALLOW_INCOMPLETE_OCTETS= rdkit.Chem.rdchem.ResonanceFlags.ALLOW_INCOMPLETE_OCTETS¶
-
KEKULE_ALL= rdkit.Chem.rdchem.ResonanceFlags.KEKULE_ALL¶
-
UNCONSTRAINED_ANIONS= rdkit.Chem.rdchem.ResonanceFlags.UNCONSTRAINED_ANIONS¶
-
UNCONSTRAINED_CATIONS= rdkit.Chem.rdchem.ResonanceFlags.UNCONSTRAINED_CATIONS¶
-
names= {'UNCONSTRAINED_CATIONS': rdkit.Chem.rdchem.ResonanceFlags.UNCONSTRAINED_CATIONS, 'UNCONSTRAINED_ANIONS': rdkit.Chem.rdchem.ResonanceFlags.UNCONSTRAINED_ANIONS, 'ALLOW_CHARGE_SEPARATION': rdkit.Chem.rdchem.ResonanceFlags.ALLOW_CHARGE_SEPARATION, 'ALLOW_INCOMPLETE_OCTETS': rdkit.Chem.rdchem.ResonanceFlags.ALLOW_INCOMPLETE_OCTETS, 'KEKULE_ALL': rdkit.Chem.rdchem.ResonanceFlags.KEKULE_ALL}¶
-
values= {8: rdkit.Chem.rdchem.ResonanceFlags.UNCONSTRAINED_CATIONS, 1: rdkit.Chem.rdchem.ResonanceFlags.ALLOW_INCOMPLETE_OCTETS, 2: rdkit.Chem.rdchem.ResonanceFlags.ALLOW_CHARGE_SEPARATION, 4: rdkit.Chem.rdchem.ResonanceFlags.KEKULE_ALL, 16: rdkit.Chem.rdchem.ResonanceFlags.UNCONSTRAINED_ANIONS}¶
-
-
class
rdkit.Chem.rdchem.ResonanceMolSupplier¶ Bases:
Boost.Python.instanceA class which supplies resonance structures (as mols) from a mol.
Usage examples:
- Lazy evaluation: the resonance structures are not constructed until we ask for them: >>> suppl = ResonanceMolSupplier(mol) >>> for resMol in suppl: ... resMol.GetNumAtoms()
- Lazy evaluation 2: >>> suppl = ResonanceMolSupplier(mol) >>> resMol1 = suppl.next() >>> resMol2 = suppl.next() >>> suppl.reset() >>> resMol3 = suppl.next() # resMol3 and resMol1 are the same: >>> MolToSmiles(resMol3)==MolToSmiles(resMol1)
- Random Access: >>> suppl = ResonanceMolSupplier(mol) >>> resMol1 = suppl[0] >>> resMol2 = suppl[1] NOTE: this will generate an IndexError if the supplier doesn’t have that many molecules.
- Random Access 2: looping over all resonance structures >>> suppl = ResonanceMolSupplier(mol) >>> nResMols = len(suppl) >>> for i in range(nResMols): ... suppl[i].GetNumAtoms()
-
Enumerate((ResonanceMolSupplier)arg1) → None :¶ Ask ResonanceMolSupplier to enumerate resonance structures(automatically done as soon as any attempt to access them is made)
- C++ signature :
- void Enumerate(RDKit::ResonanceMolSupplier {lvalue})
-
GetAtomConjGrpIdx((ResonanceMolSupplier)arg1, (int)arg2) → int :¶ Given an atom index, it returns the index of the conjugated groupthe atom belongs to, or -1 if it is not conjugated
- C++ signature :
- unsigned int GetAtomConjGrpIdx(RDKit::ResonanceMolSupplier {lvalue},unsigned int)
-
GetBondConjGrpIdx((ResonanceMolSupplier)arg1, (int)arg2) → int :¶ Given a bond index, it returns the index of the conjugated groupthe bond belongs to, or -1 if it is not conjugated
- C++ signature :
- unsigned int GetBondConjGrpIdx(RDKit::ResonanceMolSupplier {lvalue},unsigned int)
-
GetIsEnumerated((ResonanceMolSupplier)arg1) → bool :¶ Returns true if resonance structure enumeration has already happened
- C++ signature :
- bool GetIsEnumerated(RDKit::ResonanceMolSupplier {lvalue})
-
GetNumConjGrps((ResonanceMolSupplier)arg1) → int :¶ Returns the number of individual conjugated groups in the molecule
- C++ signature :
- unsigned int GetNumConjGrps(RDKit::ResonanceMolSupplier {lvalue})
-
GetSubstructMatch((ResonanceMolSupplier)self, (Mol)query[, (bool)useChirality=False[, (bool)useQueryQueryMatches=False]]) → object :¶ Returns the indices of the molecule’s atoms that match a substructure query, taking into account all resonance structures in ResonanceMolSupplier.
- ARGUMENTS:
- query: a Molecule
- useChirality: enables the use of stereochemistry in the matching
- useQueryQueryMatches: use query-query matching logic
RETURNS: a tuple of integers
- NOTES:
only a single match is returned
- the ordering of the indices corresponds to the atom ordering
in the query. For example, the first index is for the atom in this molecule that matches the first atom in the query.
- C++ signature :
- _object* GetSubstructMatch(RDKit::ResonanceMolSupplier {lvalue},RDKit::ROMol [,bool=False [,bool=False]])
-
GetSubstructMatches((ResonanceMolSupplier)self, (Mol)query[, (bool)uniquify=False[, (bool)useChirality=False[, (bool)useQueryQueryMatches=False[, (int)maxMatches=1000[, (int)numThreads=1]]]]]) → object :¶ Returns tuples of the indices of the molecule’s atoms that match a substructure query, taking into account all resonance structures in ResonanceMolSupplier.
- ARGUMENTS:
query: a Molecule.
- uniquify: (optional) determines whether or not the matches are uniquified.
Defaults to 1.
useChirality: enables the use of stereochemistry in the matching
useQueryQueryMatches: use query-query matching logic
- maxMatches: The maximum number of matches that will be returned.
In high-symmetry cases with medium-sized molecules, it is very easy to end up with a combinatorial explosion in the number of possible matches. This argument prevents that from having unintended consequences
- numThreads: The number of threads to be used (defaults to 1; 0 selects the
number of concurrent threads supported by the hardware; negative values are added to the number of concurrent threads supported by the hardware).
RETURNS: a tuple of tuples of integers
- NOTE:
- the ordering of the indices corresponds to the atom ordering
in the query. For example, the first index is for the atom in this molecule that matches the first atom in the query.
- C++ signature :
- _object* GetSubstructMatches(RDKit::ResonanceMolSupplier {lvalue},RDKit::ROMol [,bool=False [,bool=False [,bool=False [,unsigned int=1000 [,int=1]]]]])
-
SetNumThreads((ResonanceMolSupplier)arg1, (int)arg2) → None :¶ Sets the number of threads to be used to enumerate resonance structures (defaults to 1; 0 selects the number of concurrent threads supported by the hardware; negative values are added to the number of concurrent threads supported by the hardware)
- C++ signature :
- void SetNumThreads(RDKit::ResonanceMolSupplier {lvalue},unsigned int)
-
atEnd((ResonanceMolSupplier)arg1) → bool :¶ Returns whether or not we have hit the end of the resonance structure supplier.
- C++ signature :
- bool atEnd(RDKit::ResonanceMolSupplier {lvalue})
-
reset((ResonanceMolSupplier)arg1) → None :¶ Resets our position in the resonance structure supplier to the beginning.
- C++ signature :
- void reset(RDKit::ResonanceMolSupplier {lvalue})
-
class
rdkit.Chem.rdchem.RingInfo¶ Bases:
Boost.Python.instancecontains information about a molecule’s rings
-
AtomRings((RingInfo)arg1) → object :¶ - C++ signature :
- boost::python::api::object AtomRings(RDKit::RingInfo const*)
-
BondRings((RingInfo)arg1) → object :¶ - C++ signature :
- boost::python::api::object BondRings(RDKit::RingInfo const*)
-
IsAtomInRingOfSize((RingInfo)arg1, (int)arg2, (int)arg3) → bool :¶ - C++ signature :
- bool IsAtomInRingOfSize(RDKit::RingInfo {lvalue},unsigned int,unsigned int)
-
IsBondInRingOfSize((RingInfo)arg1, (int)arg2, (int)arg3) → bool :¶ - C++ signature :
- bool IsBondInRingOfSize(RDKit::RingInfo {lvalue},unsigned int,unsigned int)
IsBondInRingOfSize( (RingInfo)arg1, (int)arg2, (int)arg3) -> bool :
- C++ signature :
- bool IsBondInRingOfSize(RDKit::RingInfo {lvalue},unsigned int,unsigned int)
-
NumAtomRings((RingInfo)arg1, (int)arg2) → int :¶ - C++ signature :
- unsigned int NumAtomRings(RDKit::RingInfo {lvalue},unsigned int)
-
NumBondRings((RingInfo)arg1, (int)arg2) → int :¶ - C++ signature :
- unsigned int NumBondRings(RDKit::RingInfo {lvalue},unsigned int)
-
NumRings((RingInfo)arg1) → int :¶ - C++ signature :
- unsigned int NumRings(RDKit::RingInfo {lvalue})
-
-
rdkit.Chem.rdchem.SetAtomAlias((Atom)atom, (str)rlabel) → None :¶ Sets the atom’s MDL alias text. Setting to an empty string clears the alias.
- C++ signature :
- void SetAtomAlias(RDKit::Atom*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
rdkit.Chem.rdchem.SetAtomRLabel((Atom)atom, (int)rlabel) → None :¶ Sets the atom’s MDL RLabel (this is an integer from 0 to 99). Setting to 0 clears the rlabel.
- C++ signature :
- void SetAtomRLabel(RDKit::Atom*,int)
-
rdkit.Chem.rdchem.SetAtomValue((Atom)atom, (str)rlabel) → None :¶ Sets the atom’s MDL alias text. Setting to an empty string clears the alias.
- C++ signature :
- void SetAtomValue(RDKit::Atom*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
rdkit.Chem.rdchem.SetDefaultPickleProperties((int)arg1) → None :¶ Set the current global mol pickler options.
- C++ signature :
- void SetDefaultPickleProperties(unsigned int)
-
rdkit.Chem.rdchem.SetSupplementalSmilesLabel((Atom)atom, (str)label) → None :¶ Sets a supplemental label on an atom that is written to the smiles string. >>> m = Chem.MolFromSmiles(“C”) >>> Chem.SetSupplementalSmilesLabel(m.GetAtomWithIdx(0), ‘<xxx>’) >>> Chem.MolToSmiles(m) ‘C<xxx>’
- C++ signature :
- void SetSupplementalSmilesLabel(RDKit::Atom*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
rdkit.Chem.rdchem.WrapLogs() → None :¶ Wrap the internal RDKit streams so they go to python’s SysStdErr
- C++ signature :
- void WrapLogs()
-
rdkit.Chem.rdchem.tossit() → None :¶ - C++ signature :
- void tossit()