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

Module hypothesis

Module for reading and writing Phase hypotheses.

Classes [hide private]
  PhaseHypothesisMonitor
This class provides signals that are emitted when hypothesis is changed.
  PhaseHypothesis
  PhaseHypothesisStandard
Phase hypothesis created from standard sites found in the given reference ligand.
  PhaseHypothesisStatic
Phase hypothesis created from sites which will all be converted into static fragment sites.
  PhaseHypothesisHybrid
Phase hypothesis created from both sites which will all be converted into static fragment sites, as well as standard sites found in the given reference ligand.
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.
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.
 
sorted_hypo_structures(hypothesis_sts)
Sorts a list of structures for PhaseHypothesis - Phase hypothesis CT - Phase hypothesis reference ligand - Any additional Phase hypothesis ligands
list of PhaseHypothesis
extract_hypotheses(filename)
Extracts all hypotheses from Phase hypothesis file containing multiple hypotheses
 
write_hypotheses(hypotheses, filename, group=None)
Writes set of PhaseHypothesis objects to *_phypo.maegz file.
Variables [hide private]
  logger = log.get_output_logger(__file__)
  SCHRODINGER = '/scr/buildbot/savedbuilds/2017-2/NB/build-142'
  CREATE_HYPOFILES = '/scr/buildbot/savedbuilds/2017-2/NB/build-...
  CREATE_HYPOTAB = '/scr/buildbot/savedbuilds/2017-2/NB/build-14...
  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

_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

sorted_hypo_structures(hypothesis_sts)

 

Sorts a list of structures for PhaseHypothesis
- Phase hypothesis CT
- Phase hypothesis reference ligand
- Any additional Phase hypothesis ligands

@param hypothesis_sts: list of structures
@type hypothesis_sts: list of L{Structure}

@return: hypothesis, reference ligand, additional hypothesis ligands
@rtype: L{Structure}, L{Structure}, list of L{Structure}

extract_hypotheses(filename)

 

Extracts all hypotheses from Phase hypothesis file containing multiple hypotheses

Parameters:
  • filename (str) - *_phypo.mae.gz file containing Phase hypotheses
Returns: list of PhaseHypothesis
list of Phase hypotheses

write_hypotheses(hypotheses, filename, group=None)

 

Writes set of PhaseHypothesis objects to *_phypo.maegz file.

Parameters:
  • hypotheses (list of PhaseHypothesis) - list of Phase hypotheses
  • filename (str) - *_phypo.mae.gz file containing Phase hypotheses
  • group (str) - name to group all hypotheses under

Variables Details [hide private]

CREATE_HYPOFILES

Value:
'/scr/buildbot/savedbuilds/2017-2/NB/build-142/utilities/create_hypoFi\
les'

CREATE_HYPOTAB

Value:
'/scr/buildbot/savedbuilds/2017-2/NB/build-142/utilities/create_hypoTa\
bFile'