schrodinger.application.bioluminate.antibody.assembly_yaml module

class schrodinger.application.bioluminate.antibody.assembly_yaml.AntibodyFormat

Bases: StrEnum

BISPECIFIC = 'bispecific'
MONOSPECIFIC = 'monospecific'
FAB = 'fab'
FV = 'fv'
class schrodinger.application.bioluminate.antibody.assembly_yaml.ChainData(sequence: str, resids: List[str], seqtype: <schrodinger.infra.unusable_module_importer.DummyModule object at 0x7d1f7ada1fd0>, residues: Any)

Bases: object

sequence: str
resids: List[str]
seqtype: <schrodinger.infra.unusable_module_importer.DummyModule object at 0x7d1f7ada1fd0>
residues: Any
__init__(sequence: str, resids: ~typing.List[str], seqtype: <schrodinger.infra.unusable_module_importer.DummyModule object at 0x7d1f7ada1fd0>, residues: ~typing.Any) None
schrodinger.application.bioluminate.antibody.assembly_yaml.get_driver_parser() ArgumentParser

Return a parser that knows only the arguments that the driver job shouldn’t pass through to the subjobs.

schrodinger.application.bioluminate.antibody.assembly_yaml.parse_args(argv: List[str]) Namespace

Parse the command-line arguments.

schrodinger.application.bioluminate.antibody.assembly_yaml.validate_assigned_domains(arg_list: List[str]) None

Validate that there are arguments set and that none of the arguments over define the antibody structure.

Parameters:

arg_list – the list of assigned arguments

Raises:

argparse.ArgumentTypeError – if no input arguments are provided or if the provided arguments lead to an over definition of antibody structure.

For example:
>>> validate_assigned_domains(['heavy_fv', 'light_fv'])
>>> # This will not raise an error
>>> validate_assigned_domains(['heavy_fv1', 'heavy_fv'])
>>> # This will raise an argparse.ArgumentTypeError as both heavy_fv1 and
>>> # heavy_fv arguments are provided which leads to an over definition
>>> # of antibody structure (both defining heavy_fv1).
schrodinger.application.bioluminate.antibody.assembly_yaml.ensure_no_domains_reused(arg_list: List[str]) None

Validate that the domains are not reused in the arguments.

Parameters:

arg_list – command-line arguments

schrodinger.application.bioluminate.antibody.assembly_yaml.get_job_spec_from_args(argv: List[str]) JobSpecification

Return the job specification necessary to run under job control.

Parameters:

argv – List of command-line arguments, including the script name.

schrodinger.application.bioluminate.antibody.assembly_yaml.get_log_filename(args: Namespace) str

Get the file name for the log file.

Parameters:

args – command-line arguments

schrodinger.application.bioluminate.antibody.assembly_yaml.get_default_log_filename(args: Namespace) str

Get the default log file name.

Parameters:

args – command-line arguments

schrodinger.application.bioluminate.antibody.assembly_yaml.get_all_domain_structure_files(yaml_files: List[str]) Iterator[str]

Read in a list of yaml files and return a list of all domain structure files.

Parameters:

yaml_files – list of yaml files

schrodinger.application.bioluminate.antibody.assembly_yaml.get_domain_structure_files(yaml_dicts: Dict[str, Any]) Iterator[str]

Read in a dictionary of dictionaries and yield the domain structure file names.

Parameters:

yaml_dicts – instruction dictionaries from the yaml files

schrodinger.application.bioluminate.antibody.assembly_yaml.load_yaml_dictionaries(yaml_filenames: List[str]) Iterator[Dict[str, Any]]

Read the yaml file and yield yaml dictionaries.

Parameters:

yaml_filenames – list of yaml files

schrodinger.application.bioluminate.antibody.assembly_yaml.extract_input_st_filenames(input_args: Dict[str, Any]) Dict[str, Any]

Extract the input structures.

Parameters:

input_args – command-line arguments in a dictionary format

schrodinger.application.bioluminate.antibody.assembly_yaml.make_instructions(yaml_dicts: Dict[str, Any]) DomainAssemblyInstruction

