Skip to content
ZengLLQPublic

About

Research-grade, local-first computational chemistry desktop workbench with a Julia-first scientific engine and a Tauri v2 (Rust + Three.js) presentation shell.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atomica — Molecular Simulation Workbench

Atomica is a research-grade, local-first computational chemistry desktop workbench engineered with a Julia-first scientific core and a modern Tauri v2 (Rust + TypeScript) desktop presentation shell.

Atomica is designed for computational chemistry researchers, educators, and software engineers who demand numerical rigor, complete offline local execution, inspectable scientific workflows, and transparent provenance without black-box cloud dependencies or fabricated visual feedback.


Key Features

  • Julia-First Scientific Engine:
    • All scientific calculations, structure conversions, unit transformations, and workflow lifecycles are executed natively by verified Julia packages.
    • Classical Molecular Dynamics: Driven by Molly.jl (Lennard-Jones potentials, Velocity-Verlet NVE integration, trajectory generation, and microcanonical energy conservation).
    • Molecular Quantum Chemistry: Driven by Fermi.jl (Restricted Hartree-Fock [RHF] self-consistent field and Møller-Plesset second-order perturbation theory [MP2], orbital eigenvalue & HOMO/LUMO extraction).
    • Periodic Density-Functional Theory (DFT): Driven by DFTK.jl with PseudoPotentialData.jl (Plane-wave Kohn-Sham SCF, GTH pseudopotentials, LDA/PBE exchange-correlation, and Hellmann-Feynman forces).
  • Interactive 3D WebGL Molecular Viewport:
    • Built with Three.js conforming to modern WebGL standards.
    • CPK color-coded atomic spheres with covalent radii scaling.
    • Inferred covalent bonding cylinders and periodic crystal unit cell bounding boxes.
    • Interactive mouse raycasting for atom inspection, interatomic distances, and bond angles.
  • Robust Process Isolation & NDJSON IPC Daemon:
    • Independent Julia background worker process managed by a native Rust process supervisor.
    • Line-delimited JSON (NDJSON) over standard I/O with strict message bounding (10 MB).
    • High-throughput asynchronous background job execution with real-time log, event, and progress streaming without blocking the desktop UI.
  • Local-First SQLite Persistence & Artifact Provenance:
    • Structured storage of projects, immutable structure revisions, calculation specifications, execution runs, and numerical results.
    • Deterministic SHA-256 content hashing for all output artifacts (trajectories, logs, convergence records).
    • Zero requirement for internet access, remote APIs, or cloud accounts.
  • Strict Anti-Fictitious Policy:
    • Zero fake functionality. No simulated progress bars, mock calculations, or hardcoded dummy numbers. If a calculation is requested, a real numerical engine evaluates the physical equations.

Architecture Overview

Atomica utilizes a modular monolith architecture with strictly separated responsibilities:

atomica/
├── julia/
│   ├── Project.toml & Manifest.toml  # Julia dependencies (Julia 1.10+)
│   ├── src/
│   │   ├── Atomica.jl                # Core module umbrella
│   │   ├── AtomicaCore/              # Types, errors, units (Unitful), capability registry
│   │   ├── AtomicaPersistence/       # SQLite schema migrations, run records, artifact hashes
│   │   ├── AtomicaStructures/        # AtomsBase wrapper, extended XYZ I/O, connectivity
│   │   ├── AtomicaEngines/           # Molly.jl, Fermi.jl, DFTK.jl adapters
│   │   ├── AtomicaWorkflows/         # Job lifecycle, stdout redirection, cancellation tokens
│   │   ├── AtomicaAnalysis/          # Trajectory RMSD, geometry metrics, dE/dt drift
│   │   └── AtomicaIPC/               # NDJSON protocol, event dispatching, command handlers
│   └── scripts/
│       └── daemon.jl                 # Production IPC daemon entry point
├── apps/
│   └── desktop/                      # Desktop Shell
│       ├── src-tauri/                # Tauri v2 Rust process supervisor
│       │   ├── src/lib.rs            # Stdio piping, async dispatch, webview emitter
│       │   └── Cargo.toml
│       └── src/                      # TypeScript UI
│           ├── viewport.ts           # Three.js 3D molecular canvas
│           ├── api.ts                # Tauri invoke and event listener bridge
│           ├── main.ts               # Application state machine & DOM controller
│           └── styles/               # Dark graphite technical workstation theme
├── tests/
│   ├── unit/                         # Core, Persistence, Structures, Analysis tests
│   ├── scientific/                   # Real Molly, Fermi, and DFTK workflow tests
│   └── integration/                  # End-to-end NDJSON IPC daemon integration tests
├── scripts/
│   └── run_all_tests.mjs             # Master test suite runner
└── docs/                             # Architecture, user guide, and validation reports

