# Ligand Formatting

**URL:** <https://ask.bioexcel.eu/t/ligand-formatting/5275>\
**Category:** HADDOCK\
**Created:** [October 1, 2024, 9:50am UTC](https://ask.bioexcel.eu/t/ligand-formatting/5275 "2024-10-01T09:50:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beril](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Beril](https://ask.bioexcel.eu/u/Beril)\
**Post date:** [October 1, 2024, 9:50am UTC](https://ask.bioexcel.eu/t/ligand-formatting/5275/1 "2024-10-01T09:50:08Z")

</div>

Hello, I have a question regarding my ligand. When I upload my ligand to HADDOCK, I get the following error:

Error in PDB file.  
Issue when parsing the PDB file at line **2**.  
ATOM/HETATM line does not meet the expected format

The first two lines of my ligand are the following:

AUTHOR GENERATED BY OPEN BABEL 2.3.90  
HETATM 1 CL1 UNL A -14.336 1.578 1.012 1.00 0.00 Cl

For your ease, I am also attaching the screenshot to show the whitespace:

 ![resim](https://europe1.discourse-cdn.com/flex013/uploads/bioexcel/original/2X/1/1e49253ca9531d4267a9df752941f88db3cc7605.png)

I tried using PDB Tools, but I received the following error:

**Error uploading structure(s)**

I only need to use the Tidy function in the PDB Tools, but I cannot figure out what is going wrong here.

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![VGPReys](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/vgpreys/32/960_2.png) [@VGPReys](https://ask.bioexcel.eu/u/VGPReys)\
**Post date:** [October 2, 2024, 7:46am UTC](https://ask.bioexcel.eu/t/ligand-formatting/5275/2 "2024-10-02T07:46:34Z")

</div>

- To know if your file is properly formatted, you can refer to this online resource : [https://cupnet.net/pdb-format/](https://cupnet.net/pdb-format/).
- Also, make sure the file extension is the appropriate one: `.pdb`.
- I just tried an example using [OpenBabel online version 3.1.1](https://www.cheminfo.org/Chemistry/Cheminformatics/FormatConverter/index.html), with a Chlorine atom, (SMILES to PDB, 3D coordinates, add hydrogen) and it was functional.

See one not-functional and functional example (from SMILES `ClCCCCOc1ccccc1`):

- File with wrong file extension:  
[obabel\_with\_chlorine.pdb.txt](https://ask.bioexcel.eu/uploads/short-url/jzHiPz2aw6xxW2jg3nf8OuX4rDz.txt) (3.8 KB)
- File with `.pdb` file extension:  
[obabel\_with\_chlorine.pdb](https://ask.bioexcel.eu/uploads/short-url/AmfbhMmiwgZdDsu2GExjpa9WknR.pdb) (4.3 KB)

---

<div class="post-metadata">

**Author:** ![Beril](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Beril](https://ask.bioexcel.eu/u/Beril)\
**Post date:** [October 5, 2024, 11:22am UTC](https://ask.bioexcel.eu/t/ligand-formatting/5275/3 "2024-10-05T11:22:51Z")

</div>

Hello,

I edited all my ligands according to the resource you have linked, and everything worked! I think I was using an old guide for that, or somehow counted the spaces wrong, etc.

Thank you so much for your time and effort!
