schrodinger.application.phase.input module

Module for reading and writing Phase configuration/input files.

class schrodinger.application.phase.input.InputSpecs(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.Enum

Enumeration of valide PhaseHypothesisInputConfig specs.

find_common = 0
create_hypo = 1
create_xvol = 2
class schrodinger.application.phase.input.PhaseHypothesisInputConfig(input_file=None, specs=InputSpecs.find_common)

Bases: schrodinger.application.inputconfig.InputConfig

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).

__init__(input_file=None, specs=InputSpecs.find_common)

Initializes the inputconfig settings with given input file.

Parameters
  • infile (str) – input filename

  • specs (InputSpecs) – input yaml specs

generateSpecs(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 InputConfig spec strings

Return type

list of strings

asNamedTuple()

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

Returns

cast of current (validated) settings as a namedtuple

Return type

namedtuple

validateKeywords()

Validates that all set keywords are supported.

Raises

ValueError – Error message if keyword is not supported

validateInput()

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

schrodinger.application.phase.input.inputconfig_subset(specs, settings_namedtuple)

Generates a PhaseHypothesisInputConfig using the specified specs, and corresponding values found in the namedtuple.

Parameters
  • specs (InputSpecs) – input yaml specs

  • settings_namedtuple (DriverSettings) – named tuple settings

Returns

Phase InputConfig object

Return type

PhaseHypothesisInputConfig