Read a dictionary of dictionaries and create assembly.DomainAssemblyInstructions.

Parameters:

yaml_dicts – instruction dictionary from the yaml files

schrodinger.application.bioluminate.antibody.assembly_yaml.get_output_filename(input_filename: str) str

Derives output file name from input file name.

Parameters:

input_filename – input file name

schrodinger.application.bioluminate.antibody.assembly_yaml.get_instructions_from_yaml(args: Namespace) List[DomainAssemblyInstruction]

Read the yaml file and create a list of instructions.

Parameters:

args – command-line arguments

schrodinger.application.bioluminate.antibody.assembly_yaml.read_structures(args: Namespace) Dict[str, Any]

Transform the namespace into a dictionary where the input structures have been read in.

Parameters:

args – command-line arguments

schrodinger.application.bioluminate.antibody.assembly_yaml.compile_instructions_for_format(format: str, input_domains: Dict[str, Structure], template_structure: Structure) Iterator[DomainAssemblyInstruction]

Compile the assembly instructions from files supplied by the user.

Parameters:

input_dict – the dictionary describing the input

schrodinger.application.bioluminate.antibody.assembly_yaml.compute_template_data(struct: Structure) Dict[str, Any]

Get the sequence, resid list, and sequence type for each chain in the structure.

Parameters:

struct – structure to compute data for

schrodinger.application.bioluminate.antibody.assembly_yaml.compute_data(antibody: Structure) Dict[str, Any]

Get the sequence, resid list, and sequence type for each chain in the antibody.

Parameters:

antibody – structure to compute data for

schrodinger.application.bioluminate.antibody.assembly_yaml.get_chain_pairs(disulfide_bonds: List[Tuple[StructureAtom, StructureAtom]], template_data: Dict[str, Any]) List[Tuple[str, str]]

Get the heavy and light chain pairs.

Parameters:
  • disulfide_bonds – the disulfide bonds

  • template_data – the template data

schrodinger.application.bioluminate.antibody.assembly_yaml.compute_domain_data(input_structures: Dict[str, Structure]) Dict[str, Any]

Compute the domain data.

Parameters:

input_structures – the input structures

schrodinger.application.bioluminate.antibody.assembly_yaml.match_input_parts(input_dict: Dict[str, Any]) None

Match the input parts.

Parameters:

input_dict – the domain data

schrodinger.application.bioluminate.antibody.assembly_yaml.get_matching_domain(template_data: Dict[str, Any], domain_key: str, template_domain_used: Dict[str, list]) Tuple[Dict[str, Any], int]

Get the matching template domain.

Parameters:
  • template_data – the dictionary of the template data

  • domain_key – the domain key

  • template_domain_used – the dictionary of the template domains used

schrodinger.application.bioluminate.antibody.assembly_yaml.get_arm_index(domain_key: str, template_domain_used: Dict[str, bool]) int

Get the arm index.

Parameters:
  • domain_key – the domain key

  • template_domain_used – the template domains that have been used

schrodinger.application.bioluminate.antibody.assembly_yaml.get_domain_key_pair(domain_key: str) str

Get the domain key pair.

Parameters:

domain_key – the domain key

schrodinger.application.bioluminate.antibody.assembly_yaml.single_ab_chain(domain_label: str) bool

Check if the domain label implies two chains.

Parameters:

domain_label – the domain label

schrodinger.application.bioluminate.antibody.assembly_yaml.get_next_unused_arm_index(template_domain_used: Dict[str, int]) int

Get the next unused arm index.

Parameters:

template_domain_used – the template domains that have been used

schrodinger.application.bioluminate.antibody.assembly_yaml.get_matching_arm(template_data: Dict[str, Any], arm_index: int) Dict[str, Any]

Get the matching arm.

Parameters:
  • template_data – the dictionary of the template data

  • arm_index – the index of the arm

schrodinger.application.bioluminate.antibody.assembly_yaml.get_template_domain(matching_arm: Dict[str, Any], domain_name: str) Dict[str, Any]

Get the template domain.

Parameters:
  • matching_arm_chains – the matching arm chains

  • domain_name – the domain name

