Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ repos:
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=500"]
# Bundled molecule-library package data (M-STRUCT) is intentionally
# large and governed by its own <=10 MB budget test
# (test_*_library.py); keep the 500 KB guard for everything else.
exclude: "^quantui/data/"
- id: debug-statements # catch leftover breakpoint() / pdb calls

# ── Strip notebook outputs before commit ─────────────────────────────────
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,49 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht

## [Unreleased]

## [0.3.0] - 2026-06-11

Structure-sourcing release. Repairs the external-database structure search and
replaces the 20-entry inline molecule list with an indexed, three-tier bundled
library, alongside visualization and result-card fixes.

### Added

- **External structure search** — resolve molecules by name, PubChem CID, InChI,
InChIKey, SMILES, or CAS number. Input is routed by type: SMILES/InChI resolve
locally via RDKit with no network, while names and identifiers query PubChem
through a hardened client (URL-encoding, request throttling, bounded retry on
server throttling). NCI CACTUS acts as a fallback resolver, and an offline
bundled-library fallback keeps the search usable without a network connection.
- **Disambiguation pick-list** — an ambiguous query (e.g. a name with several
PubChem matches) presents a selectable list instead of silently choosing the
first hit.
- **Three-tier bundled molecule library** — 20 presets, 156 curated named
molecules, and ~1,900 bulk QM9 structures (CC0), held in an indexed,
lazily-loaded package-data store. Bulk entries are reachable via search.
- **Library browse/search tab** — category filter plus name/formula search,
replacing the flat preset dropdown.

### Changed

- The molecule preset list moved from an inline `config.py` dictionary into the
indexed library store; `config.MOLECULE_LIBRARY` is preserved as a
backward-compatible accessor.
- Frequency / UV-Vis seed-geometry dropdown entries are now labeled as optimized
geometries so their source is explicit.

### Fixed

- **Orbital isosurface could exhaust browser memory** — the full volumetric grid
was serialized into the Plotly figure. The rendered surface is now downsampled
to a bounded point count (the saved cube file remains full-resolution).
- **CCSD / MP2 result cards** now show the HF reference and correlation-energy
breakdown (plus the (T) triples correction for CCSD(T)); these fields are also
persisted with saved results.
- The live calculation log no longer jumps to the top while streaming output.
- Structures fetched as 2D records are re-embedded in 3D, and salt/counterion
fragments are separated so bond perception does not misread them.

## [0.2.0] - 2026-05-22

First substantial release after `v0.1.0`. The codebase moved from a single
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "quantui"
version = "0.2.0"
version = "0.3.0"
description = "An open-source frontend for DFT and post-HF quantum chemistry with PySCF"
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -45,6 +45,12 @@ quantui = "quantui.cli:main"
[tool.setuptools]
packages = ["quantui"]

[tool.setuptools.package-data]
# Bundled molecule library (M-STRUCT): the indexed SQLite store + the
# human-readable JSON manifests it is built from. Both ship in the wheel so
# offline structure lookup works on a fresh install.
quantui = ["data/library/*.sqlite", "data/manifests/*.json"]

[project.optional-dependencies]
# PySCF requires Linux/macOS/WSL — not available on Windows natively.
# Use the Apptainer container (apptainer/quantui.def) for Windows.
Expand Down
26 changes: 25 additions & 1 deletion quantui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PySCF requires Linux/macOS/WSL. Windows users should use the Apptainer container.
"""

__version__ = "0.2.0"
__version__ = "0.3.0"

import logging

Expand Down Expand Up @@ -123,20 +123,33 @@

# PubChem integration (optional — requires internet)
try:
from .cactus import fetch_from_cactus
from .pubchem import (
MoleculeNotFoundError,
PubChemError,
check_pubchem_availability,
classify_query,
display_2d_structure,
fetch_molecule,
fetch_structure,
generate_2d_structure_svg,
get_common_molecules,
get_smiles_examples,
inchi_to_xyz,
search_cid_by_inchikey,
search_cids_by_name,
search_pubchem_candidates,
smiles_to_xyz,
student_friendly_fetch,
student_friendly_resolve,
student_friendly_smiles_to_xyz,
validate_smiles,
)
from .structure_providers import (
ResolvedStructure,
resolve_structure,
search_candidates,
)

PUBCHEM_AVAILABLE = True
except ImportError:
Expand Down Expand Up @@ -238,7 +251,18 @@
"optimize_geometry",
# PubChem (optional)
"fetch_molecule",
"fetch_structure",
"classify_query",
"student_friendly_fetch",
"student_friendly_resolve",
"resolve_structure",
"ResolvedStructure",
"search_candidates",
"fetch_from_cactus",
"inchi_to_xyz",
"search_cid_by_inchikey",
"search_cids_by_name",
"search_pubchem_candidates",
"get_common_molecules",
"check_pubchem_availability",
"PubChemError",
Expand Down
Loading
Loading