From 1d46381ea9739270221eb9d1593435b6b534ae00 Mon Sep 17 00:00:00 2001 From: ImgBotApp Date: Sun, 30 Aug 2020 07:21:51 +0000 Subject: [ImgBot] Optimize images *Total -- 710.78kb -> 585.97kb (17.56%) /app/static/ketcher/doc/bonds.png -- 11.79kb -> 4.94kb (58.14%) /app/static/ketcher/doc/rgroup-example2.png -- 2.77kb -> 1.46kb (47.52%) /app/static/ketcher/doc/rgroup-dialog.png -- 22.79kb -> 12.00kb (47.36%) /app/static/ketcher/doc/expanded.png -- 3.31kb -> 1.94kb (41.54%) /app/static/ketcher/doc/charge.png -- 1.27kb -> 0.76kb (40.28%) /app/static/ketcher/doc/rotate.png -- 1.04kb -> 0.65kb (37.13%) /app/static/ketcher/doc/bond-types.png -- 0.99kb -> 0.64kb (35.5%) /app/static/ketcher/doc/sdata.png -- 0.97kb -> 0.67kb (31.16%) /app/static/ketcher/doc/template.png -- 2.60kb -> 1.90kb (26.96%) /app/static/ketcher/doc/periodic-dialog-ext.png -- 64.74kb -> 47.84kb (26.1%) /app/static/ketcher/doc/collapsed.png -- 5.62kb -> 4.16kb (25.99%) /app/static/ketcher/logo/apple-touch-icon.png -- 11.54kb -> 8.71kb (24.54%) /app/static/ketcher/doc/reaction-types.png -- 5.63kb -> 4.28kb (24.09%) /app/static/ketcher/doc/main.png -- 38.57kb -> 29.29kb (24.04%) /app/static/ketcher/doc/sgroup-dialog.png -- 28.62kb -> 22.28kb (22.16%) /app/static/ketcher/doc/generic-groups.png -- 24.97kb -> 19.58kb (21.59%) /app/static/ketcher/doc/open.png -- 17.74kb -> 14.01kb (21.04%) /app/static/ketcher/doc/save.png -- 21.78kb -> 17.27kb (20.71%) /app/static/ketcher/doc/periodic-dialog.png -- 48.85kb -> 39.53kb (19.08%) /app/static/ketcher/doc/inline-edit.png -- 12.13kb -> 9.85kb (18.82%) /app/static/ketcher/doc/toolbar.png -- 17.63kb -> 14.43kb (18.17%) /app/static/ketcher/doc/check.png -- 45.03kb -> 36.90kb (18.06%) /app/static/ketcher/doc/template-dialog.png -- 44.99kb -> 37.36kb (16.97%) /app/static/ketcher/doc/rgroup-example4.png -- 7.36kb -> 6.17kb (16.17%) /app/static/ketcher/doc/rgroup-example3.png -- 10.14kb -> 8.58kb (15.36%) /app/static/ketcher/doc/analyse.png -- 12.66kb -> 10.72kb (15.35%) /app/static/ketcher/doc/reaction.png -- 0.87kb -> 0.75kb (12.97%) /app/static/ketcher/doc/miew.png -- 16.01kb -> 14.50kb (9.43%) /app/static/ketcher/doc/atom-dialog.png -- 18.81kb -> 17.13kb (8.92%) /app/static/ketcher/doc/settings.png -- 17.12kb -> 15.65kb (8.58%) /app/static/assets/workingInALaboratory.svg -- 94.41kb -> 86.67kb (8.19%) /app/static/ketcher/doc/rlogic-dialog.png -- 19.37kb -> 18.49kb (4.57%) /app/static/ketcher/doc/rgroup-types.png -- 4.61kb -> 4.41kb (4.34%) /app/static/ketcher/doc/sgroup-data-dialog.png -- 25.38kb -> 24.51kb (3.45%) /app/static/ketcher/doc/transform-types.png -- 4.51kb -> 4.36kb (3.38%) /app/static/ketcher/doc/periodic-table.png -- 0.88kb -> 0.87kb (1.77%) /app/static/ketcher/doc/template-example1.png -- 5.12kb -> 5.04kb (1.6%) /app/static/ketcher/doc/template-example2.png -- 4.50kb -> 4.43kb (1.43%) /app/static/ketcher/doc/miew-menu.png -- 24.00kb -> 23.72kb (1.16%) /app/static/ketcher/doc/template-example3.png -- 4.11kb -> 4.06kb (1.14%) /app/static/ketcher/logo/ketcher-logo.svg -- 5.10kb -> 5.04kb (1.02%) /app/static/ketcher/doc/sgroup.png -- 0.45kb -> 0.45kb (0.65%) Signed-off-by: ImgBotApp --- app/static/assets/workingInALaboratory.svg | 1810 +----------------------- app/static/ketcher/doc/analyse.png | Bin 12966 -> 10976 bytes app/static/ketcher/doc/atom-dialog.png | Bin 19260 -> 17542 bytes app/static/ketcher/doc/bond-types.png | Bin 1014 -> 654 bytes app/static/ketcher/doc/bonds.png | Bin 12074 -> 5054 bytes app/static/ketcher/doc/charge.png | Bin 1296 -> 774 bytes app/static/ketcher/doc/check.png | Bin 46113 -> 37786 bytes app/static/ketcher/doc/collapsed.png | Bin 5753 -> 4258 bytes app/static/ketcher/doc/expanded.png | Bin 3392 -> 1983 bytes app/static/ketcher/doc/generic-groups.png | Bin 25573 -> 20052 bytes app/static/ketcher/doc/inline-edit.png | Bin 12423 -> 10085 bytes app/static/ketcher/doc/main.png | Bin 39494 -> 29998 bytes app/static/ketcher/doc/miew-menu.png | Bin 24577 -> 24291 bytes app/static/ketcher/doc/miew.png | Bin 16391 -> 14845 bytes app/static/ketcher/doc/open.png | Bin 18168 -> 14346 bytes app/static/ketcher/doc/periodic-dialog-ext.png | Bin 66289 -> 48990 bytes app/static/ketcher/doc/periodic-dialog.png | Bin 50019 -> 40474 bytes app/static/ketcher/doc/periodic-table.png | Bin 903 -> 887 bytes app/static/ketcher/doc/reaction-types.png | Bin 5767 -> 4378 bytes app/static/ketcher/doc/reaction.png | Bin 887 -> 772 bytes app/static/ketcher/doc/rgroup-dialog.png | Bin 23340 -> 12287 bytes app/static/ketcher/doc/rgroup-example2.png | Bin 2841 -> 1491 bytes app/static/ketcher/doc/rgroup-example3.png | Bin 10386 -> 8791 bytes app/static/ketcher/doc/rgroup-example4.png | Bin 7539 -> 6320 bytes app/static/ketcher/doc/rgroup-types.png | Bin 4720 -> 4515 bytes app/static/ketcher/doc/rlogic-dialog.png | Bin 19838 -> 18931 bytes app/static/ketcher/doc/rotate.png | Bin 1061 -> 667 bytes app/static/ketcher/doc/save.png | Bin 22301 -> 17683 bytes app/static/ketcher/doc/sdata.png | Bin 995 -> 685 bytes app/static/ketcher/doc/settings.png | Bin 17527 -> 16023 bytes app/static/ketcher/doc/sgroup-data-dialog.png | Bin 25991 -> 25095 bytes app/static/ketcher/doc/sgroup-dialog.png | Bin 29307 -> 22814 bytes app/static/ketcher/doc/sgroup.png | Bin 460 -> 457 bytes app/static/ketcher/doc/template-dialog.png | Bin 46072 -> 38253 bytes app/static/ketcher/doc/template-example1.png | Bin 5240 -> 5156 bytes app/static/ketcher/doc/template-example2.png | Bin 4606 -> 4540 bytes app/static/ketcher/doc/template-example3.png | Bin 4210 -> 4162 bytes app/static/ketcher/doc/template.png | Bin 2667 -> 1948 bytes app/static/ketcher/doc/toolbar.png | Bin 18056 -> 14775 bytes app/static/ketcher/doc/transform-types.png | Bin 4616 -> 4460 bytes app/static/ketcher/logo/apple-touch-icon.png | Bin 11817 -> 8917 bytes app/static/ketcher/logo/ketcher-logo.svg | 2 +- 42 files changed, 2 insertions(+), 1810 deletions(-) (limited to 'app') diff --git a/app/static/assets/workingInALaboratory.svg b/app/static/assets/workingInALaboratory.svg index 18d03d7..57639f9 100644 --- a/app/static/assets/workingInALaboratory.svg +++ b/app/static/assets/workingInALaboratory.svg @@ -1,1809 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/app/static/ketcher/doc/analyse.png b/app/static/ketcher/doc/analyse.png index caa9c32..d1a1465 100644 Binary files a/app/static/ketcher/doc/analyse.png and b/app/static/ketcher/doc/analyse.png differ diff --git a/app/static/ketcher/doc/atom-dialog.png b/app/static/ketcher/doc/atom-dialog.png index 28b8fa9..f5df720 100644 Binary files a/app/static/ketcher/doc/atom-dialog.png and b/app/static/ketcher/doc/atom-dialog.png differ diff --git a/app/static/ketcher/doc/bond-types.png b/app/static/ketcher/doc/bond-types.png index 1241040..96323f9 100644 Binary files a/app/static/ketcher/doc/bond-types.png and b/app/static/ketcher/doc/bond-types.png differ diff --git a/app/static/ketcher/doc/bonds.png b/app/static/ketcher/doc/bonds.png index b2510bb..c5b79ce 100644 Binary files a/app/static/ketcher/doc/bonds.png and b/app/static/ketcher/doc/bonds.png differ diff --git a/app/static/ketcher/doc/charge.png b/app/static/ketcher/doc/charge.png index e0bf088..c964014 100644 Binary files a/app/static/ketcher/doc/charge.png and b/app/static/ketcher/doc/charge.png differ diff --git a/app/static/ketcher/doc/check.png b/app/static/ketcher/doc/check.png index 948e1f1..4f620c2 100644 Binary files a/app/static/ketcher/doc/check.png and b/app/static/ketcher/doc/check.png differ diff --git a/app/static/ketcher/doc/collapsed.png b/app/static/ketcher/doc/collapsed.png index 4715ad9..6c654f0 100644 Binary files a/app/static/ketcher/doc/collapsed.png and b/app/static/ketcher/doc/collapsed.png differ diff --git a/app/static/ketcher/doc/expanded.png b/app/static/ketcher/doc/expanded.png index 225df45..377bf09 100644 Binary files a/app/static/ketcher/doc/expanded.png and b/app/static/ketcher/doc/expanded.png differ diff --git a/app/static/ketcher/doc/generic-groups.png b/app/static/ketcher/doc/generic-groups.png index be8aa9f..5caa398 100644 Binary files a/app/static/ketcher/doc/generic-groups.png and b/app/static/ketcher/doc/generic-groups.png differ diff --git a/app/static/ketcher/doc/inline-edit.png b/app/static/ketcher/doc/inline-edit.png index 072d4d9..4f80b3e 100644 Binary files a/app/static/ketcher/doc/inline-edit.png and b/app/static/ketcher/doc/inline-edit.png differ diff --git a/app/static/ketcher/doc/main.png b/app/static/ketcher/doc/main.png index 2c579ce..45e8cf1 100644 Binary files a/app/static/ketcher/doc/main.png and b/app/static/ketcher/doc/main.png differ diff --git a/app/static/ketcher/doc/miew-menu.png b/app/static/ketcher/doc/miew-menu.png index e1312f7..4258c46 100644 Binary files a/app/static/ketcher/doc/miew-menu.png and b/app/static/ketcher/doc/miew-menu.png differ diff --git a/app/static/ketcher/doc/miew.png b/app/static/ketcher/doc/miew.png index de9e6bb..a27ce1b 100644 Binary files a/app/static/ketcher/doc/miew.png and b/app/static/ketcher/doc/miew.png differ diff --git a/app/static/ketcher/doc/open.png b/app/static/ketcher/doc/open.png index 38f7e20..98ac24e 100644 Binary files a/app/static/ketcher/doc/open.png and b/app/static/ketcher/doc/open.png differ diff --git a/app/static/ketcher/doc/periodic-dialog-ext.png b/app/static/ketcher/doc/periodic-dialog-ext.png index c674ebc..570d13d 100644 Binary files a/app/static/ketcher/doc/periodic-dialog-ext.png and b/app/static/ketcher/doc/periodic-dialog-ext.png differ diff --git a/app/static/ketcher/doc/periodic-dialog.png b/app/static/ketcher/doc/periodic-dialog.png index bd26862..6057b98 100644 Binary files a/app/static/ketcher/doc/periodic-dialog.png and b/app/static/ketcher/doc/periodic-dialog.png differ diff --git a/app/static/ketcher/doc/periodic-table.png b/app/static/ketcher/doc/periodic-table.png index 1233943..23a6740 100644 Binary files a/app/static/ketcher/doc/periodic-table.png and b/app/static/ketcher/doc/periodic-table.png differ diff --git a/app/static/ketcher/doc/reaction-types.png b/app/static/ketcher/doc/reaction-types.png index ba2b5e6..36e86a8 100644 Binary files a/app/static/ketcher/doc/reaction-types.png and b/app/static/ketcher/doc/reaction-types.png differ diff --git a/app/static/ketcher/doc/reaction.png b/app/static/ketcher/doc/reaction.png index e4dfa04..f6bccc3 100644 Binary files a/app/static/ketcher/doc/reaction.png and b/app/static/ketcher/doc/reaction.png differ diff --git a/app/static/ketcher/doc/rgroup-dialog.png b/app/static/ketcher/doc/rgroup-dialog.png index 6320dc4..132fc0c 100644 Binary files a/app/static/ketcher/doc/rgroup-dialog.png and b/app/static/ketcher/doc/rgroup-dialog.png differ diff --git a/app/static/ketcher/doc/rgroup-example2.png b/app/static/ketcher/doc/rgroup-example2.png index 39a475e..583bdd8 100644 Binary files a/app/static/ketcher/doc/rgroup-example2.png and b/app/static/ketcher/doc/rgroup-example2.png differ diff --git a/app/static/ketcher/doc/rgroup-example3.png b/app/static/ketcher/doc/rgroup-example3.png index 8f91b31..3045c65 100644 Binary files a/app/static/ketcher/doc/rgroup-example3.png and b/app/static/ketcher/doc/rgroup-example3.png differ diff --git a/app/static/ketcher/doc/rgroup-example4.png b/app/static/ketcher/doc/rgroup-example4.png index f974ebc..ddaacc2 100644 Binary files a/app/static/ketcher/doc/rgroup-example4.png and b/app/static/ketcher/doc/rgroup-example4.png differ diff --git a/app/static/ketcher/doc/rgroup-types.png b/app/static/ketcher/doc/rgroup-types.png index 107d52f..0be7bf3 100644 Binary files a/app/static/ketcher/doc/rgroup-types.png and b/app/static/ketcher/doc/rgroup-types.png differ diff --git a/app/static/ketcher/doc/rlogic-dialog.png b/app/static/ketcher/doc/rlogic-dialog.png index f11b0d8..f935286 100644 Binary files a/app/static/ketcher/doc/rlogic-dialog.png and b/app/static/ketcher/doc/rlogic-dialog.png differ diff --git a/app/static/ketcher/doc/rotate.png b/app/static/ketcher/doc/rotate.png index 08ab1f1..e13be54 100644 Binary files a/app/static/ketcher/doc/rotate.png and b/app/static/ketcher/doc/rotate.png differ diff --git a/app/static/ketcher/doc/save.png b/app/static/ketcher/doc/save.png index c98f56e..95d2893 100644 Binary files a/app/static/ketcher/doc/save.png and b/app/static/ketcher/doc/save.png differ diff --git a/app/static/ketcher/doc/sdata.png b/app/static/ketcher/doc/sdata.png index 07f77d7..4d5b1f5 100644 Binary files a/app/static/ketcher/doc/sdata.png and b/app/static/ketcher/doc/sdata.png differ diff --git a/app/static/ketcher/doc/settings.png b/app/static/ketcher/doc/settings.png index 9f847b3..d6eae14 100644 Binary files a/app/static/ketcher/doc/settings.png and b/app/static/ketcher/doc/settings.png differ diff --git a/app/static/ketcher/doc/sgroup-data-dialog.png b/app/static/ketcher/doc/sgroup-data-dialog.png index bd34ec8..4f69cb5 100644 Binary files a/app/static/ketcher/doc/sgroup-data-dialog.png and b/app/static/ketcher/doc/sgroup-data-dialog.png differ diff --git a/app/static/ketcher/doc/sgroup-dialog.png b/app/static/ketcher/doc/sgroup-dialog.png index 4ae3756..39c98bc 100644 Binary files a/app/static/ketcher/doc/sgroup-dialog.png and b/app/static/ketcher/doc/sgroup-dialog.png differ diff --git a/app/static/ketcher/doc/sgroup.png b/app/static/ketcher/doc/sgroup.png index 6b449c0..bbd85c0 100644 Binary files a/app/static/ketcher/doc/sgroup.png and b/app/static/ketcher/doc/sgroup.png differ diff --git a/app/static/ketcher/doc/template-dialog.png b/app/static/ketcher/doc/template-dialog.png index b4e34da..7845612 100644 Binary files a/app/static/ketcher/doc/template-dialog.png and b/app/static/ketcher/doc/template-dialog.png differ diff --git a/app/static/ketcher/doc/template-example1.png b/app/static/ketcher/doc/template-example1.png index f3b3ff4..015c2d5 100644 Binary files a/app/static/ketcher/doc/template-example1.png and b/app/static/ketcher/doc/template-example1.png differ diff --git a/app/static/ketcher/doc/template-example2.png b/app/static/ketcher/doc/template-example2.png index c7ee526..befde7c 100644 Binary files a/app/static/ketcher/doc/template-example2.png and b/app/static/ketcher/doc/template-example2.png differ diff --git a/app/static/ketcher/doc/template-example3.png b/app/static/ketcher/doc/template-example3.png index 2f11d63..fc1c27f 100644 Binary files a/app/static/ketcher/doc/template-example3.png and b/app/static/ketcher/doc/template-example3.png differ diff --git a/app/static/ketcher/doc/template.png b/app/static/ketcher/doc/template.png index feee2c3..ac4e20e 100644 Binary files a/app/static/ketcher/doc/template.png and b/app/static/ketcher/doc/template.png differ diff --git a/app/static/ketcher/doc/toolbar.png b/app/static/ketcher/doc/toolbar.png index 86c6a2d..e04d2ef 100644 Binary files a/app/static/ketcher/doc/toolbar.png and b/app/static/ketcher/doc/toolbar.png differ diff --git a/app/static/ketcher/doc/transform-types.png b/app/static/ketcher/doc/transform-types.png index ca1a974..1a537e2 100644 Binary files a/app/static/ketcher/doc/transform-types.png and b/app/static/ketcher/doc/transform-types.png differ diff --git a/app/static/ketcher/logo/apple-touch-icon.png b/app/static/ketcher/logo/apple-touch-icon.png index b1e8a31..89912f9 100644 Binary files a/app/static/ketcher/logo/apple-touch-icon.png and b/app/static/ketcher/logo/apple-touch-icon.png differ diff --git a/app/static/ketcher/logo/ketcher-logo.svg b/app/static/ketcher/logo/ketcher-logo.svg index 30316de..878f5f6 100644 --- a/app/static/ketcher/logo/ketcher-logo.svg +++ b/app/static/ketcher/logo/ketcher-logo.svg @@ -1 +1 @@ -Ketcher logo +Ketcher logo \ No newline at end of file -- cgit v1.2.3 From c6630b41a05b51bdebfeb253935163647b76834c Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 1 Sep 2020 20:36:43 +0530 Subject: added arm support to model.usdz converter --- app/dock-single.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/dock-single.py b/app/dock-single.py index c3f0cb5..a94f3e9 100644 --- a/app/dock-single.py +++ b/app/dock-single.py @@ -244,7 +244,11 @@ with tempfile.TemporaryDirectory() as directory: 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"))) - os.system("docker run -it --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz") + arch = os.popen("uname -m").read() + if "x86" in arch: + os.system("docker run -it --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") try: copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz"))) except: -- cgit v1.2.3 From fe85d961d53920aad72df0f92d7159865d34484c Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 2 Sep 2020 17:25:51 +0530 Subject: updated dock docker --- app/dock_docker.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'app') diff --git a/app/dock_docker.py b/app/dock_docker.py index 1c60a3b..a36648e 100644 --- a/app/dock_docker.py +++ b/app/dock_docker.py @@ -45,6 +45,20 @@ def email(zipArchive): s.sendmail(fromaddr, toaddr, text) s.quit() +def get3DModel(protein,ligand): + try: + import pymol2 + except ImportError: + print("🤭 PyMOL 2 has not been installed correctly") + return None + session = pymol2.PyMOL() + session.start() + cmd = session.cmd + cmd.load(protein,"target") + cmd.load(ligand,"ligand") + cmd.save("model.dae") + session.stop() + receptor_name = "protein.pdbqt" ligand_name = "ligand.pdbqt" description = "Curie Web Task" @@ -68,6 +82,7 @@ import os cd = os.getcwd() f = os.path.join(cd,"static/uploads") reportDirectory = os.path.join(f,"reports") +modelDirectory = os.path.join(f,"3DModels") #t = os.path.join(f,"receptor",target) #r = os.path.join(f,"ligands",ligand) #c = os.path.join(f,"configs",config) @@ -94,6 +109,18 @@ with tempfile.TemporaryDirectory() as directory: make_archive(zi, 'zip', directory) #copy(("Curie_Web_Result_"+str(jobID)),f) copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf"))) + get3DModel(receptor_name,ligand_name.replace(".pdbqt","_out.pdbqt")) + 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() + if "x86" in arch: + os.system("docker run -it --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") + try: + copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz"))) + except: + print("Could not generate USDZ file") email(zi) #print((str(zi) + ".zip")) mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID)) -- cgit v1.2.3 From f6196ac068280e76e096ff6a1c66e584ec8cbaa7 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 2 Sep 2020 18:15:21 +0530 Subject: added instructions in README and deleted misc file --- app/run_docking.py | 82 ------------------------------------------------------ app/run_local.py | 82 ------------------------------------------------------ app/views.py | 3 +- 3 files changed, 2 insertions(+), 165 deletions(-) delete mode 100644 app/run_docking.py delete mode 100644 app/run_local.py (limited to 'app') diff --git a/app/run_docking.py b/app/run_docking.py deleted file mode 100644 index 1b86d92..0000000 --- a/app/run_docking.py +++ /dev/null @@ -1,82 +0,0 @@ -import mysql.connector as con - -mycon = con.connect(host="sql12.freesqldatabase.com",user="sql12352288",password="7X35JENbK3",port=3306,database="sql12352288") -mycursor = mycon.cursor() - -sql_select_Query = "select * from curie where done=0 LIMIT 1" -mycursor.execute(sql_select_Query) - -records = mycursor.fetchall() - -def email(zipArchive): - import smtplib - from email.mime.multipart import MIMEMultipart - from email.mime.text import MIMEText - from email.mime.base import MIMEBase - from email import encoders - - fromaddr = "navanchauhan@gmail.com" - toaddr = toEmail - - msg = MIMEMultipart() - msg['From'] = fromaddr - msg['To'] = toaddr - msg['Subject'] = "Curie Web Results for Job ID " + str(jobID) - body = "Attached Zip contains the docked files, PLIP report and PyMOL Visualisations. If the ZIP file does not contain these files, please report this issue by replying to this email. Job was submitted on {} with the description {}".format(date, description) - - msg.attach(MIMEText(body, 'plain')) - filename = "Curie_Web_Results_Job_ID_" + str(jobID) + ".zip" - p = MIMEBase('application', 'octet-stream') - with open((str(zipArchive) + ".zip"), "rb") as attachment: - p.set_payload((attachment).read()) - encoders.encode_base64(p) - p.add_header('Content-Disposition', "attachment; filename= %s" % filename) - msg.attach(p) - - s = smtplib.SMTP('smtp.gmail.com', 587) - s.starttls() - s.login(fromaddr, 'ircd mday avbc tice') - - text = msg.as_string() - - s.sendmail(fromaddr, toaddr, text) - s.quit() - - -print(records[0]) -r = records[0] -jobID = r[0] -toEmail = r[1] -target = r[2] -ligand = r[3] -config = r[4] -date = r[5] -description = r[6] - -import os -cd = os.getcwd() -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) -print(f) -import tempfile -from shutil import copy -from shutil import make_archive - -with tempfile.TemporaryDirectory() as directory: - print('The created temporary directory is %s' % directory) - os.chdir(directory) - copy(t,os.getcwd()) - copy(r,os.getcwd()) - copy(c, os.getcwd()) - 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 %s -dpi" % (target,ligand,config)) - #copy("report.pdf",f) - z = "Curie_Web_Result_"+str(jobID) - zi = os.path.join(f,z) - make_archive(zi, 'zip', directory) - #copy(("Curie_Web_Result_"+str(jobID)),f) - email(zi) - #print((str(zi) + ".zip")) - mycursor.execute("UPDATE curie set done=1 where id={}".format(jobID)) - mycon.commit() \ No newline at end of file diff --git a/app/run_local.py b/app/run_local.py deleted file mode 100644 index 4b902d2..0000000 --- a/app/run_local.py +++ /dev/null @@ -1,82 +0,0 @@ -import mysql.connector as con - -mycon = con.connect(host="sql12.freesqldatabase.com",user="sql12352288",password="7X35JENbK3",port=3306,database="sql12352288") -mycursor = mycon.cursor() - -sql_select_Query = "select * from curie where done=0 LIMIT 1" -mycursor.execute(sql_select_Query) - -records = mycursor.fetchall() - -def email(zipArchive): - import smtplib - from email.mime.multipart import MIMEMultipart - from email.mime.text import MIMEText - from email.mime.base import MIMEBase - from email import encoders - - fromaddr = "navanchauhan@gmail.com" - toaddr = toEmail - - msg = MIMEMultipart() - msg['From'] = fromaddr - msg['To'] = toaddr - msg['Subject'] = "Curie Web Results for Job ID " + str(jobID) - body = "Attached Zip contains the docked files, PLIP report and PyMOL Visualisations. If the ZIP file does not contain these files, please report this issue by replying to this email. Job was submitted on {} with the description {}".format(date, description) - - msg.attach(MIMEText(body, 'plain')) - filename = "Curie_Web_Results_Job_ID_" + str(jobID) + ".zip" - p = MIMEBase('application', 'octet-stream') - with open((str(zipArchive) + ".zip"), "rb") as attachment: - p.set_payload((attachment).read()) - encoders.encode_base64(p) - p.add_header('Content-Disposition', "attachment; filename= %s" % filename) - msg.attach(p) - - s = smtplib.SMTP('smtp.gmail.com', 587) - s.starttls() - s.login(fromaddr, 'ircd mday avbc tice') - - text = msg.as_string() - - s.sendmail(fromaddr, toaddr, text) - s.quit() - - -print(records[0]) -r = records[0] -jobID = r[0] -toEmail = r[1] -target = r[2] -ligand = r[3] -config = r[4] -date = r[5] -description = r[6] - -import os -cd = os.getcwd() -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) -print(f) -import tempfile -from shutil import copy -from shutil import make_archive - -with tempfile.TemporaryDirectory() as directory: - print('The created temporary directory is %s' % directory) - os.chdir(directory) - copy(t,os.getcwd()) - copy(r,os.getcwd()) - copy(c, os.getcwd()) - os.system("main_local.sh -r %s -l %s -c %s -dpi" % (target,ligand,config)) - #copy("report.pdf",f) - z = "Curie_Web_Result_"+str(jobID) - zi = os.path.join(f,z) - make_archive(zi, 'zip', directory) - #copy(("Curie_Web_Result_"+str(jobID)),f) - email(zi) - #print((str(zi) + ".zip")) - mycursor.execute("UPDATE curie set done=1 where id={}".format(jobID)) - mycon.commit() diff --git a/app/views.py b/app/views.py index 65dd4a9..86a01fd 100644 --- a/app/views.py +++ b/app/views.py @@ -222,7 +222,8 @@ def dock_upload(): mycon.commit() print("Description",description) - + cwd = os.path.join(os.getcwd(),"app") + subprocess.Popen(['python3', 'dock-docker.py'],cwd=cwd) return render_template('display_result.html', filename="OwO", description=description,job=jobID) flash_errors(form) -- cgit v1.2.3