aboutsummaryrefslogtreecommitdiff
path: root/app/dock-single.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-09-27 21:13:31 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-09-27 21:13:45 +0530
commit7cd8d4accc933c7e6a4e4091f5d6e052d1af4c42 (patch)
treec06b3c75b15aa6b2a04c911be8fc60ccc4429c58 /app/dock-single.py
parent0ec82db13f2247602fb898a8ca857052d6196fa6 (diff)
fixed to work with launchd
Diffstat (limited to 'app/dock-single.py')
-rw-r--r--app/dock-single.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/dock-single.py b/app/dock-single.py
index c09d262..add20da 100644
--- a/app/dock-single.py
+++ b/app/dock-single.py
@@ -167,6 +167,7 @@ date = records[6]
cd = os.getcwd()
+print("Curie-Web Directory is:",cd)
f = os.path.join(cd,"static/uploads")
scripts = os.path.join(cd,"scripts")
reportDirectory = os.path.join(f,"reports")
@@ -222,27 +223,29 @@ with tempfile.TemporaryDirectory() as directory:
try:
copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf")))
except FileNotFoundError:
- reason = "Could not generate the report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. "
+ reason = "Could not generate the PDF report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. "
email(toaddr,jobID,date,description,zipArchive=zi,reason=reason)
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
mycon.commit()
sys.exit(0)
+ """
try:
get3DModel(pdbpath,"%s_out.pdbqt"%(records[4]))
except:
- reason = "Could not generate the report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. "
- email(toaddr,jobID,date,description,zipArchive=zi,reason=reason)
+ email(toaddr,jobID,date,description,zipArchive=zi)
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
mycon.commit()
sys.exit(0)
+ """
+ get3DModel(pdbpath,"%s_out.pdbqt"%(records[4]))
os.system("collada2gltf -i model.dae -o model.gltf")
copyfile("model.gltf",os.path.join(modelDirectory,(str(jobID)+".gltf")))
arch = os.popen("uname -m").read()
print("Generating 3D Model")
if "x86" in arch:
- os.system("docker run -it --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz")
+ os.system("docker run --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz")
elif "aarch64" in arch:
- os.system("docker run -it --rm -v $(pwd):/usr/app navanchauhan/usd-from-gltf:latest model.gltf model.usdz")
+ os.system("docker run --rm -v $(pwd):/usr/app navanchauhan/usd-from-gltf:latest model.gltf model.usdz")
try:
copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz")))
except: