Class AtomBondCountAnnotator
BaseAnnotator.BaseAnnotator --+
|
AtomBondCountAnnotator
Collect multiple and various atom counts for the input OEMolBase. More
efficient to calculate these all with one multiple annotator since
they're all based on the same loop through the components of the
molecule.
>>> annotator = AtomBondCountAnnotator();
>>> print callBySmiles( annotator, "c1ccccc1O");
[13, 7, 6, 1, 0, 6, 0, 13, 10, 3, 0, 0]
>>> print callBySmiles( annotator, "OC(C)N");
[11, 4, 2, 1, 1, 7, 1, 10, 10, 0, 0, 0]
>>> print callBySmiles( annotator, "COCN(C)C");
[17, 6, 4, 1, 1, 11, 0, 16, 16, 0, 2, 0]
>>> print callBySmiles( annotator, "C1OCNCO1");
[13, 6, 3, 2, 1, 7, 0, 13, 13, 0, 0, 0]
>>> print callBySmiles( annotator, "C1OC(C)NCO1");
[16, 7, 4, 2, 1, 9, 1, 16, 16, 0, 0, 0]
>>> print callBySmiles( annotator, "C1O[C@H](C)NCO1");
[16, 7, 4, 2, 1, 9, 1, 16, 16, 0, 0, 0]
>>> print callBySmiles( annotator, "OC=CN");
[9, 4, 2, 1, 1, 5, 0, 8, 7, 1, 0, 1]
>>> print callBySmiles( annotator, "OC=C");
[7, 3, 2, 1, 0, 4, 0, 6, 5, 1, 0, 0]
>>> print callBySmiles( annotator, "OC=CO");
[8, 4, 2, 2, 0, 4, 0, 7, 6, 1, 0, 1]
>>> >>> annotator.specifyColumns(
["num_heavy_atoms", "num_o", "num_n"] );
>>> print callBySmiles( annotator, "c1ccccc1O"); [7,
1, 0] >>> print callBySmiles( annotator, "OC(C)N");
[4, 1, 1] >>> print callBySmiles( annotator,
"COCN(C)C"); [6, 1, 1] >>> print callBySmiles(
annotator, "C1OCNCO1"); [6, 2, 1] >>> print
callBySmiles( annotator, "C1OC(C)NCO1"); [7, 2, 1] >>>
print callBySmiles( annotator, "C1O[C@H](C)NCO1"); [7, 2, 1]
>>> >>> annotator = AtomBondCountAnnotator(
["num_c"] ); >>> print callBySmiles( annotator,
"c1ccccc1O"); [6] >>> print callBySmiles( annotator,
"OC(C)N"); [2] >>> print callBySmiles( annotator,
"COCN(C)C"); [4] >>> print callBySmiles( annotator,
"C1OCNCO1"); [3] >>> print callBySmiles( annotator,
"C1OC(C)NCO1"); [4] >>> print callBySmiles( annotator,
"C1O[C@H](C)NCO1"); [4]
|
allColumns(self)
Return an ordered sequence of all the column names that this
multiple annotator can generate values for. |
|
|
|
allValues(self,
input)
Return an ordered sequence of all the values this multiple
annotator can calculate off of the input. |
|
|
Inherited from BaseAnnotator.BaseAnnotator :
__init__ ,
annotateDict ,
iteritems ,
iterkeys ,
itervalues ,
keys ,
specifyColumns ,
values
|
Inherited from BaseAnnotator.BaseAnnotator :
specificCols
|
Return an ordered sequence of all the column names that this multiple
annotator can generate values for.
To facilitate ease of filtering with case-insensitivity, all of the
values returned by this method should be lowercase.
- Overrides:
BaseAnnotator.BaseAnnotator.allColumns
- (inherited documentation)
|
Return an ordered sequence of all the values this multiple annotator
can calculate off of the input. The order must correspond to the column
list returned by allColumns so the caller can know which element is
which.
- Overrides:
BaseAnnotator.BaseAnnotator.allValues
- (inherited documentation)
|