cyangNYU / delta_LinF9_XGB

GNU General Public License v3.0
14 stars 3 forks source link

python2 #5

Open Luckken21 opened 5 months ago

Luckken21 commented 5 months ago

MGLTools uses python2 , so when I run the codes, python3 cannot interpret the codes in the MGLTools. How to solve the problem? Thanks!

kaiweiii commented 2 months ago

I also had this error. MGLTools have its own python shell called pythonsh which you can use to run those python file in MGLTools such as prepare_receptor4.py. To do that, you need the path of your pythonsh file. The path usually is yourpath/mgltools_x86_64Linux2_1.5.7/bin/pythonsh Open the python script file that produces the error, for me, the error occurred when running prepare_betaAtoms.py in the function Protein_pdbqt(PDB, PDBQT, ADT) where the ADT is needed: add PYSHELL = yourpath/mgltools_x86_64Linux2_1.5.7/bin/pythonsh (your pythonsh file path) change line13 to cmd = PYSHELL + " "+ ADT + " -r " + PDB + " -o " + PDBQT + " -U nphs" Then the ADT should work.