# ExtractHeteroAtoms returns empty heteroatom file

**URL:** https://ask.bioexcel.eu/t/extractheteroatoms-returns-empty-heteroatom-file/2360
**Category:** BioBB
**Created:** [July 26, 2020, 9:35pm UTC](https://ask.bioexcel.eu/t/extractheteroatoms-returns-empty-heteroatom-file/2360 "2020-07-26T21:35:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://ask.bioexcel.eu/u/dburns)
#### Post date: [July 26, 2020, 9:35pm UTC](https://ask.bioexcel.eu/t/extractheteroatoms-returns-empty-heteroatom-file/2360/1 "2020-07-26T21:35:29Z")

</div>

I’m following the protein ligand tutorial with my own files.

I used ExtractHeteroAtoms but got an empty file for the output\_heteroatom\_path option.

input:  
prop = {  
‘heteroatoms’ : [{“name”: “LIG”}]

ExtractHeteroAtoms(input\_structure\_path=‘eic-mol1.pdb’,  
output\_heteroatom\_path=ligandFile,  
properties=prop).launch()

output:  
1.pdb loaded  
Title:  
Experimental method: unknown  
Resolution: 0.0 A

Num. models: 1  
Num. chains: 1 ( : Protein)  
Num. residues: 314  
Num. residues with ins. codes: 0  
Num. HETATM residues: 1  
Num. ligands or modified residues: 1  
Num. water mol.: 0  
Num. atoms: 4917  
Modified residues found  
LIG 314

Step 1: ligands --remove All

Running ligands. Options: --remove All  
1 Ligands detected  
LIG 314  
Ligands removed All (1)

ExtractProtein works correctly and returns just the protein file.

Thank you,

Dan

---

<div class="post-metadata">

### Author: ![genis.bayarri](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@genis.bayarri](https://ask.bioexcel.eu/u/genis.bayarri)
#### Post date: [July 28, 2020, 12:11pm UTC](https://ask.bioexcel.eu/t/extractheteroatoms-returns-empty-heteroatom-file/2360/2 "2020-07-28T12:11:14Z")

</div>

Hi, can you provide the 1.pdb file?

Thanks

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://ask.bioexcel.eu/u/dburns)
#### Post date: [July 28, 2020, 3:44pm UTC](https://ask.bioexcel.eu/t/extractheteroatoms-returns-empty-heteroatom-file/2360/3 "2020-07-28T15:44:28Z")

</div>

Hi Genis,

Here is the file.  
[eic-mol1.pdb](https://ask.bioexcel.eu/uploads/short-url/lHowwkrJciqgq5a1wER2Xm1k6xo.pdb) (394.6 KB)

Thank you,

Dan

---

<div class="post-metadata">

### Author: ![genis.bayarri](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@genis.bayarri](https://ask.bioexcel.eu/u/genis.bayarri)
#### Post date: [July 29, 2020, 8:34am UTC](https://ask.bioexcel.eu/t/extractheteroatoms-returns-empty-heteroatom-file/2360/4 "2020-07-29T08:34:15Z")

</div>

Hi Dan,

There was a bug in the code and it didn’t work properly with PDB files without chain. I’ve fixed it and it will be available in the next release. In the meantime, please add a chain to your PDB file and it will work.

Adding the chain only to the HETATM lines will do the trick:

HETATM 4915 N LIG A 314 -15.104 -1.492 -11.854 0.00 0.00 N  
HETATM 4916 C LIG A 314 -15.529 -0.853 -13.110 0.00 0.00 C  
HETATM 4917 C LIG A 314 -15.666 0.665 -12.891 0.00 0.00 C  
HETATM 4918 C LIG A 314 -15.147 1.646 -13.734 0.00 0.00 C  
HETATM 4919 C LIG A 314 -15.497 2.853 -13.170 0.00 0.00 C  
HETATM 4920 C LIG A 314 -16.209 2.544 -12.014 0.00 0.00 C  
HETATM 4921 C LIG A 314 -16.756 3.484 -11.130 0.00 0.00 C  
HETATM 4922 C LIG A 314 -17.784 3.107 -10.255 0.00 0.00 C  
HETATM 4923 C LIG A 314 -18.331 4.047 -9.371 0.00 0.00 C  
HETATM 4924 C LIG A 314 -17.849 5.364 -9.362 0.00 0.00 C  
HETATM 4925 C LIG A 314 -16.821 5.741 -10.237 0.00 0.00 C  
HETATM 4926 C LIG A 314 -16.274 4.801 -11.121 0.00 0.00 C  
HETATM 4927 O LIG A 314 -16.294 1.230 -11.874 0.00 0.00 O  
HETATM 4928 F LIG A 314 -18.376 6.269 -8.510 0.00 0.00 F  
HETATM 4929 H01 LIG A 314 -15.126 -0.821 -11.115 0.00 0.00 H

Thanks!

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://ask.bioexcel.eu/u/dburns)
#### Post date: [July 29, 2020, 10:58pm UTC](https://ask.bioexcel.eu/t/extractheteroatoms-returns-empty-heteroatom-file/2360/5 "2020-07-29T22:58:49Z")

</div>

Cool - Thank you!
