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 probe structures, and writes SMILES, titles, a list of user-specified properties, the highest probe similarity and the name of the highest similarity 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) or list(structure.Structure)) – Probe structures, supplied as a list of SMILES strings or structure.Structure 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.

  • 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