schrodinger.application.bioluminate.patch_utils.patch_finder module

schrodinger.application.bioluminate.patch_utils.patch_finder.get_sca_by_res()

Calculate a dict of side-chain accessibilities for each residue and cache it into a global variable.

schrodinger.application.bioluminate.patch_utils.patch_finder.read_asl_file(basename)
schrodinger.application.bioluminate.patch_utils.patch_finder.write_asl_file(basename, asl)
schrodinger.application.bioluminate.patch_utils.patch_finder.get_connected_components(st)

Determine all covalently connected components of st (i.e. unbroken chain segments).

Returns

A tuple of: (1) A list of list of residue names (str). Each list of residue names represents a single covalently connected component. (2) A list of list of schrodinger.structure._Residue objects. This object mirrors the structure of the list of list of residue names.

schrodinger.application.bioluminate.patch_utils.patch_finder.triangle_areas(list_of_coords)

Calculate the area of a triangle defined by three vertices

Parameters

coords (list) – A list of (x, y, z) coordinates for each vertex of the triangle, where each coordinate is a numpy array.

Returns

The area of the specified triangle

Return type

float

Note

The formula used here is taken from http://mathworld.wolfram.com/TriangleArea.html

class schrodinger.application.bioluminate.patch_utils.patch_finder.Patch(vertices, patch_type, vertex_coords, all_smoothed, neighboring_triangles, neighboring_vertices, nearest_atom_indices, patch_color)

Bases: object

Data about a single patch.

RES_TYPES = {'Arginine': 'ARG', 'Cysteine': 'CYS', 'Tryptophan': 'TRP', 'Tyrosine': 'TYR'}
__init__(vertices, patch_type, vertex_coords, all_smoothed, neighboring_triangles, neighboring_vertices, nearest_atom_indices, patch_color)
Parameters
  • vertices (set) – A set of all vertices that belong to this patch

  • patch_type (settings.PatchType) – The type of patch this is

  • vertex_coords (list) – The (x, y, z) coordinates for each surface vertex

  • all_smoothed (list) – The smoothed value for each vertex

  • neighboring_triangles (list) – A list of neighboring triangles for each vertex, where each triangle is represented as a frozenset of three vertex indices.

  • neighboring_vertices (list) – A list of neighboring vertices for each vertex. Neighbors are given as a set.

  • nearest_atom_indices (list) – A list of the nearest atom index for each vertex.

@patch_color: color of the patch (r,g,b)

detailsData()

Generate a list describing the details of this patch

Returns

A dictionary of details for the patch, where each detail is a dict of {group: {category: [patch details for that category]}}

Return type

list

class schrodinger.application.bioluminate.patch_utils.patch_finder.ResInfo(res, zyggregator=None, aggrescan=None, aggscore=0.0)

Bases: object

Data about a single residue. Includes aggregation, surface area, and reactive residue grouping data.

__init__(res, zyggregator=None, aggrescan=None, aggscore=0.0)
Parameters
  • res (schrodinger.structure._Residue) – The residue that this aggregation data describes

  • zyggregator (float) – The Zyggregator score for the residue

  • aggrescan (float) – The Aggrescan score for the residue

property fullname

The full residue name, formatted similar to A:TYR100.

getIdStr()

Return a string ID for this residue, e.g. “A:2b” - same format as structure._Residue.___str__() return value.

getAsl()

Return the ASL for finding this residue by chain/resnum/inscode.

schrodinger.application.bioluminate.patch_utils.patch_finder.ResData

alias of schrodinger.application.bioluminate.patch_utils.patch_finder.ResInfo

class schrodinger.application.bioluminate.patch_utils.patch_finder.ResPatchData(patch, res_info, contribution)

Bases: object

This class represents a residue’s contribution to a patch.

__init__(patch, res_info, contribution)
getAsl()

Return the ASL for finding this patch’s residue by chain/resnum/inscode.

getIdStr()

Return a string ID for the residue, e.g. “A:2b” - same format as structure._Residue.___str__() return value.

class schrodinger.application.bioluminate.patch_utils.patch_finder.ProteinProperties(struc, asa_by_atom)

Bases: object

Calculates protein-level properties. Properties will be stored at the ct-level and returned for display on the Properties tab

Variables

KYTE_DOOLITTLE_SCALE (dict) – A hydrophobicity scale taken from A simple method for displaying the hydropathic character of a protein. J. Kyte, R.F. Doolittle, J Mol Biol. 1982 May 5;157(1):105-32.

