Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -195,9 +195,9 @@ def mol_to_pharm3d(mol, mode='html'):
|
|
195 |
params = AllChem.ETKDGv3()
|
196 |
params.randomSeed = 0xf00d # for reproducibility
|
197 |
AllChem.EmbedMolecule(mol, params)
|
198 |
-
|
199 |
feats = FEAT_FACTORY.GetFeaturesForMol(mol)
|
200 |
-
|
201 |
view = View3DmolCell(width=320, height=200)
|
202 |
for feat in feats:
|
203 |
pos = feat.GetPos()
|
@@ -207,12 +207,12 @@ def mol_to_pharm3d(mol, mode='html'):
|
|
207 |
'radius': 0.5,
|
208 |
'color': rgb_to_hex(color)
|
209 |
})
|
210 |
-
|
211 |
mol_block = Chem.MolToMolBlock(mol)
|
212 |
view.addModel(mol_block, 'sdf')
|
213 |
view.setStyle({'stick': {}})
|
214 |
view.zoomTo()
|
215 |
-
|
216 |
if mode == 'html':
|
217 |
return view.write_html()
|
218 |
# case 'png':
|
@@ -1303,7 +1303,7 @@ def create_html_report(df, file=None, task=None, opts=(), progress=gr.Progress(t
|
|
1303 |
report_table = pn.widgets.Tabulator(
|
1304 |
df_html, formatters=formatters,
|
1305 |
frozen_columns=[
|
1306 |
-
'Index', 'Target ID', 'Compound ID', 'Compound
|
1307 |
],
|
1308 |
disabled=True, sizing_mode='stretch_both', pagination='local', page_size=30
|
1309 |
)
|
|
|
195 |
params = AllChem.ETKDGv3()
|
196 |
params.randomSeed = 0xf00d # for reproducibility
|
197 |
AllChem.EmbedMolecule(mol, params)
|
198 |
+
|
199 |
feats = FEAT_FACTORY.GetFeaturesForMol(mol)
|
200 |
+
|
201 |
view = View3DmolCell(width=320, height=200)
|
202 |
for feat in feats:
|
203 |
pos = feat.GetPos()
|
|
|
207 |
'radius': 0.5,
|
208 |
'color': rgb_to_hex(color)
|
209 |
})
|
210 |
+
|
211 |
mol_block = Chem.MolToMolBlock(mol)
|
212 |
view.addModel(mol_block, 'sdf')
|
213 |
view.setStyle({'stick': {}})
|
214 |
view.zoomTo()
|
215 |
+
|
216 |
if mode == 'html':
|
217 |
return view.write_html()
|
218 |
# case 'png':
|
|
|
1303 |
report_table = pn.widgets.Tabulator(
|
1304 |
df_html, formatters=formatters,
|
1305 |
frozen_columns=[
|
1306 |
+
'Index', 'Target ID', 'Compound ID', 'Compound'
|
1307 |
],
|
1308 |
disabled=True, sizing_mode='stretch_both', pagination='local', page_size=30
|
1309 |
)
|