Answers.Body: <p>A PDB file has strict spacing rules as documented <a href="http://www.wwpdb.org/documentation/file-format-content/format33/sect9.html#HETATM" rel="nofollow noreferrer">here</a>.
  The coordinates should be:</p>
  <pre><code>31 - 38       Real(8.3)      x             Orthogonal coordinates for X.
  39 - 46       Real(8.3)      y             Orthogonal coordinates for Y.
  47 - 54       Real(8.3)      z             Orthogonal coordinates for Z.
  </code></pre>
  <p>So trying this on your line:</p>
  <pre><code>'HETATM 1 C UNL 1 52355.00975659.051 0.000 1.00 0.000'[30:39]
  </code></pre>
  <p>I get <code>9.051 0.</code>, which is not a number.</p>
  <p>The whole line is formatted incorrectly however.
  So as you say you are using Autodock why not pass a <code>mol2</code> to <code>prepare_ligand4.py</code> instead which is <a href="http://autodock.scripps.edu/faqs-help/how-to/how-to-prepare-a-ligand-file-for-autodock4" rel="nofollow noreferrer">an acceptable format</a>?</p>
  <p>Alternatively, you could convert your multi-entry sdf to pdb files via RDKit in Python:</p>
  <pre><code>suppl = Chem.SDMolSupplier(sdfile)
  for mol in suppl:
        # mol = Chem.AddHs(mol) # has hydrogens?
        # AllChem.EmbedMolecule(mol) # is 3D?
        AllChem.ComputeGasteigerCharges(m) # sdfs do not have partial charges
        Chem.MolToPDBFile(m, f&quot;{mol.GetProp('_Name')}.pdb&quot;)
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-19T16:52:34.867Z
Answers.Text: Hello Mr. Ferla,
  
  
  Thank you for getting back to me. 
  Is there any option in Open Babel that will let me make the required changes so that the spacing rules aren't violated.
  
  
  Best Regards,
  Shahbaaz.
Answers.UserDisplayName: Shahbaaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-19T17:25:32.390Z
Answers.Text: @Shahbaaz , amended.
  Parenthetically no need for formalities. Also @ plus username is generally the preferred way to address folk here, you might get titles  wrong ;) .
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-20T11:54:38.240Z
Answers.Text: Also, this other Q about Autodock protocol may be useful: https://bioinformatics.stackexchange.com/questions/11471/protein-ligand-docking-how-to-convert-protein-pdb-to-protein-maps-fld/11479#11479
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-20T17:01:45.787Z
Answers.Text: Thanks a ton for the help
Answers.UserDisplayName: Shahbaaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-22T10:02:44.643Z
Answers.Text: Good morning @Matteo Ferla
  
  Can you briefly summarize how I can use prepare_ligand4.py or RDKit. I have looked for tutorials online but couldn't come across any. Thank you.
