Package schrodinger :: Package utils :: Module ligfilter :: Class PropertyCriterion
[hide private]
[frames] | no frames]

Class PropertyCriterion

Criterion --+
            |
           PropertyCriterion

A structure matching criterion that acts on the presence or value of a specific structure property.

If no comparison string is provided, the criterion will check for the presence of property 'name'. Otherwise it will compare the value against the comparison string definition.

Instance Methods [hide private]
 
__init__(self, name=None, compstr=None)
Parameters
 
matches(self, st, addprops=False)
Return True if structure 'st' matches this criterion, False if not.
 
getvalue(self, st)
Return the value of the property for this structure.

Inherited from Criterion: __str__, match_compstr, parseLine, setCompStr

Method Details [hide private]

__init__(self, name=None, compstr=None)
(Constructor)

 

Parameters

    name - the name of the property being evaluated

    compstr - the property comparison string to be used if present
              currently in format "<operator> <value>"

If name or compstr are not specified, parseLine() method should be used

Overrides: Criterion.__init__

matches(self, st, addprops=False)

 

Return True if structure 'st' matches this criterion, False if not.

st (Structure) - Structure object addprops (bool) - ignored for property criterions

Overrides: Criterion.matches

getvalue(self, st)

 

Return the value of the property for this structure. Returns None if the property does not exist.

Overrides: Criterion.getvalue