unused imports and removed commented code
This commit is contained in:
parent
12dbe58a50
commit
c74428d94a
|
@ -65,9 +65,6 @@ if r[9] != None:
|
||||||
import os
|
import os
|
||||||
cd = os.getcwd()
|
cd = os.getcwd()
|
||||||
f = os.path.join(cd,"static/uploads")
|
f = os.path.join(cd,"static/uploads")
|
||||||
#t = os.path.join(f,"receptor",target)
|
|
||||||
#r = os.path.join(f,"ligands",ligand)
|
|
||||||
#c = os.path.join(f,"configs",config)
|
|
||||||
|
|
||||||
if ".pdbqt" not in receptor_name:
|
if ".pdbqt" not in receptor_name:
|
||||||
receptor_name+=".pdbqt"
|
receptor_name+=".pdbqt"
|
||||||
|
@ -77,15 +74,11 @@ if ".pdbqt" not in ligand_name:
|
||||||
|
|
||||||
print(f)
|
print(f)
|
||||||
import tempfile
|
import tempfile
|
||||||
from shutil import copy
|
|
||||||
from shutil import make_archive
|
from shutil import make_archive
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as directory:
|
with tempfile.TemporaryDirectory() as directory:
|
||||||
print('The created temporary directory is %s' % directory)
|
print('The created temporary directory is %s' % directory)
|
||||||
os.chdir(directory)
|
os.chdir(directory)
|
||||||
# copy(t,os.getcwd())
|
|
||||||
# copy(r,os.getcwd())
|
|
||||||
# copy(c, os.getcwd())
|
|
||||||
file = open(receptor_name,"wb")
|
file = open(receptor_name,"wb")
|
||||||
file.write(targetB)
|
file.write(targetB)
|
||||||
file.close()
|
file.close()
|
||||||
|
@ -96,12 +89,9 @@ with tempfile.TemporaryDirectory() as directory:
|
||||||
file.write(configB)
|
file.write(configB)
|
||||||
file.close()
|
file.close()
|
||||||
os.system("docker run --rm -v ${PWD}:/results -w /results -u $(id -u ${USER}):$(id -g ${USER}) navanchauhan/curie-cli -r %s -l %s -c config.txt -dpi" % (receptor_name,ligand_name))
|
os.system("docker run --rm -v ${PWD}:/results -w /results -u $(id -u ${USER}):$(id -g ${USER}) navanchauhan/curie-cli -r %s -l %s -c config.txt -dpi" % (receptor_name,ligand_name))
|
||||||
#copy("report.pdf",f)
|
|
||||||
z = "Curie_Web_Result_"+str(jobID)
|
z = "Curie_Web_Result_"+str(jobID)
|
||||||
zi = os.path.join(f,z)
|
zi = os.path.join(f,z)
|
||||||
make_archive(zi, 'zip', directory)
|
make_archive(zi, 'zip', directory)
|
||||||
#copy(("Curie_Web_Result_"+str(jobID)),f)
|
|
||||||
email(zi)
|
email(zi)
|
||||||
#print((str(zi) + ".zip"))
|
|
||||||
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
|
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
|
||||||
mycon.commit()
|
mycon.commit()
|
|
@ -16,11 +16,6 @@ try:
|
||||||
except con.ProgrammingError:
|
except con.ProgrammingError:
|
||||||
print("Table Already Exists!")
|
print("Table Already Exists!")
|
||||||
|
|
||||||
#try:
|
|
||||||
# mycursor.execute("insert into curieweb values (1,'navanchauhan@gmail.com','lu.pdbqt','test.pdbqt','owo.txt',CURDATE(),'CURIE WEB TASK',0)")
|
|
||||||
#except con.IntegrityError:
|
|
||||||
# print("Duplicate Entry For Primary Key!")
|
|
||||||
|
|
||||||
from random import choice, shuffle
|
from random import choice, shuffle
|
||||||
from string import digits, ascii_lowercase
|
from string import digits, ascii_lowercase
|
||||||
|
|
||||||
|
@ -36,8 +31,6 @@ def convertToBinaryData(filename):
|
||||||
binaryData = file.read()
|
binaryData = file.read()
|
||||||
return binaryData
|
return binaryData
|
||||||
|
|
||||||
from os.path import basename
|
|
||||||
|
|
||||||
ligand = convertToBinaryData("./files/Eucalyptol.pdbqt")
|
ligand = convertToBinaryData("./files/Eucalyptol.pdbqt")
|
||||||
receptor = convertToBinaryData("./files/6LU7.pdbqt")
|
receptor = convertToBinaryData("./files/6LU7.pdbqt")
|
||||||
config = convertToBinaryData("./files/6LU7.txt")
|
config = convertToBinaryData("./files/6LU7.txt")
|
||||||
|
|
Loading…
Reference in New Issue