pygtop.ligands (Ligands)

Contains ligand-specific objects and functions.

pygtop.ligands.get_ligand_by_id(ligand_id)[source]

Returns a Ligand object of the ligand with the given ID.

Parameters:ligand_id (int) – The GtoP ID of the Ligand desired.
Return type:Ligand
Raises:NoSuchLigandError if no such ligand exists in the database
pygtop.ligands.get_all_ligands()[source]

Returns a list of all ligands in the Guide to PHARMACOLOGY database. This can take a few seconds.

Returns:list of Ligand objects
pygtop.ligands.get_ligands_by(criteria)[source]

Get all ligands which specify the criteria dictionary.

Parameters:criteria (dict) – A dictionary of field=value pairs. See the GtoP ligand web services page for key/value pairs which can be supplied.
Returns:list of Ligand objects.
pygtop.ligands.get_ligand_by_name(name)[source]

Returns the ligand which matches the name given.

Parameters:name (str) – The name of the ligand to search for. Note that synonyms will not be searched.
Return type:Ligand
Raises:NoSuchLigandError if no such ligand exists in the database.
pygtop.ligands.get_ligands_by_smiles(smiles, search_type='exact', cutoff=0.8)[source]

Search for ligands by SMILES string.

Parameters:
  • smiles (str) – The SMILES string to search with.
  • search_type (str) – The type of search. Viable options are "exact", "substructure" or "similarity".
  • cutoff (float) – If performing a similarity search, this is the cutoff used for similarity. The default is 0.8 and the maximum is 1.
Returns:

list of Ligand objects.

class pygtop.ligands.Ligand(json_data)[source]

A Guide to PHARMACOLOGY ligand object.

Parameters:json_data – A dictionary obtained from the web services.
ligand_id()[source]

Returns the ligand’s GtoP ID.

Return type:int
name(*args, strip_html=False, **kwargs)

Returns the ligand’s name.

Parameters:strip_html (bool) – If True, the name will have HTML entities stripped.
Return type:str
abbreviation(*args, strip_html=False, **kwargs)

Returns the ligand’s abbreviated name.

Parameters:strip_html (bool) – If True, the abbreviation will have HTML entities stripped.
Return type:str
inn(*args, strip_html=False, **kwargs)

Returns the ligand’s INN name.

Parameters:strip_html (bool) – If True, the name will have HTML entities stripped.
Return type:str
ligand_type()[source]

Returns the ligand’s type.

Return type:str
species()[source]

Returns the ligand’s species, where appropriate.

Return type:str
radioactive()[source]

Returns True if the ligand is radioactive.

Return type:bool
labelled()[source]

Returns True if the ligand is labelled.

Return type:bool
approved()[source]

Returns True if the ligand is approved.

Return type:bool
withdrawn()[source]

Returns True if the ligand has been withdrawn.

Return type:bool
approval_source(*args, strip_html=False, **kwargs)

Returns the regulatory body that approved the ligand, where appropriate.

Parameters:strip_html (bool) – If True, the name will have HTML entities stripped.
Return type:str
subunit_ids()[source]

Returns the the ligand IDs of all ligands which are subunits of this target.

Returns:list of int
subunits()[source]

Returns a list of all ligands which are subunits of this ligand.

Returns:list of Ligand objects
complex_ids()[source]

Returns the the ligand IDs of all ligands of which this target is a subunit.

Returns:list of int
complexes()[source]

Returns a list of all ligands of which this ligand is a subunit.

Returns:list of Ligand objects
prodrug_ids()[source]

Returns the the ligand IDs of all ligands which are prodrugs of this ligand.

Returns:list of int
prodrugs()[source]

Returns a list of all ligands which are prodrugs of this ligand.

Returns:list of Ligand objects
active_drug_ids()[source]

Returns the the ligand IDs of all ligands which are active equivalents of this ligand.

Returns:list of int
active_drugs()[source]

Returns a list of all ligands which are active equivalents of this ligand.

Returns:list of Ligand objects
iupac_name()[source]

Returns the ligand’s IUPAC name.

Return type:str
smiles()[source]

Returns the ligand’s SMILES string.

Return type:str
inchi()[source]

Returns the ligand’s InChI string.

Return type:str
inchi_key()[source]

Returns the ligand’s InChI key.

Return type:str
one_letter_sequence()[source]

Returns the ligand’s single letter amino acid sequence where appropriate.

Return type:str
three_letter_sequence()[source]

Returns the ligand’s three letter amino acid sequence where appropriate.

Return type:str
post_translational_modifications()[source]

Returns any post-translational modifications.

Return type:str
chemical_modifications()[source]

Returns any chemical modifications.

Return type:str
hydrogen_bond_acceptors()[source]

Returns the number of hydrogen bond accepting atoms.

Return type:int
hydrogen_bond_donors()[source]

Returns the number of hydrogen bond donor atoms.

Return type:int
rotatable_bonds()[source]

Returns the number of rotatable bonds in the ligand.

Return type:int
topological_polar_surface_area()[source]

Returns the polar surface area of the ligand in Angstroms.

Return type:float
molecular_weight()[source]

Returns the ligand’s mass in Daltons.

