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] [source]¶
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] [source]¶
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.median_sublimation_free_energy(sublimation_dgs: List[schrodinger.application.desmond.measurement.Measurement]) schrodinger.application.desmond.measurement.Measurement [source]¶
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 [source]¶
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(ct: schrodinger.structure._structure.Structure) None [source]¶
Update the fep solubility property to mark the structure as being soluble. The input ct is modified in place.
- Parameters
ct – Structure to mark as soluble.
- schrodinger.application.desmond.solubility_utils.is_structure_soluble(ct: schrodinger.structure._structure.Structure) bool [source]¶
Return True if the structure has been marked as soluble, False otherwise.
- Parameters
ct – Structure to check if marked as soluble.
- schrodinger.application.desmond.solubility_utils.is_soluble(exposures: List[float]) bool [source]¶
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(baseline_ct: schrodinger.structure._structure.Structure, exposure_ct: schrodinger.structure._structure.Structure, delete_h_atoms=True) List[float] [source]¶
Calculates the exposure of each molecule in a structure based on SASA and returns a list of exposure of each molecule by index of each molecule in the structure - 1 (since structure.molecule is a 1-indexed list). By default this functiion deletes all H atoms from the specified structure. To retain H atoms set delete_h_atoms to False.
- Parameters
baseline_ct – Structure of an individual molecule used as the reference.
exposure_ct – Structure used for the list of molecule exposures.
delete_h_atoms – Set to True to delete all H atoms from the structure when calculating SASA.
- 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] [source]¶
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_solvation(max_num_solvation: int)[source]¶
- 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 [source]¶
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] [source]¶
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] [source]¶
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] [source]¶
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 [source]¶