Package schrodinger :: Package application :: Package desmond :: Package packages :: Package msys :: Class SmartsPattern
[hide private]
[frames] | no frames]

Class SmartsPattern

object --+
         |
        SmartsPattern

A class representing a compiled SMARTS pattern

Instance Methods [hide private]
 
__init__(self, pattern)
Initialize with SMARTS pattern
 
natoms(self)
Number of atoms in the compiled smarts pattern
 
pattern(self)
The pattern used to initialize the object
 
warnings(self)
Warnings, if any, emitted during compilation
 
__repr__(self)
repr(x)
 
findMatches(self, annotated_system, atoms=None)
Return list of lists representing ids of matches of this pattern in this system, optionally requiring that the first atom match belongs to the given set of atoms.
 
match(self, annotated_system)
Return True if a match is found anywhere; False otherwise.

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pattern)
(Constructor)

 

Initialize with SMARTS pattern

Overrides: object.__init__

natoms(self)

 

Number of atoms in the compiled smarts pattern

Decorators:
  • @property

pattern(self)

 

The pattern used to initialize the object

Decorators:
  • @property

warnings(self)

 

Warnings, if any, emitted during compilation

Decorators:
  • @property

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

findMatches(self, annotated_system, atoms=None)

 

Return list of lists representing ids of matches of this pattern in this system, optionally requiring that the first atom match belongs to the given set of atoms. An AnnotatedSystem must be used here, which can be constructed from a System after calling AssignBondOrderAndFormalCharge.

match(self, annotated_system)

 

Return True if a match is found anywhere; False otherwise.

This is much faster than checking for an empty result from findMatches.