Ligand Extraction

This example shows how to align structures of the same protein and extract bound ligands from these structures.

matchAlign() function can be used for aligning protein structures. This example shows how to use it to extract ligands from multiple PDB structures after superposing the structures onto a reference. Output will be PDB files that contain ligands superposed onto the reference structure.

Align structures and extract ligands

Then, we parse the hits one-by-one, superpose them onto the reference structure, and extract ligands:

In [10]: for pdb_id in blast_record.getHits(90, 70):
   ....:     try:
   ....:         pdb = parsePDB(pdb_id)
   ....:         pdb = matchAlign(pdb, p38)[0]
   ....:     except:
   ....:         continue
   ....:     else:
   ....:         ligand = pdb.select('not protein and not water')
   ....:         repr(ligand)
   ....:         if ligand:
   ....:             writePDB(pdb_id + '_ligand.pdb', ligand)
   ....: 

In [11]: !ls *_ligand.pdb
1a9u_ligand.pdb  3d83_ligand.pdb  3hub_ligand.pdb  3oef_ligand.pdb
1bmk_ligand.pdb  3e92_ligand.pdb  3hv3_ligand.pdb  3p5k_ligand.pdb
1m7q_ligand.pdb  3e93_ligand.pdb  3hv5_ligand.pdb  3p79_ligand.pdb
1ouk_ligand.pdb  3fc1_ligand.pdb  3hv6_ligand.pdb  3pg3_ligand.pdb
1r39_ligand.pdb  3fi4_ligand.pdb  3hv7_ligand.pdb  3qud_ligand.pdb
1w83_ligand.pdb  3fkl_ligand.pdb  3iph_ligand.pdb  3rin_ligand.pdb
1wbo_ligand.pdb  3fl4_ligand.pdb  3itz_ligand.pdb  3uvr_ligand.pdb
1wbs_ligand.pdb  3fln_ligand.pdb  3iw6_ligand.pdb  3zsg_ligand.pdb
1yqj_ligand.pdb  3flq_ligand.pdb  3iw7_ligand.pdb  3zsi_ligand.pdb
1zyj_ligand.pdb  3fmk_ligand.pdb  3iw8_ligand.pdb  3zya_ligand.pdb
1zz2_ligand.pdb  3fml_ligand.pdb  3k3i_ligand.pdb  4dli_ligand.pdb
1zzl_ligand.pdb  3fmn_ligand.pdb  3k3j_ligand.pdb  4eh2_ligand.pdb
2baj_ligand.pdb  3fsf_ligand.pdb  3kf7_ligand.pdb  4eh6_ligand.pdb
2fst_ligand.pdb  3fsk_ligand.pdb  3kq7_ligand.pdb  4ehv_ligand.pdb
2ghm_ligand.pdb  3gcp_ligand.pdb  3lfa_ligand.pdb  4ewq_ligand.pdb
2gtm_ligand.pdb  3gcs_ligand.pdb  3mpa_ligand.pdb  4fa2_ligand.pdb
2npq_ligand.pdb  3gcu_ligand.pdb  3mpt_ligand.pdb  4kin_ligand.pdb
2qd9_ligand.pdb  3gcv_ligand.pdb  3mvm_ligand.pdb  4kiq_ligand.pdb
2zaz_ligand.pdb  3gfe_ligand.pdb  3nnu_ligand.pdb  4loo_ligand.pdb
3bv2_ligand.pdb  3gi3_ligand.pdb  3nnx_ligand.pdb  4loq_ligand.pdb
3bv3_ligand.pdb  3heg_ligand.pdb  3o8t_ligand.pdb
3ctq_ligand.pdb  3hp5_ligand.pdb  3obj_ligand.pdb
3d7z_ligand.pdb  3hrb_ligand.pdb  3ocg_ligand.pdb

Ligands bound to p38 are outputted. Note that output PDB files may contain multiple ligands.

The output can be loaded into a molecular visualization tool for analysis.