Chemical Data Processing Library Python API - Version 1.1.1
Classes | Public Member Functions | Properties | List of all members
CDPL.ConfGen.CanonicalFragment Class Reference

CanonicalFragment. More...

+ Inheritance diagram for CDPL.ConfGen.CanonicalFragment:

Classes

class  AtomMapping
 

Public Member Functions

None __init__ ()
 Constructs an empty CanonicalFragment instance.
 
None __init__ (Chem.MolecularGraph molgraph, Chem.MolecularGraph parent)
 Constructs a CanonicalFragment instance that contains the relevant atoms and bonds of the molecular graph molgraph. More...
 
None __init__ (CanonicalFragment frag)
 Initializes a copy of the CanonicalFragment instance frag. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
CanonicalFragment assign (CanonicalFragment frag)
 Replaces the current state of self with a copy of the state of the CanonicalFragment instance frag. More...
 
None create (Chem.MolecularGraph molgraph, Chem.MolecularGraph parent, bool modify=True, bool strip_aro_subst=True)
 
int getHashCode ()
 
None clear ()
 
Chem.AtomMapping getAtomMapping ()
 
- Public Member Functions inherited from CDPL.Chem.MolecularGraph
AtomSequence getAtoms ()
 
BondSequence getBonds ()
 
MolecularGraph clone ()
 Creates a copy of the molecular graph. More...
 
Atom getAtom (int idx)
 
bool containsAtom (Atom atom)
 
int getAtomIndex (Atom atom)
 
int getNumAtoms ()
 
None orderAtoms (ForceField.InteractionFilterFunction2 func)
 
Entity3D getEntity (int idx)
 
int getNumEntities ()
 
Bond getBond (int idx)
 
bool containsBond (Bond bond)
 
None orderBonds (BoolBond2Functor func)
 
int getBondIndex (Bond bond)
 
int getNumBonds ()
 
bool __contains__ (Atom atom)
 Returns the result of the membership test operation atom in self. More...
 
bool __contains__ (Bond bond)
 Returns the result of the membership test operation bond in self. More...
 
bool __contains__ (Base.LookupKey key)
 Returns the result of the membership test operation key in self. More...
 
Base.Any __getitem__ (Base.LookupKey key)
 
None __setitem__ (Base.LookupKey key, Base.Any value)
 
bool __delitem__ (Base.LookupKey key)
 
int __len__ ()
 
- Public Member Functions inherited from CDPL.Chem.AtomContainer
Atom __getitem__ (int idx)
 
- Public Member Functions inherited from CDPL.Chem.BondContainer
Bond __getitem__ (int idx)
 
- Public Member Functions inherited from CDPL.Base.PropertyContainer
int getNumProperties ()
 Returns the number of property entries. More...
 
Any getPropertyOrDefault (LookupKey key, Any def_value)
 
list getPropertyKeys ()
 
list getPropertyValues ()
 
list getProperties ()
 Returns a reference to itself. More...
 
None setProperty (LookupKey key, Any value)
 
bool removeProperty (LookupKey key)
 Clears the value of the property specified by key. More...
 
Any getProperty (LookupKey key, bool throw_=False)
 Returns the value of the property specified by key. More...
 
bool isPropertySet (LookupKey key)
 Tells whether or not a value has been assigned to the property specified by key. More...
 
None clearProperties ()
 Clears all property values.
 
None addProperties (PropertyContainer cntnr)
 Adds the property value entries in the PropertyContainer instance cntnr. More...
 
None copyProperties (PropertyContainer cntnr)
 Replaces the current set of properties by a copy of the entries in cntnr. More...
 
None swap (PropertyContainer cntnr)
 Exchanges the properties of this container with the properties of the container cntnr. More...
 
Any __getitem__ (LookupKey key)
 
bool __contains__ (LookupKey key)
 Returns the result of the membership test operation key in self. More...
 
None __setitem__ (LookupKey key, Any value)
 
bool __delitem__ (LookupKey key)
 

Properties

 objectID = property(getObjectID)
 
 hashCode = property(getHashCode)
 
 atomMapping = property(getAtomMapping)
 
- Properties inherited from CDPL.Chem.MolecularGraph
 atoms = property(getAtoms)
 
 bonds = property(getBonds)
 
- Properties inherited from CDPL.Chem.AtomContainer
 numAtoms = property(getNumAtoms)
 
- Properties inherited from CDPL.Chem.Entity3DContainer
 objectID = property(getObjectID)
 
 numEntities = property(getNumEntities)
 
- Properties inherited from CDPL.Chem.BondContainer
 objectID = property(getObjectID)
 
 numBonds = property(getNumBonds)
 
- Properties inherited from CDPL.Base.PropertyContainer
 objectID = property(getObjectID)
 
 propertyKeys = property(getPropertyKeys)
 
 propertyValues = property(getPropertyValues)
 
 properties = property(getProperties)
 
 numProperties = property(getNumProperties)
 

Detailed Description

CanonicalFragment.

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.ConfGen.CanonicalFragment.__init__ ( Chem.MolecularGraph  molgraph,
Chem.MolecularGraph  parent 
)

Constructs a CanonicalFragment instance that contains the relevant atoms and bonds of the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to generate the fragments.
parentThe parent molecular graph the fragment is coming from.

◆ __init__() [2/2]

None CDPL.ConfGen.CanonicalFragment.__init__ ( CanonicalFragment  frag)

Initializes a copy of the CanonicalFragment instance frag.

Parameters
fragThe CanonicalFragment instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.ConfGen.CanonicalFragment.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python CanonicalFragment instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two CanonicalFragment instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

Reimplemented from CDPL.Base.PropertyContainer.

◆ assign()

CanonicalFragment CDPL.ConfGen.CanonicalFragment.assign ( CanonicalFragment  frag)

Replaces the current state of self with a copy of the state of the CanonicalFragment instance frag.

Parameters
fragThe CanonicalFragment instance to copy.
Returns
self

◆ create()

None CDPL.ConfGen.CanonicalFragment.create ( Chem.MolecularGraph  molgraph,
Chem.MolecularGraph  parent,
bool   modify = True,
bool   strip_aro_subst = True 
)
Parameters
molgraph
parent
modify
strip_aro_subst

◆ getHashCode()

int CDPL.ConfGen.CanonicalFragment.getHashCode ( )
Returns

◆ getAtomMapping()

Chem.AtomMapping CDPL.ConfGen.CanonicalFragment.getAtomMapping ( )
Returns