<p>Answer from @matteo-ferla, converted from comment:</p>
<p>If command line interface is more suitable for you, you may consider OpenBabel, which can predict Gasteiger charges, protonate at pH 7, accept a smi file of multiple SMILES or a multi-entry sdf file and can <a href="http://openbabel.org/docs/current/FileFormats/AutoDock_PDQBT_format.html" rel="nofollow noreferrer">output in PDQBT format</a>, but is not quite the same as the python script allows merging and various settings.
But to use the script iteratively (a horrendous thing to do as it loads up the python kernel each time) check out <a href="https://www.cyberciti.biz/faq/bash-loop-over-file/" rel="nofollow noreferrer">how to loop files via bash</a></p>

CC BY-SA 4.0
2021-12-02T00:33:26.357Z
2021-12-02T00:33:26.357Z
gringer
<p>I have a folder of pdb ligand structures that I'd like to test in some docking experiments with a certain protein using AutoDock Vina.
I am not familiar with Python so I've always been using the interactive procedure on AutoDockTools to prepare the pdbqt ligand files instead of the <a href="http://autodock.scripps.edu/faqs-help/how-to/how-to-prepare-a-ligand-file-for-autodock4" rel="nofollow noreferrer">prepare_ligand4.py script</a>.
Could you please help me understand how to iterate this python script in a way that it can be applied to a set of pdb ligand files in order to create the corresponding set of pdbqt ligand files?
Thank you!</p>

CC BY-SA 4.0
2021-12-04T08:16:12.643Z
use Raccoon or Raccoon2 : https://autodock.scripps.edu/resources/raccoon/ , https://autodock.scripps.edu/resources/raccoon2/
pippo1980
<python><pdb><docking><structural-biology>
Python script to simultaneously generate multiple pdbqt files for AutoDockTools?
# Python script to simultaneously generate multiple pdbqt files for AutoDockTools?

(Asked by: username_0 on 2021-08-05)

I have a folder of pdb ligand structures that I'd like to test in some docking experiments with a certain protein using AutoDock Vina.
I am not familiar with Python so I've always been using the interactive procedure on AutoDockTools to prepare the pdbqt ligand files instead of the [prepare\_ligand4.py script](http://autodock.scripps.edu/faqs-help/how-to/how-to-prepare-a-ligand-file-for-autodock4).
Could you please help me understand how to iterate this python script in a way that it can be applied to a set of pdb ligand files in order to create the corresponding set of pdbqt ligand files?
Thank you!

**Tags:** python, pdb, docking, structural-biology
> **Comments:**
> **username_1**: use Raccoon or Raccoon2 : https://autodock.scripps.edu/resources/raccoon/ , https://autodock.scripps.edu/resources/raccoon2/  

---

## 1 answers

### Answer by username_2 on 2021-12-02. Score: 1

Answer from @matteo-ferla, converted from comment:

If command line interface is more suitable for you, you may consider OpenBabel, which can predict Gasteiger charges, protonate at pH 7, accept a smi file of multiple SMILES or a multi-entry sdf file and can [output in PDQBT format](http://openbabel.org/docs/current/FileFormats/AutoDock_PDQBT_format.html), but is not quite the same as the python script allows merging and various settings.
But to use the script iteratively (a horrendous thing to do as it loads up the python kernel each time) check out [how to loop files via bash](https://www.cyberciti.biz/faq/bash-loop-over-file/)


---

