schrodinger.application.livedesign.ld_utils module¶
-
schrodinger.application.livedesign.ld_utils.
copy_structure_properties
(rl_map, from_key, to_key, include_receptors)¶ For every ligand in a receptor-ligand map, copy the structure property value at key
from_key
to the structure property at the keyto_key
. Optionally do the same for the receptor structures.Parameters: - rl_map (data_classes.ReceptorLigandMap) – a receptor-ligand map
- from_key (str) – the source structure property key
- to_key (str) – the destination structure property key
- include_receptors (bool) – whether to also copy structure properties for the receptors in the map
-
schrodinger.application.livedesign.ld_utils.
copy_structure_property_value
(st, from_key, to_key)¶ For the supplied structure, copy the value of the structure property stored at
from_key
toto_key
. The value atfrom_key
will remain unchanged. This function should work as expected regardless of whether values atfrom_key
orto_key
are defined.Parameters: - st (structure.Structure) – a structure
- from_key (str) – the source structure property key
- to_key (str) – the destination structure property key
-
schrodinger.application.livedesign.ld_utils.
build_receptor_ligand_map
(structure_map, maestro_data_type)¶ Return a receptor-ligand map containing all of the structures in
structure_map
formatted according to the specified data type.Note that the resulting map will not preserve the receptor keys from
structure_map
; because ligands and receptors are stored as pairs, the ligand key will instead be used in any scenario in which a receptor and ligand are paired.Parameters: - structure_map (dict(str, structure.Structure)) – a dictionary mapping string keys to ligand or receptor structures
- maestro_data_type (data_types.BaseMaestroData) – the data type used for formatting the receptor- ligand map
-
schrodinger.application.livedesign.ld_utils.
update_prop_names
(prop_dicts)¶ Edit the properties to accommodate renaming behavior in SD files; these expect the structure title to have a specific name.
Parameters: prop_dicts (list(OrderedDict(str, str))) – a list of dictionaries each specifying the mapping between a maestro and LD property.
-
schrodinger.application.livedesign.ld_utils.
get_prop_dicts_from_export_data
(export_data_list)¶ Given a list of
data_classes.ExportData
objects, return a corresponding list of property dictionaries (when possible).Parameters: export_data_list (list(data_classes.ExportData)) – a list of export data objects Returns: a list of property dictionaries. Property dictionary formatting should match the dictionary formatting required by the properties
argument ofLDClient.start_export_assay_and_pose_data()
.Return type: list(dict(str, str))
-
schrodinger.application.livedesign.ld_utils.
separate_complex
(complex_st)¶ Given a receptor-ligand complex structure, separate the ligands from the receptors. Return a list of ‘receptor’ structures and a corresponding list of ligand structures. The receptors are the rest of the complex once the ligand has been removed.
Parameters: complex_st (structure.Structure) – a ligand-receptor complex Returns: a receptor list and corresponding ligand list Return type: tuple(list(structure.Structure), list(structure.Structure))
-
schrodinger.application.livedesign.ld_utils.
download_ld_client
(url, tmp_dir, tar_filename, glob_path)¶ Download the ld client under tmp_dir. :param url: url of the ld client :type url: str
Parameters: - tmp_dir (str) – Directory under which ld client will be downloaded
- tar_filename (str) – tar filename of the client (without .tar.gz ext)
- glob_path (str) – glob path with wildcards (ex: ldclient-*)
Returns: Returns the path to the client
Return type: str
Raises: Exception – Raises RuntimeError in case of any error
-
schrodinger.application.livedesign.ld_utils.
remove_previous_existing_files
(dirpath, name)¶ This helper method removed all files and directories matching the given name in the directory specified by dirpath.
Parameters: - dirpath – Path to the directory under which the files needs to be removed
- name (str) – to match any files or directories in the form of ‘name*’