williamgilpin / pypdb

A Python API for the RCSB Protein Data Bank (PDB)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to search PDBID via smiles of ligands

jhxu003 opened this issue · comments

hi,
I'm wondering how I can search for PDBIDs using ligand SMILES. For example:

from pypdb import *
#
found_pdbs = Query("Clc1nc(Br)nc2nc[nH]c12").search()
print(found_pdbs[:10])

I'm able to find the PDBID I want using the 'chemical similarity' option on the 'https://www.rcsb.org/' website. However, I'm unable to achieve the same result using the code above. Can you please advise on the appropriate query_type to use in this case?