<p>Simpler option would be to not use the query interface  and directly parse the CSV file found on that page.</p>
<p>I just read @llrs comment and I guess it's very much the same spirit as my own - download the data and query it programmatically. I see now (was on mobile earlier) that the 'FIND' URL links out to a BLAST search. so it might be as easy as retrieving the relevant protein sequence and replicating the URL. Or if you want to go a different route and finding all PDB identifiers with the given ligand, cross-reference the above data with what you'd find <a href="http://www.rcsb.org/pdb/rest/customReport.csv?pdbids=*&amp;reportName=Ligands&amp;service=wsfile&amp;format=csv" rel="nofollow noreferrer">here</a></p>

CC BY-SA 4.0
2018-05-18T09:17:06.460Z
2021-06-07T01:30:21.173Z
2021-06-07T01:30:21.173Z
blackgore
<p>The <a href="https://www.rcsb.org/pdb/ligand/drugMapping.do" rel="nofollow noreferrer">drug and drug target mapping</a> tool shows the <strong>top 3</strong> PDB IDs for each drug based on the drug target sequence similarity search and ligand id search. Is there a way to get all the PDB ids of the drug-target PDB files and not only the top 3?</p>

<p>I know you can get this information after clicking the "find" button under the last column of the output table (the column named "All PDB"), but I have a query of several hundreds of drugs and I'm not willing to do it manually for each result.</p>

<proteins><pdb>
Automating download of results of Drug and Drug Target Mapping
# Automating download of results of Drug and Drug Target Mapping

(Asked by: username_0 on 2018-05-17)

The [drug and drug target mapping](https://www.rcsb.org/pdb/ligand/drugMapping.do) tool shows the **top 3** PDB IDs for each drug based on the drug target sequence similarity search and ligand id search. Is there a way to get all the PDB ids of the drug-target PDB files and not only the top 3?

I know you can get this information after clicking the "find" button under the last column of the output table (the column named "All PDB"), but I have a query of several hundreds of drugs and I'm not willing to do it manually for each result.

**Tags:** proteins, pdb

---

## 1 answers

### Answer by username_1 on 2018-05-18. Score: 0

Simpler option would be to not use the query interface and directly parse the CSV file found on that page.

I just read @llrs comment and I guess it's very much the same spirit as my own - download the data and query it programmatically. I see now (was on mobile earlier) that the 'FIND' URL links out to a BLAST search. so it might be as easy as retrieving the relevant protein sequence and replicating the URL. Or if you want to go a different route and finding all PDB identifiers with the given ligand, cross-reference the above data with what you'd find [here](http://www.rcsb.org/pdb/rest/customReport.csv?pdbids=*&reportName=Ligands&service=wsfile&format=csv)


---