Return type:float
log_p()[source]

Returns the logP value of the ligand.

Return type:int
lipinski_rules_broken()[source]

Returns the number of Lipinski’s Rules the ligand breaks.

Return type:int
synonyms(*args, strip_html=False, **kwargs)

Returns the number ligand’s synonyms

Returns:list of str
general_comments()[source]

Returns general comments pertaining to the ligand.

Return type:str
bioactivity_comments()[source]

Returns comments pertaining to bioactivity.

Return type:str
clinical_use_comments()[source]

Returns comments pertaining to clinical use.

Return type:str
mechanism_of_action_comments()[source]

Returns comments pertaining to mechanism.

Return type:str
absorption_and_distribution_comments()[source]

Returns comments pertaining to absorption and distribution.

Return type:str
metabolism_comments()[source]

Returns comments pertaining to metabolism.

Return type:str
elimination_comments()[source]

Returns comments pertaining to elimination from the body.

Return type:str
population_pharmacokinetics_comments()[source]

Returns comments pertaining to population pharmacokinetics.

Return type:str
organ_function_impairments_comments()[source]

Returns comments pertaining to organ function impairment.

Return type:str
mutations_and_pathophysiology_comments()[source]

Returns comments pertaining to mutations and pathophysiology.

Return type:str

Returns a list of database links for this ligand.

Return type:list of DatabaseLink
interactions()[source]

Returns a list of interactions for this ligand.

Return type:list of Interaction
get_interaction_by_id(interaction_id)

Returns an Interaction object of a given ID belonging to the ligand.

Parameters:interaction_id (int) – The interactions’s ID.
Return type:Interaction
Raises:NoSuchInteractionError: if no such interaction exists in the database.
targets()[source]

Returns a list of all targets which this ligand interacts with.

Returns:list of Target objects
gtop_pdbs(*args, as_molecupy=False, **kwargs)

Returns a list of PDBs which the Guide to PHARMACOLOGY says contain this ligand.

Parameters:as_molecupy (bool) – Returns the PDBs as molecuPy PDB objects.
Returns:list of str PDB codes
smiles_pdbs(*args, as_molecupy=False, **kwargs)

Queries the RSCB PDB database with the ligand’s SMILES string.

Parameters:
  • search_type (str) – The type of search to run - whether exact matches only should be returned.
  • as_molecupy (bool) –

    Returns the PDBs as molecuPy PDB objects.

Returns:

list of str PDB codes

inchi_pdbs(*args, as_molecupy=False, **kwargs)

Queries the RSCB PDB database with the ligand’s InChI string.

Parameters:as_molecupy (bool) –

Returns the PDBs as molecuPy PDB objects.

Returns:list of str PDB codes
name_pdbs(*args, as_molecupy=False, **kwargs)

Queries the RSCB PDB database with the ligand’s name.

Parameters:
  • comparator (str) – The type of search to run - whether exact matches only should be returned, or substrings etc.
  • as_molecupy (bool) –

    Returns the PDBs as molecuPy PDB objects.

Returns:

list of str PDB codes

sequence_pdbs(*args, as_molecupy=False, **kwargs)

Queries the RSCB PDB database with the ligand’s amino acid sequence, if that ligand is a peptide.

Parameters:as_molecupy (bool) –

Returns the PDBs as molecuPy PDB objects.

Returns:list of str PDB codes
het_pdbs(*args, as_molecupy=False, **kwargs)

Queries the RSCB PDB database with the ligand’s amino acid sequence, if that ligand is a peptide.

Parameters:as_molecupy (bool) –

Returns the PDBs as molecuPy PDB objects.

Returns:list of str PDB codes
all_external_pdbs(*args, as_molecupy=False, **kwargs)

Queries the RSCB PDB database by all parameters.

Parameters:as_molecupy (bool) –

Returns the PDBs as molecuPy PDB objects.

Returns:list of str PDB codes
all_pdbs(*args, as_molecupy=False, **kwargs)

Get a list of PDB codes using all means available - annotated and external.

Parameters:as_molecupy (bool) –

Returns the PDBs as molecuPy PDB objects.

Returns:list of str PDB codes
find_in_pdb_by_smiles(molecupy_pdb)[source]

Searches for the ligand in a molecuPy PDB object by SMILES string and returns the small molecule it finds.

Parameters:molecupy_pdb – The molecuPy PDB object.
Return type:SmallMolecule
find_in_pdb_by_name(molecupy_pdb)[source]

Searches for the ligand in a molecuPy PDB object by ligand name and returns the small molecule it finds.

Parameters:molecupy_pdb – The molecuPy PDB object.
Return type:SmallMolecule
find_in_pdb_by_mass(molecupy_pdb)[source]

Searches for the ligand in a molecuPy PDB object by ligand mass and returns the small molecule it finds.

Parameters:molecupy_pdb – The molecuPy PDB object.
Return type:SmallMolecule
find_in_pdb_by_peptide_string(molecupy_pdb)[source]

Searches for the ligand in a molecuPy PDB object by peptide sequence and returns the chain it finds.

Parameters:molecupy_pdb – The molecuPy PDB object.
Return type:Chain