EricBoi commited on
Commit
e0fa269
·
1 Parent(s): 3bc70f1
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -18,6 +18,7 @@ import pandas as pd
18
  from dcmnet.modules import MessagePassingModel
19
  from dcmnet.utils import clip_colors, apply_model
20
  from dcmnet.data import prepare_batches
 
21
 
22
  RANDOM_NUMBER = 0
23
  filename = "test"
@@ -127,15 +128,25 @@ batchID = 0
127
  errors_train = []
128
  batch = psi4_test_batches[batchID]
129
 
130
- mono, dipo = apply_model(DCM1, test_weights, batch, batch_size)
131
-
132
 
 
 
 
 
133
 
134
  st.write(dipo)
135
  st.write(mono)
136
  #st.write(MessagePassingModel)
137
  #st.write(test_weights)
138
 
 
 
 
 
 
 
139
 
140
  x = st.slider('Select a value')
141
  st.write(x, 'squared is', x * x)
 
18
  from dcmnet.modules import MessagePassingModel
19
  from dcmnet.utils import clip_colors, apply_model
20
  from dcmnet.data import prepare_batches
21
+ from dcmnet.plotting import plot_model
22
 
23
  RANDOM_NUMBER = 0
24
  filename = "test"
 
128
  errors_train = []
129
  batch = psi4_test_batches[batchID]
130
 
131
+ #mono, dipo = apply_model(DCM1, test_weights, batch, batch_size)
132
+ dcm1results = plot_model(DCM1, test_weights, batch, batch_size)
133
 
134
+ dipo = dcm1results["dipo"]
135
+ 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
+ from ase.visualize import view
145
+ display_mol = view(atoms+dcmol, viewer="x3d"))
146
+
147
+ st.write(type(display_mol))
148
+
149
+ st.html(display_mol)
150
 
151
  x = st.slider('Select a value')
152
  st.write(x, 'squared is', x * x)