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: LigandRaises: NoSuchLigandErrorif 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 Ligandobjects
-
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 Ligandobjects.
-
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: LigandRaises: NoSuchLigandErrorif 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
Ligandobjects.
-
class
pygtop.ligands.Ligand(json_data)[source]¶ A Guide to PHARMACOLOGY ligand object.
Parameters: json_data – A dictionary obtained from the web services. -
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
-
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 Ligandobjects
-
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 Ligandobjects
-
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 Ligandobjects
-
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 Ligandobjects
-
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
-
hydrogen_bond_acceptors()[source]¶ Returns the number of hydrogen bond accepting atoms.
Return type: int
-
topological_polar_surface_area()[source]¶ Returns the polar surface area of the ligand in Angstroms.
Return type: float
-
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
-
absorption_and_distribution_comments()[source]¶ Returns comments pertaining to absorption and distribution.
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
-
database_links()[source]¶ 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: InteractionRaises: 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 Targetobjects
-
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 strPDB 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
strPDB 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 strPDB 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
strPDB 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 strPDB 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 strPDB 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 strPDB 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 strPDB 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
-