schrodinger.application.phase.packages.oned_app_utils module¶
Provides functionality for custom applications that utilize the 1D similarity technology.
Copyright Schrodinger LLC, All Rights Reserved.
- schrodinger.application.phase.packages.oned_app_utils.get_user_props(filename, props)¶
Given the name of a Maestro, SD, SMILES or SMILES-CSV file and a list m2io-style property names, this function validates the property names and returns a copy of those names unless a SMILES file is supplied, in which case an empty list is returned.
- Parameters
filename (str) – Name of Maestro, SD, SMILES or SMILES-CSV file
props (list(str) or NoneType) – m2io-style property names
- Returns
A copy of the supplied property names (omitting s_m_title and r_phase_1D_Sim) or an empty list.
- Return type
list(str)
- Raise
ValueError if any property name is illegal
- schrodinger.application.phase.packages.oned_app_utils.screen_structure_file(infile, outfile, probes, treatment=0, fd=None, props=None, logger=None)¶
Performs a 1D similarity screen of a structure file using one or more probes, and writes SMILES, titles, a list of user-specified properties, the highest probe similarity and the name of the highest similarity probe probe to a CSV file.
- Parameters
infile (str) – Input Maestro, SD, SMILES or SMILES-CSV file
outfile (str) – Output SMILE-CSV file
probe (list[str], list[structure.Structure] or list[phase.PhpHypoAdaptor]) – Probes, supplied as a list of SMILES strings, a list of structure.Structure objects or a list of phase.PhpHypoAdaptor objects. If SMILES strings, the probe names written to outfile will be ‘probe1’, ‘probe2’, etc.
treatment (phase.OneDTreatment) – Structure treatment for 1D representations
fd (list[phase.PhpFeatureDefinition] or NoneType) – Overrides default feature definitions. Relevant only when treatment is phase.ONED_TREATMENT_PHARM or phase.ONED_TREATMENT.PHARM3D.
props (list[str] or NoneType) – m2io-style properties from infile to include in outfile. If a SMILES file is supplied as input, property names are validated but properties are not written to outfile.
logger (logging.Logger or NoneType) – Logger for WARNING level messages
- Returns
tuple of the number of input structures followed by the number output structures
- Return type
int, int
- schrodinger.application.phase.packages.oned_app_utils.validate_probe(probe)¶
Raises a RuntimeError if the supplied probe is not a valid SMILES string, a structure.Structure or a phase.PhpHypoAdaptor.