text: user13927: 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.
  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!
  
  user73: 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, 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
  
original_text: 13927: <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>
   73: <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>
  