KYTE_DOOLITTLE_SCALE = {'ALA': 1.8, 'ARG': -4.5, 'ASN': -3.5, 'ASP': -3.5, 'CYS': 2.5, 'GLN': -3.5, 'GLU': -3.5, 'GLY': -0.4, 'HID': -3.2, 'HIE': -3.2, 'HIP': -3.2, 'HIS': -3.2, 'ILE': 4.5, 'LEU': 3.8, 'LYS': -3.9, 'MET': 1.9, 'PHE': 2.8, 'PRO': -1.6, 'SER': -0.8, 'THR': -0.7, 'TRP': -0.9, 'TYR': -1.3, 'VAL': 4.2}
__init__(struc, asa_by_atom)
Parameters
  • struc (schrodinger.structure.Structure) – The structure to calculate the properties of

  • asa_by_atom (OneIndexedList) – The accessible surface area of each atom

class schrodinger.application.bioluminate.patch_utils.patch_finder.PatchAnalysis(st, surf, asl, clogp_smoothed, partial_charge_smoothed, neighboring_vertices, neighboring_triangles, res_data_by_vertex, prot_properties, topo_data=None)

Bases: object

Object representing a pre-analysis instance, which is saved by the backend and loaded into the GUI. It is also saved/restored when panel state is saved and restored.

__init__(st, surf, asl, clogp_smoothed, partial_charge_smoothed, neighboring_vertices, neighboring_triangles, res_data_by_vertex, prot_properties, topo_data=None)
Parameters
  • st (structure.Structure) – Analyzed structure.

  • surf (schrodinger.surface.Surface) – The surface to find patches on

  • asl (str) – Asl for atoms that were analyzed

  • clogp_smoothed (list) – The cLogP (hydrophobicity) values smoothed over the surface. This list contains the smoothed value at each surface vertex.

  • partial_charge_smoothed (list) – The partial charge values smoothed over the surface. This list contains the smoothed value at each surface vertex.

  • neighboring_vertices (list) – A list of neighboring vertices for each vertex.

  • neighboring_triangles (list) – A list of neighboring triangles for each vertex, where each triangle is represented as a frozenset of three vertex indices.

  • res_data_by_vertex (list) – A list of residue data for each vertex. The ResInfo object is given for the residue closest to the vertex.

  • prot_properties (ProteinProperties) – The protein properties to be loaded into the Properties tab.

  • topo_data (dict(str, str)) – The topography value of all the residues in the structure.

write(basename)
classmethod read(basename)

Read the PreAnalyzer data from the specified basename and use it to create a PatchFinder object.

Parameters

basename (str) – The basename for the PreAnalyzer output files

class schrodinger.application.bioluminate.patch_utils.patch_finder.PreAnalyzer(struc, asl)

Bases: object

Perform patch finding calculations that only need to be done once per structure. This class is intended to be run under job control.

__init__(struc, asl)
Parameters
classmethod readAndRun(basename)

Read a structure and ASL from the specified files and run the analysis.

Parameters

basename (str) – The full path to the file to analyzes except the “.maegz” and “.txt” extensions

Returns

The completed pre-analysis

Return type

PreAnalyzer

run()

Perform the pre-analysis. The results will be stored in instance attributes and can be written to a pickle file using write.

calcAntibodyTopography(res_data_by_res)

Determine the antibody topography for each residue. For non-antibody structures, all values will be None. PANEL-7988

Parameters

res_data_by_res (dict) – A dictionary of ResInfo objects. The topography attribute (str) will be set for each ResInfo object.

Returns

Antibody topography data

Return type

dict(str, str)

write(basename)

Write out the surface and all calculated values

Parameters

basename (str) – The filename to write the output to. The surface will be written to basename.vis and the calculated values will be written to basename.pkl.

getAnalysis()
class schrodinger.application.bioluminate.patch_utils.patch_finder.PatchFinder(analysis)

Bases: object

Find surface patches using the output of PreAnalyzer.

__init__(analysis)

Class for grouping patches from a PatchAnalysis object based on specific settings.

Parameters

analysis (PatchAnalysis) – Pre-analysis object

classmethod read(basename)

Read the PreAnalyzer data from the specified basename and use it to create a PatchFinder object.

Parameters

basename (str) – The basename for the PreAnalyzer output files

write(basename)
calculate(settings)

Calculate patches and residue aggregation data using the specified settings.

Parameters

settings (settings.PatchSettings) – The settings to use for the patch calculations

Returns

A tuple of: - the calculated patches as a list of Patch objects - the residue aggregation data as a list of {ResidueAggData} objects

Return type

tuple

getColorsForPatchVertices(patch, psettings)

Return colors for all vertices of the given patch.

Parameters

patch (patch_finder.Patch) – Patch to get colors for.

Returns

Colors for each vertex of the patch

Return type

list of (float, float, float)

colorSurfByPatches(surf, patches, psettings)