1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
"""Classes to describe the chemistry of custom chemical components.
If a given :class:`ihm.ChemComp` is not defined in either the wwPDB
chemical component dictionary (CCD) or the ModelArchive CCD, its
chemistry can be described with one or more of these objects. They
are passed as the ``descriptors`` argument when creating a new
:class:`ihm.ChemComp`.
"""
class Descriptor:
"""Base class for all descriptors.
This class is generally not used directly; instead, a subclass
such as :class:`IUPACName` or :class:`InChI` is employed.
:param str value: The actual name or identifier describing
the chemistry.
:param str details: Additional details about this descriptor.
:param software: The software used to generate the descriptor, if any.
:type software: :class:`modelcif.Software`
"""
def __init__(self, value, details=None, software=None):
self.value, self.details = value, details
self.software = software
def __repr__(self):
return "<%s(%s)>" % (self.__class__.__name__, repr(self.value))
class CanonicalSMILES(Descriptor):
"""Simplified Molecular-Input Line-Entry System (SMILES) computed from
chemical structure devoid of isotopic and stereochemical information."""
type = 'Canonical SMILES'
class IsomericSMILES(Descriptor):
"""Simplified Molecular-Input Line-Entry System (SMILES) computed from
chemical structure containing isotopic and stereochemical information.
SMILES written with isotopic and chiral specifications are collectively
known as isomeric SMILES."""
type = 'Isomeric SMILES'
class IUPACName(Descriptor):
"""Chemical name computed from chemical structure that uses International
Union of Pure and Applied Chemistry (IUPAC) nomenclature standards."""
type = 'IUPAC Name'
class InChI(Descriptor):
"""International Chemical Identifier (InChI) computed from chemical
structure using the International Union of Pure and Applied Chemistry
(IUPAC) standard."""
type = 'InChI'
class InChIKey(Descriptor):
"""International Chemical Identifier hash (InChIKey) computed from
chemical structure using the International Union of Pure and Applied
Chemistry (IUPAC) standard."""
type = 'InChI Key'
class PubChemCID(Descriptor):
"""PubChem Compound ID."""
type = 'PubChem CID'
|