Hotspot Utilities API

The hotspots.utilities module contains classes to for general functionality.

The main classes of the hotspots.extraction module are:
class hotspots.hs_utilities.Coordinates(x, y, z)
property x

Alias for field number 0

property y

Alias for field number 1

property z

Alias for field number 2

class hotspots.hs_utilities.Figures[source]

Class to handle the generation of hotspot related figures

TO DO: is there a better place for this to live?

static histogram(hr)[source]

creates a histogram from the hotspot scores

Parameters

hr (hotspots.result.Results) – a Fragment Hotspot Map result

Returns

data, plot

class hotspots.hs_utilities.Helper[source]

A class to handle miscellaneous functionality

static cavity_centroid(obj)[source]

returns the centre of a cavity

Parameters

obj – can be a ccdc.cavity.Cavity or

Returns

Coordinate

static cavity_from_protein(prot)[source]

currently the Protein API doesn’t support the generation of cavities directly from the Protein instance this method handles the tedious writing / reading

Parameters

prot (ccdc.protein.Protein) – protein

Returns

ccdc.cavity.Cavity

static get_atom_type(atom)[source]

return the atom classification

Parameters

atom

Returns

static get_distance(coords1, coords2)[source]

given two coordinates, calculates the distance

Parameters
  • coords1 (tup) – float(x), float(y), float(z), coordinates of point 1

  • coords2 (tup) – float(x), float(y), float(z), coordinates of point 2

Returns

float, distance

static get_label(input, threshold=None)[source]

creates a value labels from an input grid dictionary

Parameters

input (dic) – key = “probe identifier” and value = ccdc.utilities.Grid

Return ccdc.molecule.Moleculeccdc.molecule.Molecule

pseduomolecule which contains score labels

static get_lines_from_file(fname)[source]

gets lines from text file, used in Ghecom calculation

Returns

list, list of str

static get_out_dir(path)[source]

checks if directory exists, if not, it create the directory

Parameters

path (str) – path to directory

Return str

path to output directory