Hotspot Pharmacophore API

The hotspots.hs_pharmacophore module contains classes for the conversion of Grid objects to pharmacophore models.

The main class of the hotspots.hs_pharmacophore module is:

A Pharmacophore Model can be generated directly from a hotspots.result.Result :

>>> from hotspots.calculation import Runner
>>> r = Runner()
>>> result = r.from_pdb("1hcl")
>>> result.get_pharmacophore_model(identifier="MyFirstPharmacophore")

The Pharmacophore Model can be used in Pharmit or CrossMiner

>>> result.pharmacophore.write("example.cm")   # CrossMiner
>>> result.pharmacophore.write("example.json")    # Pharmit
More information about CrossMiner is available:
  • Korb O, Kuhn B, hert J, Taylor N, Cole J, Groom C, Stahl M “Interactive and Versatile Navigation of Structural Databases” J Med Chem, 2016, 59(9):4257, [DOI: 10.1021/acs.jmedchem.5b01756]

More information about Pharmit is available:
  • Jocelyn Sunseri, David Ryan Koes; Pharmit: interactive exploration of chemical space, Nucleic Acids Research, Volume 44, Issue W1, 8 July 2016, Pages W442-W448 [DIO: 10.1093/nar/gkw287]

class hotspots.hs_pharmacophore.PharmacophoreModel(settings, identifier=None, features=None, protein=None, dic=None)[source]

A class to handle a Pharmacophore Model

Parameters
  • settings (hotspots.hs_pharmacophore.PharmacophoreModel.Settings) – Pharmacophore Model settings

  • identifier (str) – Model identifier

  • features (list) – list of :class:hotspots.hs_pharmacophore._PharmacophoreFeatures

  • protein (ccdc.protein.Protein) – a protein

  • dic (dict) – key = grid identifier(interaction type), value = ccdc.utilities.Grid

class Settings(feature_boundary_cutoff=5, max_hbond_dist=5, radius=1.0, vector_on=False, transparency=0.6, excluded_volume=True, binding_site_radius=12)[source]

settings available for adjustment

Parameters
  • feature_boundary_cutoff (float) – The map score cutoff used to generate islands

  • max_hbond_dist (float) – Furthest acceptable distance for a hydrogen bonding partner (from polar feature)

  • radius (float) – Sphere radius

  • vector_on (bool) – Include interaction vector

  • transparency (float) – Set transparency of sphere

  • excluded_volume (bool) – If True, the CrossMiner pharmacophore will contain excluded volume spheres

  • binding_site_radius (float) – Radius of search for binding site calculation, used for excluded volume

static from_hotspot(result, identifier='id_01', threshold=5, min_island_size=5, settings=None)[source]

creates a pharmacophore model from a Fragment Hotspot Map result

(included for completeness, equivalent to hotspots.result.Result.get_pharmacophore())

Parameters
Returns

hotspots.hs_pharmacophore.PharmacophoreModel

>>> from hotspots.calculation import Runner
>>> from hotspots.hs_pharmacophore import PharmacophoreModel
>>> r = Runner()
>>> result = r.from_pdb("1hcl")
>>> model = PharmacophoreModel(result, identifier="pharmacophore")
static from_ligands(ligands, identifier, protein=None, settings=None)[source]

creates a Pharmacophore Model from a collection of overlaid ligands

Parameters
  • ligands (ccdc,molecule.Molecule) – ligands from which the Model is created

  • identifier (str) – identifier for the Pharmacophore Model

  • protein (ccdc.protein.Protein) – target system that the model has been created for

  • settings (hotspots.hs_pharmacophore.PharmacophoreModel.Settings) – Pharmacophore Model settings

Returns

hotspots.hs_pharmacophore.PharmacophoreModel

>>> from ccdc.io import MoleculeReader
>>> from hotspots.hs_pharmacophore import PharmacophoreModel
>>> mols = MoleculeReader("ligand_overlay_model.mol2")
>>> model = PharmacophoreModel.from_ligands(mols, "ligand_overlay_pharmacophore")
>>> # write to .json and search in pharmit
>>> model.write("model.json")
static from_pdb(pdb_code, chain, representatives=None, identifier='LigandBasedPharmacophore')[source]

creates a Pharmacophore Model from a PDB code.

This method is used for the creation of Ligand-Based pharmacophores. The PDB is searched for protein-ligand complexes of the same UniProt code as the input. These PDB’s are align, the ligands are clustered and density of atom types a given point is assigned to a grid.

Parameters
  • pdb_code (str) – single PDB code from the target system

  • chain (str) – chain of interest

  • out_dir (str) – path to output directory

  • representatives – path to .dat file containing previously clustered data (time saver)

  • identifier (str) – identifier for the Pharmacophore Model

Returns

hotspots.hs_pharmacophore.PharmacophoreModel

>>> from hotspots.hs_pharmacophore import PharmacophoreModel
>>> from hotspots.result import Results
>>> from hotspots.hs_io import HotspotWriter
>>> from ccdc.protein import Protein
>>> from pdb_python_api import PDBResult
>>> # get the PDB ligand-based Pharmacophore for CDK2
>>> model = PharmacophoreModel.from_pdb("1hcl")
>>> # the models grid data is stored as PharmacophoreModel.dic
>>> # download the PDB file and create a Results
>>> PDBResult("1hcl").download(<output_directory>)
>>> result = Result(protein=Protein.from_file("<output_directory>/1hcl.pdb"), super_grids=model.dic)
>>> with HotspotWriter("<output_directory>") as w:
>>>     w.write(result)
rank_features(max_features=4, feature_threshold=0, force_apolar=True)[source]

orders features by score

Parameters
  • max_features (int) – maximum number of features returned

  • feature_threshold (float) – only features above this value are considered

  • force_apolar – ensures at least one point is apolar

Returns

list of features

>>> from hotspots.hs_io import HotspotReader
>>> result = HotspotReader("out.zip").read()
>>> model = result.get_pharmacophore_model()
>>> print(len(model.features))
38
>>> model.rank_features(max_features=5)
>>> print(len(model.features))
5
write(fname)[source]

writes out pharmacophore. Supported formats:

  • “.cm” (CrossMiner),

  • “.json” (Pharmit),

  • “.py” (PyMOL),

  • “.csv”,

  • “.mol2”

Parameters

fname (str) – path to output file

hotspots.hs_pharmacophore.tanimoto_dist(a, b)[source]

calculate the tanimoto distance between two fingerprint arrays :param a: :param b: :return: