app.py
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
from scipy.spatial.distance import cdist
|
4 |
|
5 |
import ase
|
@@ -136,37 +144,12 @@ mono = dcm1results["mono"]
|
|
136 |
atoms = dcm1results["atoms"]
|
137 |
dcmol = dcm1results["dcmol"]
|
138 |
|
139 |
-
#st.write(dipo)
|
140 |
-
#st.write(mono)
|
141 |
-
#st.write(MessagePassingModel)
|
142 |
-
#st.write(test_weights)
|
143 |
-
#
|
144 |
-
st.write(atoms)
|
145 |
-
st.write(dcmol)
|
146 |
|
147 |
-
from ase.visualize import view
|
148 |
|
149 |
-
try:
|
150 |
-
from StringIO import StringIO
|
151 |
-
except ImportError:
|
152 |
-
from io import StringIO
|
153 |
|
154 |
output = StringIO()
|
155 |
-
|
156 |
(atoms+dcmol).write(output, format="html")
|
157 |
-
|
158 |
data = output.getvalue()
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
#st.write(data)
|
163 |
-
|
164 |
-
st.html(data)
|
165 |
-
st.html(data.strip("\n"))
|
166 |
-
|
167 |
-
import streamlit.components.v1 as components
|
168 |
-
|
169 |
-
components.html("example")
|
170 |
-
|
171 |
-
components.html(data)
|
172 |
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
from ase.visualize import view
|
4 |
+
|
5 |
+
try:
|
6 |
+
from StringIO import StringIO
|
7 |
+
except ImportError:
|
8 |
+
from io import StringIO
|
9 |
+
|
10 |
+
import streamlit.components.v1 as components
|
11 |
from scipy.spatial.distance import cdist
|
12 |
|
13 |
import ase
|
|
|
144 |
atoms = dcm1results["atoms"]
|
145 |
dcmol = dcm1results["dcmol"]
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
|
|
148 |
|
|
|
|
|
|
|
|
|
149 |
|
150 |
output = StringIO()
|
|
|
151 |
(atoms+dcmol).write(output, format="html")
|
|
|
152 |
data = output.getvalue()
|
153 |
|
154 |
+
components.html(data, width=1000, height=1000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|