Update app.py
Browse files
app.py
CHANGED
@@ -252,7 +252,7 @@ def plot_properties_dashboard(df: pd.DataFrame):
|
|
252 |
axes[0,1].axhline(10, color='r', linestyle='--', alpha=0.6, label='HBA < 10')
|
253 |
axes[0,1].legend()
|
254 |
|
255 |
-
axes[1,0].scatter(df['TPSA'], df['RotBonds'], c=df['Drug_Like'].map({True: 'green', False: 'red'}), s=80, alpha=0.7)
|
256 |
axes[1,0].set_title('TPSA vs Flexibility')
|
257 |
axes[1,0].set_xlabel('Topological Polar Surface Area (Ų)')
|
258 |
axes[1,0].set_ylabel('Rotatable Bonds')
|
@@ -322,6 +322,9 @@ def visualize_molecule_2d_3d(smiles: str, name: str):
|
|
322 |
drawer.FinishDrawing()
|
323 |
svg_2d = drawer.GetDrawingText().replace('svg:', '')
|
324 |
|
|
|
|
|
|
|
325 |
# Embed the SVG within a div with a dark background for consistency
|
326 |
svg_2d = f'<div style="background-color: #1C1C1C; padding: 10px; border-radius: 5px;">{svg_2d}</div>'
|
327 |
|
|
|
252 |
axes[0,1].axhline(10, color='r', linestyle='--', alpha=0.6, label='HBA < 10')
|
253 |
axes[0,1].legend()
|
254 |
|
255 |
+
axes[1,0].scatter(df['TPSA'], df['RotBonds'], c=df['Drug_Like'].map({True: 'green', False: False: 'red'}), s=80, alpha=0.7)
|
256 |
axes[1,0].set_title('TPSA vs Flexibility')
|
257 |
axes[1,0].set_xlabel('Topological Polar Surface Area (Ų)')
|
258 |
axes[1,0].set_ylabel('Rotatable Bonds')
|
|
|
322 |
drawer.FinishDrawing()
|
323 |
svg_2d = drawer.GetDrawingText().replace('svg:', '')
|
324 |
|
325 |
+
# Replace any remaining black strokes with white in the SVG content
|
326 |
+
svg_2d = svg_2d.replace('stroke="black"', 'stroke="white"')
|
327 |
+
|
328 |
# Embed the SVG within a div with a dark background for consistency
|
329 |
svg_2d = f'<div style="background-color: #1C1C1C; padding: 10px; border-radius: 5px;">{svg_2d}</div>'
|
330 |
|