May-08-2019, 02:50 PM
I am running Debian Stretch on my main platform. I have a Computational Chemistry problem in which I have to run a number of python scripts. How do I pass the argument to a do loop?
I have a total of 32 ligands of the form name.mol2 that I want to dock to a number of protein molecules. The ligand is in a space separated ASCII file.
The computations will involve 17 different python scripts.
Here is my code:
!/bin/sh
for nvar in ligands do
/pythonsh ./prepare_ligand4.py -l $nvar.mol2 -o $nvar.pbdqt
done
When I run the code I get:
~/Apps/Modeling/VSTutorial/VirtualScreening/Ligands$ ./Run.pbdqt.sh setting PYTHONHOME environment the file ligands.mol2 doesn't contain any mol2 records The file ligands.mol2 doesn't have Atom records, molecules can't be built Traceback (most recent call last): File "./prepare_ligand4.py", line 152, in mol = mols[0] File "/sdc1/Apps/MGLTools-1.5.6rc3/lib/python2.5/UserList.py", line 28, in getitem def getitem(self, i): return self.data[i] IndexError: list index out of range
I know that the argument is not being passed, but have googled, but can't find any solution.
Assistance will be much appreciated.
Thanks in advance.
Stephen P. Molnar, Ph.D. Life is a fuzzy set
www.molecular-modeling.net Stochastic and multivariate
(614)312-7528©
Skype: smolnar1
I have a total of 32 ligands of the form name.mol2 that I want to dock to a number of protein molecules. The ligand is in a space separated ASCII file.
The computations will involve 17 different python scripts.
Here is my code:
!/bin/sh
for nvar in ligands do
/pythonsh ./prepare_ligand4.py -l $nvar.mol2 -o $nvar.pbdqt
done
When I run the code I get:
~/Apps/Modeling/VSTutorial/VirtualScreening/Ligands$ ./Run.pbdqt.sh setting PYTHONHOME environment the file ligands.mol2 doesn't contain any mol2 records The file ligands.mol2 doesn't have Atom records, molecules can't be built Traceback (most recent call last): File "./prepare_ligand4.py", line 152, in mol = mols[0] File "/sdc1/Apps/MGLTools-1.5.6rc3/lib/python2.5/UserList.py", line 28, in getitem def getitem(self, i): return self.data[i] IndexError: list index out of range
I know that the argument is not being passed, but have googled, but can't find any solution.
Assistance will be much appreciated.
Thanks in advance.
Stephen P. Molnar, Ph.D. Life is a fuzzy set
www.molecular-modeling.net Stochastic and multivariate
(614)312-7528©
Skype: smolnar1