| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Smarts
A Smarts Pattern Matcher
Required parameters:
smartspattern
Methods:
findall(molecule)
Example:
>>> mol = readstring("smi","CCN(CC)CC") # triethylamine
>>> smarts = Smarts("[#6][#6]") # Matches an ethyl group
>>> print smarts.findall(mol)
[(0, 1), (3, 4), (5, 6)]
The numbers returned are the indices (starting from 0) of the atoms
that match the SMARTS pattern. In this case, there are three matches
for each of the three ethyl groups in the molecule.
| Instance Methods | |||
|
|||
|
|||
|
Inherited from |
|||
| Properties | |
|
Inherited from |
| Method Details |
Initialise with a SMARTS pattern.
|
Find all matches of the SMARTS pattern to a particular molecule. Required parameters: molecule |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Dec 06 19:38:38 2012 | http://epydoc.sourceforge.net |