Returns the image or the ipython rendering.
mols_list (list) – The list of the rdkit molecules to depict
filename (str) – The filename of the image
ipython (bool) – If True, the SVG rendering for jupiter-nootebook are returned
legends (list) – List of titles subfigure for each molecule
highlightAtoms (list) – List of list of atom index to highlight.
mols_perrow (int) – The number of subfigures per row
svg – If ipython set as True, the SVG rendering is returned
SVG
Returns a SmallMol object of a ligand by its drug name. This molecule is retrieve from Chembl. It is possible to return also the smile of the ligand.
sm (moleculekit.smallmol.smallmol.SmallMol) – The SmallMol object
smile (str) – The smile
Example
>>> sm = getChemblLigandByDrugName('paracetamol')
>>> sm.numAtoms
20
>>> sm, smile = getChemblLigandByDrugName('paracetamol', returnSmile=True)
>>> smile
'CC(=O)Nc1ccc(O)cc1'
Returns a SmallMolLib object of the ligands having a similarity with a smile of at least the specified threshold.. This molecules are retrieve from Chembl. It is possible to return also the list smiles.
sm (moleculekit.smallmol.smallmol.SmallMol) – The SmallMol object
smiles (str) – The list of smiles
Example
>>> _, smile = getChemblLigandByDrugName('ibuprofen', returnSmile=True)
>>> lib = getChemblSimilarLigandsBySmile(smile)
>>> lib.numMols
4
>>> lib, smiles = getChemblSimilarLigandsBySmile(smile, returnSmiles=True)
>>> len(smiles)
4
Returns a SmallMol object of a ligand by its three letter lignane. This molecule is retrieve from RCSB and a mol2 written. It is possible to return also the mol2 filename.
sm (moleculekit.smallmol.smallmol.SmallMol) – The SmallMol object
mol2filename (str) – The mol2 filename
Example
>>> from moleculekit.molecule import Molecule
>>> mol = Molecule('4eiy')
>>> np.unique(mol.get('resname', 'not protein and not water'))
array(['CLR', 'NA', 'OLA', 'OLB', 'OLC', 'PEG', 'ZMA'], dtype=object)
>>> sm = getRCSBLigandByLigname('ZMA')
SmallMol module...
>>> sm.numAtoms
40
>>> sm, mol2filename = getRCSBLigandByLigname('ZMA', returnMol2=True)
>>> mol2filename
'/tmp/tmp....mol2'