Question: All The Ligands From Pdb
gravatar for Yogesh Pandit
9.8 years ago by
Yogesh Pandit500
United States
Yogesh Pandit500 wrote:


How can I get all the Ligands from PDB with the X, Y, Z coordinates of the atoms and the chain and residue IDs?


pdb data download • 7.6k views
ADD COMMENTlink modified 6.8 years ago by wdiwdi380 • written 9.8 years ago by Yogesh Pandit500
gravatar for Khader Shameer
9.8 years ago by
Manhattan, NY
Khader Shameer18k wrote:

Option 1: As of today, there are 10788 ligands in PDB Use the list of links via Advanced search. Using this form you can download data in Structure Data file format. Click on Display / Download to download the data.

Option 2: If you need extract XYZ from indivdual PDB files directly from file. Use the list from the above link, get the list of PDB IDs from display ID. Use this list and download full coordinate files using the Advanced search interface.

Choose a Query type: PDB IDs Paste the ids and Click on Display / Download to download the data. Once you download the PDB files.
You can use a small perl / shell / grep script to extract ligand information.

Here is an example download and extract ligand information from a PDB file (PDB ID: 1ASH)


Ligand information is provided with HETATM header and you can easily grep in the following format.

grep "^HETATM" 1ASH.pdb > 1ASH_ligand.pdb

ADD COMMENTlink written 9.8 years ago by Khader Shameer18k

Thanks a lot !!!

ADD REPLYlink written 9.8 years ago by Yogesh Pandit500
gravatar for andreas.prlic
6.8 years ago by
San Diego
andreas.prlic290 wrote:

Depending on what you need, there is also a standard reference describing all the small molecules and residues in the PDB including idealized coordinates. It is called the "chemical component dictionary":

ADD COMMENTlink modified 13 months ago by _r_am32k • written 6.8 years ago by andreas.prlic290
gravatar for wdiwdi
6.8 years ago by
wdiwdi380 wrote:

And here is an answer which retrieves exactly what was asked for, with a single tool, and without additional pre- or post-processing.

Problems like these are a typical application for a cheminformatics scripting tool, like our Cactvs toolkit. There are free academic downloads at

Using the 1ASH.pdb sample file cited above, a minimal script in the Tcl interface language looks like

set eh [molfile read]
filter create hetatm property A_RESIDUE(hetatm) value 1 operator =
foreach coords [ens get $eh A_XYZ hetatm] \
   chain [ens get $eh A_RESIDUE(chain) hetatm] \
   resid [ens get $eh A_RESIDUE(resid) hetatm] {
    puts [format "%.2f\t%.2f\t%.2f\t%s\t%s" {*}$coords $chain $resid]

and in Python (sponsored by Vertex Inc.)

for (coords,residue) in zip(eh.get('A_XYZ',filters=f),eh.get('A_RESIDUE',filters=f)):
    print("{:.2f}\t{:.2f}\t{:.2f}\t{}\t{}".format(coords[0],coords[1],coords[2],residue.chain, residue.resid))
ADD COMMENTlink modified 16 months ago by _r_am32k • written 6.8 years ago by wdiwdi380
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1579 users visited in the last hour