schrodinger.livedesign.format module

Format endpoints for LiveDesign.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.livedesign.format.parse_format(format_name: str) Format
Parameters:

format_name – name of a Format enum member (e.g. “MDL_MOLV3000”)

Returns:

the corresponding Format enum value

Raises:

ValueError – if the name doesn’t match any Format member

schrodinger.livedesign.format.split_data_blocks(data: str, input_format: Format, options: Optional[RegistrationOptions] = None)

Iterates across serialized formats, yielding a single data block at a time. Supports iterating across SD, Maestro, and FASTA files; other formats are returned as a single block. NOTE: if a FASTA mapping is set on the registration options, the FASTA is parsed as a single block.

Parameters:
  • data – input text string

  • input_format – input format of the data

  • options – registration options

Returns:

an iterator of data blocks

schrodinger.livedesign.format.split_text_blocks(data: str, input_format: str) list[str]

Splits a multi-record input string into its component text blocks.

Supports splitting SD files into individual molblocks, FASTA files into individual sequences, and SMILES files into individual lines.

Parameters:
  • data – input text string containing one or more records

  • input_format – format of the input data (e.g. “MDL_MOLV3000”, “FASTA”, “SMILES”)

Returns:

list of individual text blocks