Spaces:
Runtime error
Runtime error
Simon Duerr
commited on
Commit
·
c1d7a42
1
Parent(s):
0fc2f31
fix: surface
Browse files
app.py
CHANGED
@@ -156,7 +156,7 @@ def molecule(input_pdb, ligand_pdb, original_ligand):
|
|
156 |
</head>
|
157 |
<body>
|
158 |
<button id="startanimation">Replay diffusion process</button>
|
159 |
-
<button id="
|
160 |
<div>
|
161 |
<span class="green"></span> Uploaded ligand position
|
162 |
<span class="magenta"></span> Predicted ligand position
|
@@ -200,12 +200,12 @@ def molecule(input_pdb, ligand_pdb, original_ligand):
|
|
200 |
viewer.animate({loop: "forward",reps: 1});
|
201 |
});
|
202 |
$("#togglesurface").click(function() {
|
203 |
-
|
204 |
-
surf = viewer.addSurface(
|
205 |
surface = true;
|
206 |
-
}else{
|
207 |
-
|
208 |
-
surface = false;
|
209 |
}
|
210 |
});
|
211 |
</script>
|
|
|
156 |
</head>
|
157 |
<body>
|
158 |
<button id="startanimation">Replay diffusion process</button>
|
159 |
+
<button id="togglesurface">Toggle surface representation</button>
|
160 |
<div>
|
161 |
<span class="green"></span> Uploaded ligand position
|
162 |
<span class="magenta"></span> Predicted ligand position
|
|
|
200 |
viewer.animate({loop: "forward",reps: 1});
|
201 |
});
|
202 |
$("#togglesurface").click(function() {
|
203 |
+
if (surface != true) {
|
204 |
+
surf = viewer.addSurface($3Dmol.SurfaceType.VDW, { "opacity": 0.9, "color": "white" }, { model: 0 });
|
205 |
surface = true;
|
206 |
+
} else {
|
207 |
+
viewer.removeAllSurfaces()
|
208 |
+
surface = false;
|
209 |
}
|
210 |
});
|
211 |
</script>
|