schrodinger.application.steps.converters module

class schrodinger.application.steps.converters.SmilesToMolConverter(*args, **kwargs)

Bases: schrodinger.application.steps.dataclasses.MolOutMixin, schrodinger.stepper.stepper.MapStep

Creates a molecule from the first word in the input string, interpreted as SMILES.

Input

alias of str

mapFunction(string)

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

class schrodinger.application.steps.converters.MolToSmilesConverter(*args, **kwargs)

Bases: schrodinger.application.steps.dataclasses.MolInMixin, schrodinger.stepper.stepper.MapStep

Creates the canonical smiles string for the molecule.

Output

alias of str

mapFunction(mol)

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

class schrodinger.application.steps.converters.MolToStructureConverter(*args, **kwargs)

Bases: schrodinger.application.steps.dataclasses.MolInMixin, schrodinger.application.steps.dataclasses.MaeOutMixin, schrodinger.stepper.stepper.MapStep

Step for converting Chem.Mol to structure.Structure objects.

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

generate_coordinates: bool

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
generate_coordinatesChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

generate_coordinatesReplaced

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

mapFunction(mol)

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

class schrodinger.application.steps.converters.StructureToMolConverter(*args, **kwargs)

Bases: schrodinger.application.steps.dataclasses.MaeInMixin, schrodinger.application.steps.dataclasses.MolOutMixin, schrodinger.stepper.stepper.MapStep

Step for converting structure.Structure to Chem.Mol objects.

mapFunction(st)

The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).

The output may be yielded as a generator, in order to reduce memory usage.

If only a single output is produced for each input, return it as a single-element list.

Parameters

input

this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:

def mapFunction(self, starting_smiles):

class schrodinger.application.steps.converters.MaeFileWriter(*args, **kwargs)

Bases: schrodinger.application.steps.dataclasses.MaeInMixin, schrodinger.stepper.stepper.ReduceStep

A class to write the input Structure objects to a Maestro file.

Output

alias of schrodinger.stepper.stepper.StepperFile

class Settings(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

filename: str

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
filenameChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

filenameReplaced

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

validateSettings()

Check whether the step settings are valid and return a list of SettingsError and SettingsWarning to report any invalid settings. Default implementation checks that all stepper files are set to valid file paths.

Return type

list[TaskError or TaskWarning]

reduceFunction(strucs)

The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.

Example:

def reduceFunction(self, words):
    # Find all unique words
    seen_words = set()
    for word in words:
        if word not in seen_words:
            seen_words.add(word)
            yield word