schrodinger.application.phase.pt_hypothesis module

Module for manipulating hypothesis entries in the project table.

class schrodinger.application.phase.pt_hypothesis.PhaseHypothesisMonitor

Bases: PyQt6.QtCore.QObject

This class provides signals that are emitted when hypothesis is changed. These signals should be emitted with the hypothesis entry id.

Variables

hypothesisChanged (QtCore.pyqtSignal) – signal emitted when hypothesis is changed

hypothesisChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

schrodinger.application.phase.pt_hypothesis.get_hypo_monitor()

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

Returns

PhaseHypothesisMonitor

Return type

PhaseHypothesisMonitor

schrodinger.application.phase.pt_hypothesis.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

schrodinger.application.phase.pt_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

Phase hypothesis

Return type

PhaseHypothesis

schrodinger.application.phase.pt_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

project_handle (int) – project.Project handle

schrodinger.application.phase.pt_hypothesis.is_hypothesis_entry(entry_id)

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

Parameters

entry_id (int or str) – entry ID for row in project table

Returns

True if the row is a hypothesis entry, false Otherwise

Return type

bool

schrodinger.application.phase.pt_hypothesis.get_hypothesis_entry_ids(entry_id)

Returns entry_ids of all entries in the group associated with the passed hypothesis entry ID.

Parameters
  • hypo_entry_id – hypothesis entry ID

  • hypo_entry_id – int

Returns

list of entry ids associated with the given hypothesis

Return type

list