Getting Started

Prerequisites

  1. Julia 1.10+ (verified on Julia 1.10 – 1.13): Ensure julia is available on your system PATH.
  2. Node.js 18+ & npm: Required for frontend bundling and desktop client scripts.
  3. Rust & Cargo (latest stable): Required for compiling the Tauri v2 native desktop application shell.

Environment Setup

  1. Initialize Julia Dependencies:

    cd julia
    julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()'
    cd ..
  2. Install Desktop Shell Dependencies:

    cd apps/desktop
    npm install
    cd ../..

Running the Automated Test Suite

Atomica includes an automated test runner that executes unit tests, scientific verification workflows, IPC daemon communication, and desktop compilation:

node scripts/run_all_tests.mjs

Verified Test Matrix:

Test Suite Subsystem Covered Typical Runtime Status
test_core.jl AtomicaCore (Types, Units, Registry) ~4s ✅ PASS
test_persistence.jl AtomicaPersistence (SQLite WAL, Migrations) ~12s ✅ PASS
test_structures.jl AtomicaStructures (AtomsBase, XYZ I/O, Radii) ~11s ✅ PASS
test_analysis.jl AtomicaAnalysis (Bonds, Angles, RMSD, Drift) ~3s ✅ PASS
test_classical_workflow.jl Molly.jl NVE Molecular Dynamics ~33s ✅ PASS
test_quantum_workflow.jl Fermi.jl Water RHF & MP2 Energy ~47s ✅ PASS
test_periodic_workflow.jl DFTK.jl Silicon Plane-Wave DFT ~50s ✅ PASS
test_ipc_server.mjs AtomicaIPC (NDJSON over stdio) ~46s ✅ PASS
build (Vite) Frontend Desktop Bundle ~3s ✅ PASS

Launching the Desktop Application

Development Mode

To start the desktop shell with live-reloading:

cd apps/desktop
npm run tauri dev

Tauri automatically starts the Vite development server, spawns the Julia daemon.jl child process with piped standard streams, and launches the desktop workbench window.

Production Build

To build the optimized standalone desktop binary:

cd apps/desktop
npm run build
npm run tauri build

The native Windows executable will be generated in apps/desktop/src-tauri/target/release/.


Scientific Capabilities & Verified Methods

Method Engine Physical System Key Output Quantities
Classical Energy & Forces Molly.jl Non-bonded clusters Potential energy (kJ/mol), interatomic force vectors
NVE Molecular Dynamics Molly.jl Lennard-Jones fluids / clusters Trajectories, temperature (K), energy drift ($dE/dt$)
Restricted Hartree-Fock (RHF) Fermi.jl Isolated molecules ($\text{H}_2\text{O}$) Total energy ($E_{\mathrm{h}}$), orbital energies, HOMO/LUMO gap
Second-Order Møller-Plesset (MP2) Fermi.jl Isolated molecules ($\text{H}_2\text{O}$) Correlation energy ($E_{\mathrm{corr}}$), total MP2 energy ($E_{\mathrm{h}}$)
Plane-Wave Periodic DFT (LDA/PBE) DFTK.jl Periodic crystals ($\text{Si}$) Total energy ($E_{\mathrm{h}}$), Hellmann-Feynman forces ($E_{\mathrm{h}}/\text{bohr}$)

For in-depth mathematical formulations and validation results, refer to:


License & Attribution

Atomica is distributed under the MIT License. Scientific engine integrations respect upstream open-source licenses:

  • Molly.jl (MIT License)
  • Fermi.jl (MIT License)
  • DFTK.jl (MIT License)
  • AtomsBase.jl / AtomsIO.jl (MIT License)
  • Three.js (MIT License)
  • Tauri (Apache 2.0 / MIT License)

About

Research-grade, local-first computational chemistry desktop workbench with a Julia-first scientific engine and a Tauri v2 (Rust + Three.js) presentation shell.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages