schrodinger.comparison.results module

class schrodinger.comparison.results.Result(st0, e, x, lattice_params)

Bases: tuple

e

Alias for field number 1

lattice_params

Alias for field number 3

st0

Alias for field number 0

x

Alias for field number 2

class schrodinger.comparison.results.ResultSet(window: float, is_close: Callable, bin_size: float = 20, first_come_first_serve=False)

Bases: object

This class maintains unique data of Result with respect to is_close within an energy window measured from the lowest energy Result.

To get the results, access data.

The results are subject to 1) energy windowing 2) de-duplication using is_close

__init__(window: float, is_close: Callable, bin_size: float = 20, first_come_first_serve=False)
Parameters
  • window – Result whose energy is outside the energy window is not accessible

  • is_close – it takes two Result objects as input and returns True if they are redundant.

  • bin_size – only Result objects whose energies are within bin_size will be compared by is_close

  • first_come_first_serve – If not set, when duplicates are found, the lower energy one is kept. If set, the first one seen is kept.

is_new_result(new_res: schrodinger.comparison.results.Result) Tuple[bool, Optional[list]]

Check if new_res is distinct from all existing data. If so, also return the bucket where it should be added to

add(new_res: schrodinger.comparison.results.Result) bool

Attempt to add new result and return True if succeeded. A new result is added if it differs from all existing results in terms of the is_close function.

update(*other_sets: schrodinger.comparison.results.ResultSet, skip_similarity_check=False)
Parameters
  • other_sets – other ResultSet to be merged in

  • skip_similarity_check – if False, only add element if it is unique

add_results_raw(unique_results: List[schrodinger.comparison.results.Result])

Add results directly without checking uniqueness.

add_result_raw(res: schrodinger.comparison.results.Result)

insert res without checking closeness.

get_cutoff() float

Return energy cutoff

Any Result whose energy is higher than cutoff is discarded

property data: List[schrodinger.comparison.results.Result]

Return unique Results whose energies are less than the cutoff