May-13-2019, 02:53 PM
This code now works without any complaints:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Mon May 13 09:50:54 2019
@author: comp
"""
import subprocess
with open('ligand') as infile:
ligand = infile.read().strip().split()
for nvar in ligand:
command = [
"./pythonsh", "./prepare_ligand4.py",
"-l", nvar + ".mol2",
"-o", nvar + ".pbdqt" ]
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
out, err = proc.communicate()
if proc.returncode:
print ('Subprocess FAILED:', proc.command)
Many thanks for the help.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Mon May 13 09:50:54 2019
@author: comp
"""
import subprocess
with open('ligand') as infile:
ligand = infile.read().strip().split()
for nvar in ligand:
command = [
"./pythonsh", "./prepare_ligand4.py",
"-l", nvar + ".mol2",
"-o", nvar + ".pbdqt" ]
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
out, err = proc.communicate()
if proc.returncode:
print ('Subprocess FAILED:', proc.command)
Many thanks for the help.