schrodinger.application.steps.utils module

exception schrodinger.application.steps.utils.StepsError

Bases: RuntimeError

schrodinger.application.steps.utils.to_string(obj)

Convert the mol or scored mol to a string representation.

To be used in logging and file writing.

Parameters

obj (Chem.Mol or object) – a step input or output object

Returns

text representation

Return type

str

schrodinger.application.steps.utils.mol_to_structure(mol, step, generate_coordinates=False)

Convert a mol to a structure object catching and reporting exceptions.

Parameters
  • mol (Chem.Mol) – the mol to convert

  • step (stepper._BaseStep) – Step this conversion is being performed for

  • generate_coordinates (bool) – whether coordinates should be generated

Returns

the structure or None if there were issues

Return type

structure.Structure or NoneType

schrodinger.application.steps.utils.structure_to_mol(st, step, input_mol=None)

Convert a structure to a mol object catching and reporting exceptions.

Parameters
  • st (Structure.Structure) – the structure to convert

  • step (stepper._BaseStep) – Step this conversion is being performed for

  • input_mol – the input molecule for this step

Returns

the molecule or None if there were issues

Return type

Chem.Mol or NoneType

schrodinger.application.steps.utils.fragment_to_molecule(fragment)

Create a molecule from a fragment with implicit H.

Parameters

fragment (Chem.Mol) – the fragment

Returns

the molecule version of the fragment

Return type

Chem.Mol

schrodinger.application.steps.utils.validate_core_smarts(step, core_smarts)

Validation of a required core smarts for a step.

Parameters
  • step (stepper.BaseStep) – The step that the validation is for

  • core_smarts (str or NoneType) – the SMARTS to validate

Returns

the list of validation issues

Return type

List[stepper.ValidationIssue]

schrodinger.application.steps.utils.validate_structure_property_name(step, prop_name, prop_types)
Parameters
  • step (stepper.BaseStep) – The step that the validation is for

  • prop_name (str`) – the property name to validate

  • prop_types – the allowed property types

Returns

the list of validation issues

Return type

List[stepper.ValidationIssue]

schrodinger.application.steps.utils.validate_file(step, attr_name, required=False)

Validate a step’s stepper file setting.

If the file setting is required but not defined a stepper.SettingsError will be generated. Depending on the file setting’s resource type, a stepper.StaticResourceError or stepper.LocalResourceError will be generated.

Parameters
  • step (stepper._BaseStep) – the step that the validation is for

  • attr_name (str) – the settings attribute name

  • required (bool) – whether the file has to be defined

Returns

the list of validation issues

Return type

List[stepper.ValidationIssues]

schrodinger.application.steps.utils.validate_folder(step, attr_name, required=False)
schrodinger.application.steps.utils.apply_config_settings_to_step(config_dict, step)

Applies all possible items from settings to the configuration settings of the step.

Parameters
  • config_dict (dict) – the configuration dictionary

  • step (stepper.BaseStep) – the steps to apply the settings to

schrodinger.application.steps.utils.update_params(to_params, from_params)

Update the to_params with the values in from_params.

Parameters
schrodinger.application.steps.utils.validate_smasher_file(smasher_fname)

Validate a Smasher input archive

Parameters

smasher_fname (str) – Filename of the Smasher input to validate

Returns

A string error if issues are encountered, None otherwise.

Return type

str or NoneType