Spaces:
Sleeping
Sleeping
Set width and height in py3Dmol too
Browse filesSetting dimentionds only for STmol does not actually
change the rendered viewer, both need to be set.
hexviz/🧬Attention_Visualization.py
CHANGED
@@ -183,7 +183,7 @@ sorted_by_attention = sorted(attention_pairs, key=lambda x: x[0], reverse=True)
|
|
183 |
|
184 |
|
185 |
def get_3dview(pdb):
|
186 |
-
xyzview = py3Dmol.view()
|
187 |
xyzview.addModel(pdb_str, "pdb")
|
188 |
xyzview.setStyle({"cartoon": {"color": "spectrum" if color_protein else "white"}})
|
189 |
stmol.add_hover(xyzview, backgroundColor="black", fontColor="white")
|
@@ -253,7 +253,7 @@ def get_3dview(pdb):
|
|
253 |
|
254 |
|
255 |
xyzview = get_3dview(pdb_id)
|
256 |
-
showmol(xyzview, height=
|
257 |
|
258 |
st.markdown(
|
259 |
f"""
|
|
|
183 |
|
184 |
|
185 |
def get_3dview(pdb):
|
186 |
+
xyzview = py3Dmol.view(height=800, width=800) # TODO you can set the pixel dims here!
|
187 |
xyzview.addModel(pdb_str, "pdb")
|
188 |
xyzview.setStyle({"cartoon": {"color": "spectrum" if color_protein else "white"}})
|
189 |
stmol.add_hover(xyzview, backgroundColor="black", fontColor="white")
|
|
|
253 |
|
254 |
|
255 |
xyzview = get_3dview(pdb_id)
|
256 |
+
showmol(xyzview, height=800, width=800)
|
257 |
|
258 |
st.markdown(
|
259 |
f"""
|