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]
  _HypothesisFeature
Class representing a hypothesis feature.
  Hypothesis
  PhaseHypothesis
Functions [hide private]
 
debug(*args)
Print the given arguments, if in debug mode.
 
_get_entry_hypo_data_file(entry)
Returns the PT entry's hypothesis file path (hypothesis.hyp).
phase.PhpHypoAdaptor
get_hypothesis_from_project(hypo_id)
Gets hypothesis with a given hypothesis id from the project.
 
get_entry_hypothesis(entry)
Extract the hypothesis from the given ProjectRow instance, and return a Hypothesis class for it.
 
generate_from_ligand(lig_file, hypo)
Given a structure file, generate a Hypothesis.
 
hypo_exists(hypo)
Returns True, if the hypothesis of the given path exists.
 
remove_hypo_if_present(hypo)
Remove the given hypothesis from disk (if present)
list of lists of ints
get_ligand_groups(ligand_sts)
Groups ligands in an analagous way to phase_database, iterating through the list of ligands and checking if the previous ligand has the same title and connectivity.
 
sorted_hypo_structures(hypothesis_sts)
Sorts a list of structures for PhpHypoAdaptor - Phase hypothesis CT - Phase hypothesis reference ligand - Any additional Phase hypothesis ligands
list of phase.PhpHypoAdaptor
extract_hypotheses(filename)
Extracts all hypotheses from Phase hypothesis file containing multiple hypotheses
 
write_hypotheses(hypotheses, filename, group=None)
Writes set of PhpHypoAdaptor objects to *_phypo.maegz file.
Variables [hide private]
  maestro = schrodinger.get_maestro()
  DEBUG = False
hash(x)
  create_hypoFiles = '/scr/buildbot/savedbuilds/NB/2016-3/build-...
  create_hypoTabFile = '/scr/buildbot/savedbuilds/NB/2016-3/buil...
  __package__ = 'schrodinger.application.phase'
Function Details [hide private]

_get_entry_hypo_data_file(entry)

 

Returns the PT entry's hypothesis file path (hypothesis.hyp). If not available (entry has no hypothesis), returns None.

get_hypothesis_from_project(hypo_id)

 

Gets hypothesis with a given hypothesis id from the project. It first searches for entries with the same hypothesis id and then creates a hypothesis object from found entries.

Parameters:
  • hypo_id (int) - hypothesis ID
Returns: phase.PhpHypoAdaptor
Phase hypothesis

get_entry_hypothesis(entry)

 

Extract the hypothesis from the given ProjectRow instance, and return a Hypothesis class for it.

Returns None if the entry has no hypothesis associated with it.

generate_from_ligand(lig_file, hypo)

 

Given a structure file, generate a Hypothesis. Only the first structure is read.

lig_file - path to the input ligand file hypo - path to the new hypothesis

get_ligand_groups(ligand_sts)

 

Groups ligands in an analagous way to phase_database, iterating through the list of ligands and checking if the previous ligand has the same title and connectivity.

Parameters:
Returns: list of lists of ints
list of conformer index lists by ligand group

sorted_hypo_structures(hypothesis_sts)

 

Sorts a list of structures for PhpHypoAdaptor
- 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 phase.PhpHypoAdaptor
list of Phase hypotheses

write_hypotheses(hypotheses, filename, group=None)

 

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

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

Variables Details [hide private]

create_hypoFiles

Value:
'/scr/buildbot/savedbuilds/NB/2016-3/build-133/utilities/create_hypoFi\
les'

create_hypoTabFile

Value:
'/scr/buildbot/savedbuilds/NB/2016-3/build-133/utilities/create_hypoTa\
bFile'