Class AnnotatedSystem
object --+
|
AnnotatedSystem
System that has been annotated with additional chemical
information
The AnnotatedSystem class provides chemical annotation useful
primarily for evaluating smarts patterns. The system is expected to
already have have chemical reasonable bond orders and formal charges, and
to have no missing atoms (e.g. hydrogens). If these criteria cannot be
met, set allow_bad_charges=True in the constructor to bypass these
checks; in that case the AnnotatedSystem can still be used to evaluate
smarts patterns, but patterns making use of the electronic state of the
system (e.g. aromaticity, hybridization, etc.) will not be correct (the
system will appear to be entirely aliphatic). You may also use the
AssignBondOrderAndFormalCharge function to assign reasonable bond orders
and formal charges, assuming there are no missing atoms.
The AnnotatedSystem defines a model for aromaticity. First, the SSSR
(smallest set of smallest rings) is determined. Next, rings which share
bonds are detected and grouped into ring systems. Rings are initially
marked as nonaromatic. If the ring system taken as a whole is deemed to
be aromatic, then all rings within it are aromatic as well; otherwise,
individual rings are checked for aromaticity. Rings are checked in this
fashion until no new rings are found to be aromatic.
A ring system is deemed to be aromatic if it satisfies Huckel's 4N+2
rule for the number of electrons in the ring(s). An internal double bond
(i.e. a bond between two atoms in the ring) adds 2 to the electron count.
An external double bond (a bond between a ring atom and an atom not in
that ring) adds 1 to the electron count. An external double bond between
a carbon and a nonaromatic carbon makes the ring unconditionally
nonaromtic. An atom with a lone pair and no double bonds adds 2 to the
electron count.
|
__init__(self,
sys,
allow_bad_charges=False)
Construct from System. |
|
|
|
|
|
aromatic(self,
atom_or_bond)
Is atom or bond aromatic |
|
|
|
hcount(self,
atom)
Number of bonded hydrogens |
|
|
|
degree(self,
atom)
Number of (non-pseudo) bonds |
|
|
|
valence(self,
atom)
Sum of bond orders of all (non-pseudo) bonds |
|
|
|
loneelectrons(self,
atom)
Number of lone electrons |
|
|
|
hybridization(self,
atom)
Atom hybridization -- 1=sp, 2=sp2, 3=sp3, 4=sp3d, etc. |
|
|
|
ringbondcount(self,
atom)
Number of ring bonds |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
errors
List of errors found during system analysis if allow_bad_charges=True
|
Inherited from object :
__class__
|
__init__(self,
sys,
allow_bad_charges=False)
(Constructor)
|
|
Construct from System. AnnotatedSystem is not updated if System is
subsequently modified.
- Overrides:
object.__init__
|
__repr__(self)
(Representation operator)
|
|
repr(x)
- Overrides:
object.__repr__
- (inherited documentation)
|
hybridization(self,
atom)
|
|
Atom hybridization -- 1=sp, 2=sp2, 3=sp3, 4=sp3d, etc.
Equal to 0 for hydrogen and atoms with no bonds, otherwise max(1,
a.degree() + (a.lone_electrons+1)/2 - 1).
|
errors
List of errors found during system analysis if
allow_bad_charges=True
- Get Method:
- unreachable.errors(self)
- List of errors found during system analysis if allow_bad_charges=True
|