Package schrodinger :: Package application :: Package phase :: Module input :: Class PhaseHypothesisInputConfig
[hide private]
[frames] | no frames]

Class PhaseHypothesisInputConfig

   object --+                
            |                
         dict --+            
                |            
configobj.Section --+        
                    |        
  configobj.ConfigObj --+    
                        |    
  inputconfig.InputConfig --+
                            |
                           PhaseHypothesisInputConfig

Settings/Validation InputConfig class for the Phase Hypothesis Driver.

The class acts as a container and validator for calling driver property setters through the (keyword, value) interface, or in the case of indexable attributes, the (keyword, index, value).

Instance Methods [hide private]
new empty dictionary

__init__(self, input_file=None, specs=<InputSpecs.find_common: 0>)
Initializes the inputconfig settings with given input file.
list of strings
generateSpecs(self, input_mode, append_comments=False)
Builds InputConfig spec list from yaml file stored in module directory.
str
_getSpecString(self, spec)
Returns a spec string compatible with InputConfig.
namedtuple
asNamedTuple(self)
Returns the current settings as a validated namedtuple for driver use.
 
validateKeywords(self)
Validates that all set keywords are supported.
 
validateInput(self)
Validates all values and keywords, removing entries that are set to None prior to inputConfig.validateValues() so it does not throw error

Inherited from inputconfig.InputConfig: getSpecsString, printout, validateValues, writeInputFile

Inherited from inputconfig.InputConfig (private): _quote

Inherited from configobj.ConfigObj: __repr__, reload, reset, validate, write

Inherited from configobj.ConfigObj (private): _a_to_u, _decode, _decode_element, _get_single_quote, _get_triple_quote, _handle_bom, _handle_comment, _handle_configspec, _handle_error, _handle_value, _initialise, _load, _match_depth, _multiline, _parse, _set_configspec, _str, _unquote, _write_line, _write_marker

Inherited from configobj.Section: __delitem__, __getitem__, __iter__, __reduce__, __setitem__, __setstate__, __str__, as_bool, as_float, as_int, as_list, clear, dict, get, items, iteritems, iterkeys, itervalues, keys, merge, pop, popitem, rename, restore_default, restore_defaults, setdefault, update, values, walk

Inherited from configobj.Section (private): _interpolate

Inherited from dict: __cmp__, __contains__, __eq__, __ge__, __getattribute__, __gt__, __le__, __len__, __lt__, __ne__, __new__, __sizeof__, copy, fromkeys, has_key, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]

Inherited from configobj.ConfigObj (private): _bools, _keyword, _listvalueexp, _multi_line_double, _multi_line_single, _nolistvalue, _sectionmarker, _single_line_double, _single_line_single, _triple_quote, _valueexp

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, input_file=None, specs=<InputSpecs.find_common: 0>)
(Constructor)

 

Initializes the inputconfig settings with given input file.

Parameters:
  • infile (str) - input filename
  • specs (InputSpecs) - input yaml specs
Returns:
new empty dictionary

Overrides: object.__init__

generateSpecs(self, input_mode, append_comments=False)

 

Builds InputConfig spec list from yaml file stored in module directory. Optionally adds comments for keyword usage output.

Parameters:
  • input_mode (InputSpecs) - input keyword mode
  • append_comments (bool) - whether to append comments to spec strings
Returns: list of strings
list of InputConfig spec strings

_getSpecString(self, spec)

 

Returns a spec string compatible with InputConfig.

Parameters:
  • spec (dict) - dictionary of spec parameters
Returns: str
InputConfig spec string, formed as keyword = value(options)

asNamedTuple(self)

 

Returns the current settings as a validated namedtuple for driver use.

Returns: namedtuple
cast of current (validated) settings as a namedtuple

validateKeywords(self)

 

Validates that all set keywords are supported.

Raises:
  • ValueError - Error message if keyword is not supported

validateInput(self)

 

Validates all values and keywords, removing entries that are set to None prior to inputConfig.validateValues() so it does not throw error

Raises:
  • ValueError - Error message if keyword is not supported