May-10-2019, 06:41 PM
I have made a little bit of progress with this code:
#!/pythonsh
import subprocess
import sys
with open('ligands') as infile:
ligand = infile.read().strip().split()
for nvar in ligand:
subprocess.call([
sys.executable, "./prepare_ligand4.py",
"-l", nvar + ".mol2",
"-o", nvar + ".pbdqt" ])
execution goes without error until the for statement. Then there is a series errors, one for each .mol file. The problem is that pythonsh is not a bash file, but rather a bash shell file which sets paths to files in MGLTools which are written in python, albeit it happens to be python2.5. As far as I know the authors of MGLTools have to plans to upgrade the version of python they have used.
If I run ./pythonsh ./prepare_ligand4.py -l <name>.mol2 the .pdbqt file is generated and saved. So I know he code works, just not as I would prefer.
#!/pythonsh
import subprocess
import sys
with open('ligands') as infile:
ligand = infile.read().strip().split()
for nvar in ligand:
subprocess.call([
sys.executable, "./prepare_ligand4.py",
"-l", nvar + ".mol2",
"-o", nvar + ".pbdqt" ])
execution goes without error until the for statement. Then there is a series errors, one for each .mol file. The problem is that pythonsh is not a bash file, but rather a bash shell file which sets paths to files in MGLTools which are written in python, albeit it happens to be python2.5. As far as I know the authors of MGLTools have to plans to upgrade the version of python they have used.
If I run ./pythonsh ./prepare_ligand4.py -l <name>.mol2 the .pdbqt file is generated and saved. So I know he code works, just not as I would prefer.