Package schrodinger :: Package application :: Package bioluminate :: Module surfcomp
[hide private]
[frames] | no frames]

Module surfcomp

See PYTHON-2433 WARNING: Solvents are not accounted for in any way.

Functions [hide private]
 
flatten_list(iterable)
Given an iterable of lists, return a flattened list of all values.
 
create_surface(st, calc_normals=True, grid_spacing=0.5)
 
find_buddies_on_other_surf(buried_a_coords, buried_b_coords)
For each point in the first list, find the closest point from the second list.
 
_calc_sc_per_atom(buried_a_coords, buried_b_coords, a_normals, b_normals, a_nearest)
buried_a_coords - dict of buried surface coordinates of surface A buried_b_coords - dict of buried surface coordinates of surface B a_normals - array of surface normal vectors of surface A b_normals - array of surface normal vectors of surface B a_nearest - dict of an atom index of the closest atom in molecule A to the keyed surface point (index).
 
_calc_complementarity(st, atoms1, atoms2, grid_spacing)
Given 2 atom lists, calculate surface complementarity for each atom in each input set that is within 1.5A of the non-buried surface.
 
calc_complementarity_by_atom(st, atoms1, atoms2=None, grid_spacing=0.5)
Return the values for surface complementarity between the specified surfaces, grouped by atom from <atoms1>.
 
calc_total_complementarity(st, atoms1, atoms2=None, grid_spacing=0.5)
Return the total complementarity between the specified surfaces.
 
_run()
For testing this module from command-line.
Variables [hide private]
  CONST_W = 0.5
  NON_BURIED_DIST = 1.5
  SURF_DIST_THRESHOLD = 3.0
Function Details [hide private]

flatten_list(iterable)

 

Given an iterable of lists, return a flattened list of all values. This algorithm scales in linear time.

find_buddies_on_other_surf(buried_a_coords, buried_b_coords)

 

For each point in the first list, find the closest point from the second list. Returns a dict where keys are indices to the first list, and values are tuples of (index to second list, sq. distance).

_calc_complementarity(st, atoms1, atoms2, grid_spacing)

 

Given 2 atom lists, calculate surface complementarity for each atom in each input set that is within 1.5A of the non-buried surface. The results are returned as 2 dicts. The keys in the dict are atom indices in the corresponding set, values are the Sc values for each surface point for that atom, ranging from ~0 to 1.

Note: Atoms are considered interacting if:

  • they are buried in the full ct surface
  • they are on the surface of the interacting surfaces
  • and they are within 3.0 A of the other interacting surface.

Non-interacting atoms are not included in the returned dictionary.

calc_complementarity_by_atom(st, atoms1, atoms2=None, grid_spacing=0.5)

 

Return the values for surface complementarity between the specified surfaces,
grouped by atom from <atoms1>.

@type st: structure._Structure object
@param st: Structure to which <atoms1> and <atoms2> are indices in.

@type atoms1: Iterable of atom indices
@param atoms1: Atom numbers from the surface for which to calculate the
    complementrairity.

@type atoms2: Iterable of atom indices
@param atoms2 = Atom numbers for the other surface. if not specified, use all
    other atoms from the CT.

@type grid_spacing: float
@param grid_spacing: Density (resolution) of the surfaces. Default is 0.5.
    Maestro defaults for this settings are: high=0.3, medium=0.6, low=0.8.

@rtype: dict of lists.
@return: Each value is a list of atom indices matching the SMARTS
    Will contain an entry for each atom in the given lists as the key,
    and dict value will be a list of surface complementarity (Sc) values
    for that atom. Each value corresponds to an interacting point on the
    surface of that atom. This list will be empty for buried atoms.
    Calculate the median of these values to determine the Sc for that atom.
    Calculate the median of all values for all residue's atoms to determine
    the Sc for that residue; etc.

calc_total_complementarity(st, atoms1, atoms2=None, grid_spacing=0.5)

 

Return the total complementarity between the specified surfaces.

@type st: structure._Structure object
@param st: Structure to which <atoms1> and <atoms2> are indices in.

@type atoms1: Iterable of atom indices
@param atoms1: Atom numbers from the surface for which to calculate the
    complementrairity.

@type atoms2: Iterable of atom indices
@param atoms2 = Atom numbers for the other surface. if not specified, use all
    other atoms from the CT.

@type grid_spacing: float
@param grid_spacing: Density (resolution) of the surfaces. Default is 0.5.
    Maestro defaults for this settings are: high=0.3, medium=0.6, low=0.8.

@rtype: float
@return the surface complementarity (Sc) between the 2 surfaces.