Package schrodinger :: Package application :: Package phase :: Module pt_hypothesis
[hide private]
[frames] | no frames]

Module pt_hypothesis

Module for manipulating hypothesis entries in the project table.

Classes [hide private]
  PhaseHypothesisMonitor
This class provides signals that are emitted when hypothesis is changed.
Functions [hide private]
PhaseHypothesisMonitor
get_hypo_monitor()
This function returns global PhaseHypothesisMonitor object that should be used to monitor signals emitted when hypothesis is changed.
 
update_hypothesis_entry(hypo, entry_id)
Updates the structure in the project table for the given entry ID with the current PhaseHypothesis.
str
_get_hypothesis_datafile(entry_id)
Returns the path to a hypothesis data file for a given hypothesis entry ID.
list of project.ProjectRow
_get_hypothesis_rows(hypo_entry_id)
Collects all entries in the group associated with the passed hypothesis entry ID, which contain the same hypothesis ID property value.
PhaseHypothesis
get_hypothesis_from_project(entry_id)
Gets hypothesis with a given entry id from the project.
 
convert_project_hypotheses(project_handle)
Converts all hypothesis datafiles in the original Phase format into PhaseHypothesis (PhpHypoAdaptor) objects.
bool
is_hypothesis_entry(entry_id)
Returns whether project table row is a Phase hypothesis entry or not.
Variables [hide private]
  logger = log.get_output_logger(__file__)
  HYP_DATA_FILENAME = 'hypothesis.hyp'
  maestro = schrodinger.get_maestro()
  hypo_monitor = None
hash(x)
  __package__ = 'schrodinger.application.phase'
Function Details [hide private]

get_hypo_monitor()

 

This function returns global PhaseHypothesisMonitor object that should be used to monitor signals emitted when hypothesis is changed.

Returns: PhaseHypothesisMonitor
PhaseHypothesisMonitor

update_hypothesis_entry(hypo, entry_id)

 

Updates the structure in the project table for the given entry ID with the current PhaseHypothesis.

Parameters:
  • entry_id (int or str) - entry id to set hypothesis to

_get_hypothesis_datafile(entry_id)

 

Returns the path to a hypothesis data file for a given hypothesis entry ID. If the entry is not a hypothesis, or the HYP_DATA_FILENAME does not exist, return None.

Parameters:
  • entry_id (int) - hypothesis entry ID
Returns: str
path to corresponding HYP_DATA_FILENAME

_get_hypothesis_rows(hypo_entry_id)

 

Collects all entries in the group associated with the passed hypothesis entry ID, which contain the same hypothesis ID property value.

Parameters:
  • hypo_entry_id - hypothesis entry ID
  • hypo_entry_id - int
Returns: list of project.ProjectRow
list of rows associated with the given hypothesis

get_hypothesis_from_project(entry_id)

 

Gets hypothesis with a given entry id from the project. It creates a hypothesis object from entries within same hypothesis group.

Parameters:
  • entry_id (int) - hypothesis ID
Returns: PhaseHypothesis
Phase hypothesis

convert_project_hypotheses(project_handle)

 

Converts all hypothesis datafiles in the original Phase format into PhaseHypothesis (PhpHypoAdaptor) objects. If successful, each hypothesis is updated in the project to the new format. If the given entry ID does not have a corresponding hypothesis datafile, nothing is done.

Parameters:

is_hypothesis_entry(entry_id)

 

Returns whether project table row is a Phase hypothesis entry or not.

Parameters:
  • entry_id (int) - entry ID for row in project table
Returns: bool
True if the row is a hypothesis entry, false Otherwise