schrodinger.livedesign.sh_utils module

schrodinger.livedesign.sh_utils.generate_sh(st: Structure, structure_scheme: str) str

Generate the structure hierarchy for the given structure.

Parameters:
  • st – structure to generate the hierarchy for.

  • structure_scheme – antibody structure scheme.

Returns:

JSON string representing the structure hierarchy.

schrodinger.livedesign.sh_utils.get_json_formatted_structure_hierarchy(mol_input: str, input_format: Format, structure_schemes: list[str]) str

Generates a JSON string representing the structure hierarchy of the molecule. This is used by LiveDesign to display the structure hierarchy viewer for the molecule and its components.

Note that this only process the first structure in the given string.

Parameters:
  • mol_input – serialized mol

  • input_format – input format of the mol string

  • structure_schemes – List of antibody structure schemes to generate structure hierarchy for.

Returns:

JSON string representing the structure hierarchy along with the scheme used.

schrodinger.livedesign.sh_utils.get_sequence_chain_mapping(st: Structure) dict

Get the mapping of input sequences to their chain names. If input sequences are not provided, then the mapping of sequences to their chain names is returned. Input sequences are provided as a property in the structure and added when the structure is created using homology modeling. Homology modeling does not always result in structures with the exact same sequence as the input sequence, so this mapping is useful to determine which chains correspond to the input sequence.

Parameters:

st – structure object

Returns:

dictionary of sequences to their chain names