Answers.UserDisplayName: Shahbaaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-22T14:31:52.693Z
Answers.Text: First, `prepare_ligand4.py` is for Autodock 4, not VINA. The two are different and fill different roles: complicated but adaptable vs. easy but blackbox. I am assuming you are using the former as you did not specify VINA. Here is again the [link to documentation](http://autodock.scripps.edu/faqs-help/how-to/how-to-prepare-a-ligand-file-for-autodock4).
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-22T17:39:57.667Z
Answers.Text: I need help with the following line, 
  "pythonsh [yourpath or .]/prepare_ligand4.py -l ligand.pdb [options]"
  
  considering the path for mg tools is the following, "C:\Program Files (x86)\MGLTools-1.5.6" how would I alter the above line including the mg tools file path in it
Answers.UserDisplayName: Shahbaaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-22T20:33:03.710Z
Answers.Text: If you use finder (whatever it is called on a Windows) and explore the stuff within `C:\Program Files (x86)\MGLTools-1.5.6` you'll find the script in somewhere _like_ `autodock_tools/utilities`
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-24T12:52:04.123Z
Answers.Text: I have tried everything to split the multi entry sdf file to pdb files but have failed. Could you split the sdf file to individual files for me as I have been unable to do so despite multiple attempts at it. 
  
  Thanking you in anticipation,
  Dr. Hussain.
Answers.UserDisplayName: Shahbaaz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-24T13:04:32.413Z
Answers.Text: If it is just for training, why not redock ligands from already bound structures one at the time. There are lots of inhibitors to the COVID protease in the PDB and the ligand can be downloaded as sdf, pdb or mol2. Make an apo, place the ligand (don't keep the original there) and then you can see what RSMD you get versus the actual solved one.
  Once there you can try your hand at virtual library screening.
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-19T11:53:47.087Z
Answers.LastActivityDate: 2020-06-19T17:24:26.857Z
Answers.LastEditDate: 2020-06-19T17:24:26.857Z
Answers.UserDisplayName: Matteo Ferla
Body: <p>I converted an .sdf file containing around 50,000 anti-viral agents to individual .pdb files using OpenBabel. However, when I tried opening the .pdb files with Autodock I kept getting the error below. What do you think is causing the error.</p>
  <p>Thank you for your time and patience.</p>
  <p><strong>Error Message:</strong></p>
  <blockquote>
  <p>“ Error pasing the following line in pdb:
  HETATM 1 C UNL 1 52355.00975659.051 0.000 1.00 0.000 .&quot;</p>
  </blockquote>
  <p><a href="https://i.sstatic.net/13I5n.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/13I5n.jpg" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-18T16:59:13.590Z
Comments.Text: You have a firewall issue, it is needing to connect outside your computer.
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-18T17:59:51.190Z
Comments.Text: I have added autodock.exe and autogrid.exe as exceptions to my firewall and yet I am still facing the same issue.
  Here’s is exact the error message,
  
  “ Error pasing the following line in pdb:
  
  HETATM 1 C UNL 1 52355.00975659.051 0.000 1.00 0.000 ."
  
  What do you think I should do to overcome the error. Thank you.
Comments.UserDisplayName: Shahbaaz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-18T18:12:24.560Z
Comments.Text: Well at least it is now an incomprehensible error - but it still doesn't work :-(  .. some of the pdb gurus are needed here, its a very ancient format BTW.
Comments.UserDisplayName: M__
Tags: <pdb><docking><errors>
Title: Error pasing the following line in pdb
ThreadText: # Error pasing the following line in pdb
  
  (Asked by: username_0 on 2020-06-18)
  
  I converted an .sdf file containing around 50,000 anti-viral agents to individual .pdb files using OpenBabel. However, when I tried opening the .pdb files with Autodock I kept getting the error below. What do you think is causing the error.
  
  Thank you for your time and patience.
  
  **Error Message:**
  
  > “ Error pasing the following line in pdb:
  > HETATM 1 C UNL 1 52355.00975659.051 0.000 1.00 0.000 ."
  
  [![enter image description here](https://i.sstatic.net/13I5n.jpg)](https://i.sstatic.net/13I5n.jpg)
  
  **Tags:** pdb, docking, errors
  
  > **Comments:**
  > **username_1**: You have a firewall issue, it is needing to connect outside your computer.  
  > **username_0**: I have added autodock.exe and autogrid.exe as exceptions to my firewall and yet I am still facing the same issue. Here’s is exact the error message,  “ Error pasing the following line in pdb:  HETATM 1 C UNL 1 52355.00975659.051 0.000 1.00 0.000 ."  What do you think I should do to overcome the error. Thank you.  
  > **username_1**: Well at least it is now an incomprehensible error - but it still doesn't work :-(  .. some of the pdb gurus are needed here, its a very ancient format BTW.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-06-19. Score: 1
  
  A PDB file has strict spacing rules as documented [here](http://www.wwpdb.org/documentation/file-format-content/format33/sect9.html#HETATM).
  The coordinates should be:
  
  ```
  31 - 38       Real(8.3)      x             Orthogonal coordinates for X.
  39 - 46       Real(8.3)      y             Orthogonal coordinates for Y.
  47 - 54       Real(8.3)      z             Orthogonal coordinates for Z.
  
  ```
  
  So trying this on your line:
  
  ```
  'HETATM 1 C UNL 1 52355.00975659.051 0.000 1.00 0.000'[30:39]
  
  ```
  
  I get `9.051 0.`, which is not a number.
  
  The whole line is formatted incorrectly however.
  So as you say you are using Autodock why not pass a `mol2` to `prepare_ligand4.py` instead which is [an acceptable format](http://autodock.scripps.edu/faqs-help/how-to/how-to-prepare-a-ligand-file-for-autodock4)?
  
  Alternatively, you could convert your multi-entry sdf to pdb files via RDKit in Python:
  
  ```
  suppl = Chem.SDMolSupplier(sdfile)
  for mol in suppl:
        # mol = Chem.AddHs(mol) # has hydrogens?
        # AllChem.EmbedMolecule(mol) # is 3D?
        AllChem.ComputeGasteigerCharges(m) # sdfs do not have partial charges
        Chem.MolToPDBFile(m, f"{mol.GetProp('_Name')}.pdb")
  
  ```
  
  > **Comments:**
  > **username_0**: Hello Mr. username_2,   Thank you for getting back to me.  Is there any option in Open Babel that will let me make the required changes so that the spacing rules aren't violated.   Best Regards, username_0.  
  > **username_2**: @username_0 , amended. Parenthetically no need for formalities. Also @ plus username is generally the preferred way to address folk here, you might get titles  wrong ;) .  
  > **username_2**: Also, this other Q about Autodock protocol may be useful: https://bioinformatics.stackexchange.com/questions/11471/protein-ligand-docking-how-to-convert-protein-pdb-to-protein-maps-fld/11479#11479  
  > **username_0**: Thanks a ton for the help  
  > **username_0**: Good morning @username_2  Can you briefly summarize how I can use prepare_ligand4.py or RDKit. I have looked for tutorials online but couldn't come across any. Thank you.  
  > **username_2**: First, `prepare_ligand4.py` is for Autodock 4, not VINA. The two are different and fill different roles: complicated but adaptable vs. easy but blackbox. I am assuming you are using the former as you did not specify VINA. Here is again the [link to documentation](http://autodock.scripps.edu/faqs-help/how-to/how-to-prepare-a-ligand-file-for-autodock4).  
  > **username_0**: I need help with the following line,  "pythonsh [yourpath or .]/prepare_ligand4.py -l ligand.pdb [options]"  considering the path for mg tools is the following, "C:\Program Files (x86)\MGLTools-1.5.6" how would I alter the above line including the mg tools file path in it  
  > **username_2**: If you use finder (whatever it is called on a Windows) and explore the stuff within `C:\Program Files (x86)\MGLTools-1.5.6` you'll find the script in somewhere _like_ `autodock_tools/utilities`  
  > **username_0**: I have tried everything to split the multi entry sdf file to pdb files but have failed. Could you split the sdf file to individual files for me as I have been unable to do so despite multiple attempts at it.   Thanking you in anticipation, Dr. Hussain.  
  > **username_2**: If it is just for training, why not redock ligands from already bound structures one at the time. There are lots of inhibitors to the COVID protease in the PDB and the ligand can be downloaded as sdf, pdb or mol2. Make an apo, place the ligand (don't keep the original there) and then you can see what RSMD you get versus the actual solved one. Once there you can try your hand at virtual library screening.  
  
  ---
  
  