schrodinger.application.bioluminate.antibody.assembly_yaml.get_align_asl(domain_key: str, struct_dict: Dict[str, Any]) str

Get the alignment asl for the domain.

Parameters:
  • domain_key – the domain key

  • struct_dict – the structure dictionary

schrodinger.application.bioluminate.antibody.assembly_yaml.get_segment_indices(chain_dict: Dict[str, Any], domain_key: str) Tuple[int, int]

Get the segment indices of the chain: either the segment describing the FV region or the segment describing the FAB region depending on the domain key provided for domain alignment.

Parameters:
  • chain_dict – the chain dictionary

  • domain_key – the domain key

schrodinger.application.bioluminate.antibody.assembly_yaml.get_start_range_end_lists(resids: List[str], align_start_index: int, align_end_index: int) Tuple[List[str], List[str], List[str]]

Take the residues and based on the start and end of the alignment, determine if there are insertion codes and if the align asl is simply a range of numbers or needs to contain addtional strings.

Parameters:
  • resids – the list of resids

  • align_start_index – the index of the start of the alignment

  • align_end_index – the index of the end of the alignment

Returns:

the start, range, and end resid lists

The start and end lists are populated if there are insertion codes at the start and end. The range list is populated as the largest range of unambiguous resids.

Example: resids = [‘H:1’, ‘H:1A’, ‘H:2’, ‘H:3’, ‘H:3A’, ‘H:4’, ‘H:5’, ‘H:6’, ‘H:6A’] align_start_index = 1 align_end_index = 7 start_resids = [‘H:1A’] (if ‘H:1A’ was in the range it would include ‘H:1’) range_resids = [‘H:2’, ‘H:3’, ‘H:3A’, ‘H:4’, ‘H:5’] end_resids = [‘H:6’] (if ‘H:6’ was in the range it would include ‘H:6A’)

schrodinger.application.bioluminate.antibody.assembly_yaml.form_resid_defaultdict(resids: List[str]) Dict[str, List[str]]

Get a dictionary where the keys are each residue number and the values are the corresonding resid list (any resid with the same resnum).

Parameters:

resids – the list of resids

schrodinger.application.bioluminate.antibody.assembly_yaml.form_inscode_asl(resids: List[str]) str

Form the inscode asl.

Parameters:

resids – the list of resids to make an iscode asl for

schrodinger.application.bioluminate.antibody.assembly_yaml.form_range_asl(resids: List[str]) str

Get the starting and ending resid from a list and make an asl with the range between those two resids.

Parameters:

resids – the list of resids to make a range asl for

schrodinger.application.bioluminate.antibody.assembly_yaml.get_bond_asl(domain_key: str, domain_dict: Dict[str, Any], template_dict: Dict[str, Any]) List[Dict[str, str]]

Get the domain bond asl for the domain.

Parameters:
  • domain_key – the domain key

  • domain_dict – the domain dictionary

  • template_dict – the template dictionary

schrodinger.application.bioluminate.antibody.assembly_yaml.get_matching_chains(domain_dict: Dict[str, Any], template_dict: Dict[str, Any]) Iterator[Tuple[str, str]]

Get the map of domain to template.

Parameters:
  • domain_dict – the domain dictionary

  • template_dict – the template dictionary

schrodinger.application.bioluminate.antibody.assembly_yaml.get_heavy_light_chains(struct_dict: Dict[str, Any]) Tuple[str, str]

Get the heavy and light chain, chain names where the structure dictionary contains only one heavy and one light chain. An error will be raised if there are more than one heavy or light chain.

Parameters:

struct_dict – the domain dictionary

schrodinger.application.bioluminate.antibody.assembly_yaml.get_domain_bond(domain_key: str, domain_chain: ChainData, template_chain: ChainData) Dict[str, str]

Get the domain bond.

Parameters:
  • domain_chain – the domain chain

  • template_chain – the template chain

schrodinger.application.bioluminate.antibody.assembly_yaml.get_bond_residue(residues: Iterator[Any], index: int) str

Get the model atom.

Parameters:
  • residues – the residues

  • index – the index

schrodinger.application.bioluminate.antibody.assembly_yaml.main(argv=None)