|
| 1 | +# QuantUI-local |
| 2 | + |
| 3 | +An interactive Jupyter interface for running quantum chemistry calculations |
| 4 | +locally — no cluster account, no SLURM, no queueing. Students design |
| 5 | +molecules, launch PySCF calculations in their own Python session, and |
| 6 | +visualize results in minutes. |
| 7 | + |
| 8 | +Built for classroom teaching at the |
| 9 | +[Schultz Lab, North Carolina Central University](https://github.com/The-Schultz-Lab). |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## What it does |
| 14 | + |
| 15 | +- **Molecule input** — paste XYZ coordinates, draw from a preset library, or |
| 16 | + search PubChem by name or SMILES |
| 17 | +- **3D visualization** — interactive py3Dmol viewer, directly in the notebook |
| 18 | +- **In-session calculations** — RHF and UHF via PySCF, running in your Python |
| 19 | + kernel (no batch submission) |
| 20 | +- **Results** — total energy, HOMO-LUMO gap, convergence status, and a |
| 21 | + side-by-side comparison table for multiple calculations |
| 22 | +- **Script export** — download a standalone `.py` file to run or study outside |
| 23 | + the notebook |
| 24 | +- **Voilà app mode** — serve the notebook as a clean widget-only UI (no code |
| 25 | + visible) for classroom demos |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## Platform requirements |
| 30 | + |
| 31 | +| Platform | Works? | Notes | |
| 32 | +|----------|--------|-------| |
| 33 | +| Linux / macOS | Full | PySCF installs natively | |
| 34 | +| WSL (Windows) | Full | Use an Ubuntu WSL environment | |
| 35 | +| Windows (native) | Partial | All UI and visualization features work; PySCF calculations require the Apptainer container | |
| 36 | + |
| 37 | +### Windows users: Apptainer container |
| 38 | + |
| 39 | +PySCF does not install on Windows natively. The |
| 40 | +[`apptainer/quantui-local.def`](apptainer/quantui-local.def) container bundles |
| 41 | +the complete environment and runs anywhere Apptainer/Singularity is available. |
| 42 | +See [`apptainer/BUILD.md`](apptainer/BUILD.md) for build and run instructions. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Installation |
| 47 | + |
| 48 | +### Option A — conda (recommended for Linux/macOS/WSL) |
| 49 | + |
| 50 | +```bash |
| 51 | +# Create a dedicated environment |
| 52 | +conda create -n quantui-local python=3.11 |
| 53 | +conda activate quantui-local |
| 54 | + |
| 55 | +# Install with PySCF and ASE |
| 56 | +pip install -e ".[pyscf,ase,app]" |
| 57 | +``` |
| 58 | + |
| 59 | +### Option B — pip only |
| 60 | + |
| 61 | +```bash |
| 62 | +python -m pip install quantui-local[pyscf,ase,app] |
| 63 | +``` |
| 64 | + |
| 65 | +### Option C — Apptainer container (Windows / reproducible deployment) |
| 66 | + |
| 67 | +See [apptainer/BUILD.md](apptainer/BUILD.md). |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## Quick start |
| 72 | + |
| 73 | +```bash |
| 74 | +# Activate your environment |
| 75 | +conda activate quantui-local |
| 76 | + |
| 77 | +# JupyterLab (full IDE — shows code) |
| 78 | +jupyter lab notebooks/molecule_computations.ipynb |
| 79 | + |
| 80 | +# Voilà app mode (widget-only — for classroom demos) |
| 81 | +voila notebooks/molecule_computations.ipynb |
| 82 | +``` |
| 83 | + |
| 84 | +Open the notebook, pick a molecule, choose a method and basis set, and click |
| 85 | +**Run Calculation**. Results appear directly in the notebook. |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## Tutorials |
| 90 | + |
| 91 | +Five step-by-step notebooks in [`notebooks/tutorials/`](notebooks/tutorials/): |
| 92 | + |
| 93 | +| Notebook | Topic | |
| 94 | +|----------|-------| |
| 95 | +| [01_first_calculation.ipynb](notebooks/tutorials/01_first_calculation.ipynb) | Your first RHF calculation | |
| 96 | +| [02_basis_set_study.ipynb](notebooks/tutorials/02_basis_set_study.ipynb) | Comparing STO-3G, 6-31G, cc-pVDZ | |
| 97 | +| [03_multiplicity_radicals.ipynb](notebooks/tutorials/03_multiplicity_radicals.ipynb) | Open-shell molecules and UHF | |
| 98 | +| [04_charged_species.ipynb](notebooks/tutorials/04_charged_species.ipynb) | Ions and charged systems | |
| 99 | +| [05_comparing_results.ipynb](notebooks/tutorials/05_comparing_results.ipynb) | Side-by-side result analysis | |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +## Supported calculations |
| 104 | + |
| 105 | +| Method | When to use | |
| 106 | +|--------|------------| |
| 107 | +| RHF | Closed-shell molecules — all electrons paired | |
| 108 | +| UHF | Open-shell molecules — radicals or unpaired electrons | |
| 109 | + |
| 110 | +**Basis sets:** STO-3G (fast, good for learning) → 6-31G (common research |
| 111 | +choice) → cc-pVTZ (high accuracy) |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## Running tests |
| 116 | + |
| 117 | +```bash |
| 118 | +pip install -e ".[dev]" |
| 119 | + |
| 120 | +# All tests (Linux/macOS — PySCF available) |
| 121 | +pytest -m "not network" |
| 122 | + |
| 123 | +# Skip PySCF-dependent tests (Windows without container) |
| 124 | +pytest -m "not network" \ |
| 125 | + --ignore=tests/test_session_calc.py \ |
| 126 | + --ignore=tests/test_optimizer.py \ |
| 127 | + --ignore=tests/test_preopt.py |
| 128 | +``` |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +## Project structure |
| 133 | + |
| 134 | +``` |
| 135 | +quantui/ Main package |
| 136 | + molecule.py Molecule input and validation |
| 137 | + session_calc.py In-session PySCF runner |
| 138 | + visualization_py3dmol.py 3D viewer |
| 139 | + pubchem.py PubChem molecule search |
| 140 | + comparison.py Side-by-side result tables |
| 141 | + ase_bridge.py ASE structure I/O |
| 142 | + optimizer.py QM geometry optimization |
| 143 | + ... |
| 144 | +notebooks/ |
| 145 | + molecule_computations.ipynb Main student-facing interface |
| 146 | + tutorials/ Step-by-step guided notebooks |
| 147 | +tests/ pytest test suite (439 tests) |
| 148 | +apptainer/ Container definition for reproducible deployment |
| 149 | +local-setup/ Conda environment definition |
| 150 | +pyproject.toml Package metadata and tool config |
| 151 | +``` |
| 152 | + |
| 153 | +--- |
| 154 | + |
| 155 | +## Relationship to the cluster version |
| 156 | + |
| 157 | +QuantUI-local is a downstream port of the cluster-based |
| 158 | +[QuantUI](https://github.com/The-Schultz-Lab/QuantUI) repository. All SLURM |
| 159 | +infrastructure (job manager, job storage, batch templates) has been removed. |
| 160 | +Bug fixes flow `QuantUI → QuantUI-local`, not the other way around. |
| 161 | + |
| 162 | +--- |
| 163 | + |
| 164 | +## License |
| 165 | + |
| 166 | +[MIT](LICENSE) — Copyright 2026 The Schultz Lab, North Carolina Central University |
0 commit comments