Package cinfony :: Module webel :: Class Smarts
[frames] | no frames]

Class Smarts

source code

object --+
         |
        Smarts

A Smarts Pattern Matcher

Required parameters:
   smartspattern

Methods:
   match(molecule)

Example:
>>> mol = readstring("smi","CCN(CC)CC") # triethylamine
>>> smarts = Smarts("[#6][#6]") # Matches an ethyl group
>>> smarts.match(mol) 
True

Instance Methods
 
__init__(self, smartspattern)
Initialise with a SMARTS pattern.
source code
 
match(self, molecule)
Does a SMARTS pattern match a particular molecule?
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, smartspattern)
(Constructor)

source code 

Initialise with a SMARTS pattern.

Overrides: object.__init__

match(self, molecule)

source code 
Does a SMARTS pattern match a particular molecule?

Required parameters:
   molecule