schrodinger.livedesign.custom_entity.registration module

This file contains the registration logic for custom entities.

General Description:

This module retrieves the RegistrationData objects for custom entities.

Common Registration Examples:

You can use this module to register:

  • Example 1: Monospecific Antibody An antibody with one unique heavy chain, one unique light chain, one unique antibody arm and a full antibody (containing two duplicate arms)

  • Example 2: Bispecific Antibody An antibody with one or two unqiue heavy chains, one or two unique light chains, two unique antibody arms and a full antibody (containing two unique arms)

  • Example 3: ADC An antibody-drug conjugate with a small molecule, a link and a full antibody (either monospecific or bispecific described above)

  • Example 4: OLED An OLED with layer(s) that contain formulation(s).

A general example can be formulated using the following template:

general_entity = {

‘entity_type’: <A known entity from the EntityClass>, ‘input_property_data’: <A dictionary describing any/all additional input data>, ‘chemical_information’: <A representation of the chemical information (SMILES string, Helm string, etc)> ‘children’: [(child_entity, <Number of repeating child entities>)]

}

The child_entity can be described using the general entity example. When there are no children, an empty list can be provided or the key/value pair omitted.

Unsupported Features:

Currently, this module does not support entities that do not have a corresponding EntityClass. However, custom entities can be constructed and designed using ‘Unknown’ EntityClass types.

class schrodinger.livedesign.custom_entity.registration.EntityComponent

Bases: StrEnum

CUSTOM_ENTITY_NAME = 'custom_entity_name'
INPUT_PROPERTY_DATA = 'input_property_data'
CHEMICAL_INFORMATION = 'chemical_information'
CHILDREN = 'children'
COUNT = 'self_count'
FORMAT = 'format'
class schrodinger.livedesign.custom_entity.registration.ChildDataComponent

Bases: StrEnum

COUNT = 'Count'
RDMOL_BINARY = 'rdmol_binary'
class schrodinger.livedesign.custom_entity.registration.InputPropertyDataComponent

Bases: StrEnum

THICKNESS = 'thickness'
ID = 'ID'
LAYER = 'Layer'
schrodinger.livedesign.custom_entity.registration.get_registration_data(data: str, input_format: Format, options: Optional[RegistrationOptions] = None) Iterator[RegistrationData]
schrodinger.livedesign.custom_entity.registration.extract_registration_data(entity: dict, options: Optional[RegistrationOptions] = None) Iterator[RegistrationData]

Given a tree-like structure of dictionaries representing a custom entity, yield RegistrationData objects.

The tree is traversed depth-first, and the tree nodes are yielded (post-order traversal) as RegistrationData objects. The children of each node are processed first, and then the parent node is processed. This traversal is done recursively.

Parameters:

entity – The dictionary stack.

Returns:

An iterator of RegistrationData objects.

schrodinger.livedesign.custom_entity.registration.get_rdmol_binary(chemical_model: Mol) str

Given a chemical model, return the corresponding rdmol_binary string.

Parameters:

chemical_model – The rdmol object.

Returns:

The corresponding rdmol binary string.

schrodinger.livedesign.custom_entity.registration.get_display_string(chemical_model: Mol) str | None

Given a chemical model, return the corresponding display string. Will return a SMILES string for atomistic models and a HELM string for monomeric models.

Parameters:

chemical_model – The chemical model.

Returns:

The corresponding display string.