schrodinger.application.desmond.solubility_utils module

schrodinger.application.desmond.solubility_utils.extract_solute_ct(cms_model: schrodinger.application.desmond.cms.Cms) Optional[schrodinger.structure._structure.Structure]

Returns a structure representing the solute component of the input cms file. The solute should come before the solvent if there are custom charges present.

Parameters

cms_model – Input cms object to extract the solute from.

Returns

Solute structure object or None if no solute is found

schrodinger.application.desmond.solubility_utils.get_transfer_free_energy(cms_model: schrodinger.application.desmond.cms.Cms) Optional[schrodinger.application.desmond.measurement.Measurement]

Returns the transfer free energy as a Measurement or None if the property could not be found. Depending on the leg that the cmd corresponds to, this could be sublimation, solvation, or hydration dGs.

Parameters

cms_model – Input cms object to extract the transfer free energy from.

schrodinger.application.desmond.solubility_utils.contains_aqueous_dissolution_legs(legs: List[graph.Leg]) bool

Determine whether the given list of legs represents an “aqueous dissolution” process, which has at least one sublimation leg and exactly one hydration leg.

Parameters

legs – the list of legs

schrodinger.application.desmond.solubility_utils.get_dissolution_dg_from_legs(legs: List[graph.Leg]) Optional[schrodinger.application.desmond.measurement.Measurement]

Given a list of leg objects, return what would be their “dissolution dg”. This value is the difference between a hydration dG, and the median of all the sublimation dGs.

Parameters

legs – list of leg objects, with valid dGs. Should have one hydration leg, and at least one sublimation leg

Returns

the solubility free energy of the given list of legs if the valid legs are present, otherwise None

schrodinger.application.desmond.solubility_utils.median_sublimation_free_energy(sublimation_dgs: List[schrodinger.application.desmond.measurement.Measurement]) schrodinger.application.desmond.measurement.Measurement

Returns the median sublimation free energy. For an odd number this is the median, for an even number this is the one closest to the average.

Parameters

sublimation_dgs – List of sublimation transfer free energy measurements.

schrodinger.application.desmond.solubility_utils.calculate_solubility_free_energy(hydration_dg: schrodinger.application.desmond.measurement.Measurement, sublimation_dg: schrodinger.application.desmond.measurement.Measurement) schrodinger.application.desmond.measurement.Measurement

Returns the dissolution free energy.

NOTE:
  • “Sublimation” leg actually simulates deposition (gas -> solid)

  • Solvation/hydration legs simulate solvation (solid -> solvated)

  • Dissolution (“solubility”) free energy = Hydration - “Sublimation”

Parameters
  • hydration_dg – Hydration transfer free energy measurement.

  • sublimation_dg – Sublimation transfer free energy measurement.

schrodinger.application.desmond.solubility_utils.set_structure_soluble(st: schrodinger.structure._structure.Structure) None

Update the fep solubility property to mark the structure as being soluble. The input st is modified in place.

Parameters

st – Structure to mark as soluble.

schrodinger.application.desmond.solubility_utils.is_structure_soluble(st: schrodinger.structure._structure.Structure) bool

Return True if the structure has been marked as soluble, False otherwise.

Parameters

st – Structure to check if marked as soluble.

schrodinger.application.desmond.solubility_utils.is_soluble(exposures: List[float]) bool

If more than 10% of the solute molecules have a exposure greater than 90.0, flag the molecule as soluble (< 5 kcal/mol transfer energy).

Parameters

exposures – List of exposure for each molecule in the structure.

Returns

True if this molecule is considered soluble, False otherwise.

schrodinger.application.desmond.solubility_utils.get_molecule_exposures(st: schrodinger.structure._structure.Structure) List[float]

Calculates the exposure of each molecule in a structure based on a ratio of the SASA of the molecule in solution to the SASA of the isolated molecule.

Parameters

st – Structure of solute molecules with solvent removed

Returns

List of exposure for each molecule in the structure.

schrodinger.application.desmond.solubility_utils.extract_most_exposed_solute_molecules(solute_ct: schrodinger.structure._structure.Structure, exposures: List[float], extract_count=5) List[schrodinger.structure._structure.Structure]

Takes the solute component of an input system and returns the extract_count most exposed molecules ordered by exposure.

If less than extract_count solute molecules are present, the returned list contains all solute molecules sorted by exposure.

Parameters
  • solute_ct – Input ct file containing the system to process.

  • exposures – Input ct file containing the system to process.

  • extract_count – The number of molecules to extract.

Returns

List of extract_count most exposed solute mols.

schrodinger.application.desmond.solubility_utils.get_header(max_num_sublimation: int)
schrodinger.application.desmond.solubility_utils.get_header_solvation(max_num_solvation: int)
schrodinger.application.desmond.solubility_utils.get_report(title: str, hydration_dg: Optional[schrodinger.application.desmond.measurement.Measurement] = None, sublimation_dgs: Optional[List[schrodinger.application.desmond.measurement.Measurement]] = None, solvation_dgs: Optional[List[schrodinger.application.desmond.measurement.Measurement]] = None, is_soluble: bool = False) str

Returns the formatted results as csv file contents.

Parameters
  • title – Title of the ligand.

  • hydration_dg – Hydration transfer free energy measurement. Must be specified if is_soluble is False.

  • sublimation_dgs – List of sublimation transfer free energy measurements. Must be specified if is_soluble is False.

  • solvation_dgs – List of solvation transfer free energy measurements.

  • is_soluble – Set to True if this ligand was determined to be soluble in the MD stage.

schrodinger.application.desmond.solubility_utils.parse_report(csv_contents: str) Dict[str, Dict]

Parse a report csv and return a ParsedReport mapping the ligand to the result. Each result is a dictionary where the keys are the columns from the csv.

schrodinger.application.desmond.solubility_utils.calculate_report_rmse(ref_data: Dict[str, Dict], test_data: Dict[str, Dict]) Dict[str, float]

Calculate the rsme between the parsed reference data and the test data. Missing data is treated as infinite difference

Used in STU and SCIVAL tests.

Returns

Dictionary where the keys are the column names and the values are the rmse for that column.

schrodinger.application.desmond.solubility_utils.parse_output_structure_properties(sts: List[schrodinger.structure._structure.Structure]) Dict[str, Dict]

Parse the ct level solubility properties from report structures and return the dictionary of {compound: {property: value}}. Missing values are set to None.

Used in STU and SCIVAL tests.

schrodinger.application.desmond.solubility_utils.bootstrapped_solvation_free_energy(solvation_dgs: List[schrodinger.application.desmond.measurement.Measurement]) schrodinger.application.desmond.correlation_tau.ConfidenceInterval
schrodinger.application.desmond.solubility_utils.get_solvation_dg(edge: graph.Edge) Optional[float]

Calculate the bootstrapped solvation free energy for a given Edge, returning None if there are no solvation legs.