Refua Notebook
View ADMET dashboards, 3D molecular structures, and SMILES drawings in Jupyter and IPython notebooks.
What Is Refua Notebook?
Refua Notebook is the visualization layer for the Refua ecosystem. It provides an
IPython extension that automatically registers rich HTML
representations for Refua objects. Simply display a Protein,
SM, Complex, or FoldResult in a cell, and
the extension renders an interactive widget with structure views, property summaries,
and ADMET dashboards.
The package ships with a prebuilt JupyterLab renderer that handles Mol* and SmilesDrawer locally, requiring no manual extension installation or lab build step.
Widget Types
- MolstarView: Interactive 3D molecular visualization from Mol*
- SmilesView: 2D structure drawings from SMILES strings
- ADMETView: Color-coded property dashboards with thresholds
- ComplexView: 3D scenes with affinity annotations
- ProteinView: Sequence info and folded structure display
Automatic Widget Display
Load the extension, then display supported Refua objects as interactive widgets in notebook cells.
Protein Display
Display proteins with sequence information, property summaries, and 3D structure visualization when a fold result is available.
Small Molecule Display
Show 2D structure drawings with RDKit-computed properties, Lipinski rule-of-five compliance, and ADMET dashboard integration.
Complex Display
Folded complexes render a tabbed view with 3D structure, binding affinity metrics, and per-component molecule details.
Get Started
Installation
pip install refua-notebookActivate the Extension
# In a notebook cell:
%load_ext refua_notebook
# Or programmatically:
import refua_notebook
refua_notebook.activate()Display Refua Objects
from refua import SM, Protein, Complex
# Proteins show sequence info and 3D structure if folded
Protein("MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ", ids="A")
# Small molecules show 2D structure and properties
SM("Cn1cnc2n(C)c(=O)n(C)c(=O)c12")
# Complexes show tabbed 3D + affinity view
complex = Complex([
Protein("MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ", ids="A"),
SM("CCO"),
]).request_affinity()
result = complex.fold()
complex # Renders automaticallySee Your Science
Inspect molecular structures and predicted properties alongside the code and analysis in your notebook.