From d5894f6f7694f927200035ab76177eb3df107f3d Mon Sep 17 00:00:00 2001 From: hmacdope Date: Wed, 20 Dec 2023 13:53:36 +1100 Subject: [PATCH] fix for latest changes on asap main --- .../templates/argos_viewer/target_pdb_detail_view.html | 1 + argos/argos_viewer/views.py | 6 ++++-- devtools/conda-envs/argos-ubuntu-latest.yml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 argos/argos_viewer/templates/argos_viewer/target_pdb_detail_view.html diff --git a/argos/argos_viewer/templates/argos_viewer/target_pdb_detail_view.html b/argos/argos_viewer/templates/argos_viewer/target_pdb_detail_view.html new file mode 100644 index 0000000..f3ca97f --- /dev/null +++ b/argos/argos_viewer/templates/argos_viewer/target_pdb_detail_view.html @@ -0,0 +1 @@ +{{html_content}} \ No newline at end of file diff --git a/argos/argos_viewer/views.py b/argos/argos_viewer/views.py index 2a9f162..e1d67ba 100644 --- a/argos/argos_viewer/views.py +++ b/argos/argos_viewer/views.py @@ -76,10 +76,12 @@ def target_pdb_detail_view(request, pk): tf = tempfile.NamedTemporaryFile() html_viz = HTMLVisualizer( - [c.ligand.to_oemol()], [tf], obj.target, c.target.to_oemol(), color_method="fitness" + [c.ligand.to_oemol()], [tf], obj.target, c.target.to_oemol(), color_method="fitness", align=False ) + # align=True is broken, see https://github.com/choderalab/asapdiscovery/issues/709 html = html_viz.make_poses_html()[0] - except: + except Exception as e: + print(f"rendering failed with exception {e}") return redirect("failed") return HttpResponse(html) diff --git a/devtools/conda-envs/argos-ubuntu-latest.yml b/devtools/conda-envs/argos-ubuntu-latest.yml index 9df1aea..4ac5d49 100644 --- a/devtools/conda-envs/argos-ubuntu-latest.yml +++ b/devtools/conda-envs/argos-ubuntu-latest.yml @@ -55,4 +55,6 @@ dependencies: - psycopg2-binary - django-environ - whitenoise + - celery + - logomaker