Package schrodinger :: Package application :: Package matsci :: Package genetic_optimization :: Module genetic_optimization :: Class Property
[hide private]
[frames] | no frames]

Class Property

object --+
         |
        Property

Manage a property to be used in a genetic optimization.

Instance Methods [hide private]
 
__init__(self, index=1, key=None, name=None, units=None, minimax=None, target=None, comparator=None, error=None, weight=1.0, positive=None, structure_property=False, patterns=None, summarize=None)
Create an instance.
 
setAttributes(self, index=1, key=None, name=None, units=None, minimax=None, target=None, comparator=None, error=None, weight=1.0, positive=None, structure_property=False, patterns=None, summarize=None)
Set some attributes for this class.
 
parsePropertyString(self, property_string)
Parse the attributes of this class from a string representation of the property specifications.
 
checkProperty(self)
Check this property instance.
 
__repr__(self)
Define a representation of the class.
 
__eq__(self, other_property)
Define an equality of the class.

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

Class Variables [hide private]
  MAX = 'max'
  MIN = 'min'
  EQUALS = 'eq'
  GREATER_THAN = 'gt'
  LESS_THAN = 'lt'
  SUB_OPTIONS = ['index', 'key', 'name', 'units', 'minimax', 'ta...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, index=1, key=None, name=None, units=None, minimax=None, target=None, comparator=None, error=None, weight=1.0, positive=None, structure_property=False, patterns=None, summarize=None)
(Constructor)

 

Create an instance.

Parameters:
  • index (int) - a numeric index used to refer to this Property instance, a default of 1 is used
  • key (str) - the schrodinger.structure.Structure property key to be optimized
  • name (str) - specify a name for the property, this name will be, for example used in any *log files, etc.
  • units (str) - enter the units that the property is in, for example eV, nm, etc.
  • minimax (str) - to minimize or maximize this property then set this option to the class constants MIN or MAX
  • target (float) - if instead of maximizing or minimizing the property, the genetic optimization is supposed to handle a specific value then enter that value using this option.
  • comparator (str) - specify here how the target value and computed values are to be compared, i.e. either the class constants EQUALS for =, GREATER_THAN for >, or LESS_THAN for <.
  • error (float) - if equality to a target value has been specified then this option allows the user to control the error bounds of the target value, if not specified then a default of 10% of the specified target value will be used.
  • weight (float) - specify the weight to use for this property, if the genetic optimization is to be run on several properties then the weight allows the user to bias the solution. This option can also be used to control a situation where more than a single property is desired and where those properties are quantified using different physical units such that the numbers might be orders of magnitude apart from one another, for example comparing eV and nm. A default of 1.0 is used.
  • positive (bool) - True if this property can only take on positive values, for example as in the area of a surface, False otherwise, for example as in temperature in Celcius. The default is False.
  • structure_property (bool) - True if this property is a structure property, False otherwise, i.e. if this property requires an external calculation, typically for physical observables
  • patterns (list) - contains SMARTS patterns
  • summarize (bool) - if True then print a summary of this property, False otherwise
Overrides: object.__init__

setAttributes(self, index=1, key=None, name=None, units=None, minimax=None, target=None, comparator=None, error=None, weight=1.0, positive=None, structure_property=False, patterns=None, summarize=None)

 

Set some attributes for this class.

Parameters:
  • index (int) - a numeric index used to refer to this Property instance, a default of 1 is used
  • key (str) - the schrodinger.structure.Structure property key to be optimized
  • name (str) - specify a name for the property, this name will be, for example used in any *log files, etc.
  • units (str) - enter the units that the property is in, for example eV, nm, etc.
  • minimax (str) - to minimize or maximize this property then set this option to the class constants MIN or MAX
  • target (float) - if instead of maximizing or minimizing the property, the genetic optimization is supposed to handle a specific value then enter that value using this option.
  • comparator (str) - specify here how the target value and computed values are to be compared, i.e. either the class constants EQUALS for =, GREATER_THAN for >, or LESS_THAN for <.
  • error (float) - if equality to a target value has been specified then this option allows the user to control the error bounds of the target value, if not specified then a default of 10% of the specified target value will be used.
  • weight (float) - specify the weight to use for this property, if the genetic optimization is to be run on several properties then the weight allows the user to bias the solution. This option can also be used to control a situation where more than a single property is desired and where those properties are quantified using different physical units such that the numbers might be orders of magnitude apart from one another, for example comparing eV and nm. A default of 1.0 is used.
  • positive (bool) - True if this property can only take on positive values, for example as in the area of a surface, False otherwise, for example as in temperature in Celcius. The default is False.
  • structure_property (bool) - True if this property is a structure property, False otherwise, i.e. if this property requires an external calculation, typically for physical observables
  • patterns (list) - contains SMARTS patterns
  • summarize (bool) - if True then print a summary of this property, False otherwise

parsePropertyString(self, property_string)

 

Parse the attributes of this class from a string representation of the property specifications. For example, 'index=1 key=r_matsci_Reduction_Potential_(eV) name=reduction units=eV target=1.28 comparator=eq error=0.05 weight=0.5' or 'index=2 key=r_matsci_Oxidation_Potential_(eV) name=oxidation units=eV minimax=max weight=2.5'

Parameters:
  • property_string (str) - the string representation of the property specifications

__repr__(self)
(Representation operator)

 

Define a representation of the class.

Overrides: object.__repr__

Class Variable Details [hide private]

SUB_OPTIONS

Value:
['index',
 'key',
 'name',
 'units',
 'minimax',
 'target',
 'comparator',
 'error',
...