freshcrate
Home > AI Agents > CrystalCanvas

CrystalCanvas

High-performance crystal structure modeling and DFT/MD file preparation. Native desktop app fusing a Rust/C++ physics kernel, a GPU-accelerated Metal/Vulkan renderer, and an AI-driven command bus for

Description

High-performance crystal structure modeling and DFT/MD file preparation. Native desktop app fusing a Rust/C++ physics kernel, a GPU-accelerated Metal/Vulkan renderer, and an AI-driven command bus for semantic atomic manipulation.

README

CrystalCanvas Logo

πŸ”¬ CrystalCanvas

High-performance crystal structure modeling, volumetric visualization, and DFT/MD file preparation β€” in a native desktop app.

CrystalCanvas is an open-source desktop GUI application designed for computational materials science, condensed matter physics, and quantum chemistry. It breaks free from the limitations of traditional tools (VESTA, Materials Studio) by combining a native-first architecture with modern AI-powered workflows.


✨ Key Features

  • πŸ–±οΈ Pixel-precise manual modeling β€” Hardware-accelerated 3D view with real-time atom selection, addition, deletion, and element substitution.
  • πŸ“Š Volumetric data visualization β€” Real-time isosurface extraction (GPU Marching Cubes) and volume raycasting for CHGCAR, Gaussian Cube, and XSF files. 10 scientific colormaps, dual-color signed isosurfaces, density cutoff control.
  • βš™οΈ Industrial-grade physics kernel β€” C++ engine with Spglib (space group analysis), Eigen (matrix transforms), and Gemmi (CIF/PDB parsing).
  • 🧠 AI-powered workflow (experimental) β€” Natural language commands like "Generate a 3Γ—3Γ—3 silicon supercell and dope 5% phosphorus on the surface". Context-aware LLM acts as a semantic parameterizer and command orchestrator with strict physics validation (MIC overlap checks).
  • πŸ”Œ Seamless DFT/MD integration β€” Native high-fidelity export for VASP (POSCAR), LAMMPS (Data), Quantum ESPRESSO (Input with automatic K-point density and IUPAC 2021 masses).
  • πŸ›‘οΈ Memory-safe architecture β€” Rust logic layer eliminates crashes from dangling pointers and buffer overflows.

πŸ› οΈ Known Issues

⚠️ Platform Support: Due to rendering engine (wgpu) backend differences, Windows and Linux builds may have rendering issues. Currently only macOS is fully tested and supported.

🍎 Note for macOS Users (Unverified Developer)

Since releases are not signed with an Apple Developer Certificate, macOS will prevent it from running with a "Developer cannot be verified" warning.

To run the app:

  1. Move CrystalCanvas.app to your /Applications folder.
  2. Right-click (or Control-click) the app icon and select Open.
  3. Click Open again in the dialog box.

Alternatively, run the following command in Terminal:

sudo xattr -cr /Applications/CrystalCanvas.app

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  React + TypeScript + TailwindCSS  (UI)             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Rust / Tauri 2.0  (Application Logic / SSoT)       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Rust / wgpu  (Impostor Sphere + Volume Raycast)    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  WGSL Compute  (GPU Marching Cubes / Raycasting)    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  C++ Physics Kernel  (Spglib / Gemmi / Eigen)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Layer Technology Role
Presentation React + TailwindCSS UI panels, toolbars, chat
Application Rust / Tauri 2.0 State management, IPC, I/O pipeline
Rendering Rust / wgpu GPU-accelerated 3D (Metal / Vulkan / DX12)
Volumetric WGSL Compute + Raycast Isosurface extraction, volume rendering
Compute C++ (Spglib, Gemmi, Eigen) Symmetry, Overlap Detection, MIC
FFI Bridge cxx (Rust ↔ C++) Type-safe, zero-copy data transfer

πŸš€ Getting Started

New to CrystalCanvas? Check out the User Manual (v0.1) for a comprehensive guide on modeling, AI workflows, and DFT exports.

CrystalCanvas utilizes a Zero-Global-Pollution strategy. All toolchains (Rust, Node) and dependencies are isolated within the project directory.

1. Prerequisites (macOS)

  • Xcode Command Line Tools: xcode-select --install
  • pnpm: npm install -g pnpm (the only global dependency required)

2. Initial Setup

Clone the repository and initialize the local toolchains:

git clone https://github.com/XiaoJiang-Phy/CrystalCanvas.git
cd CrystalCanvas

# Initialize local Rustup and Cargo home
mkdir -p .rustup .cargo
source dev_env.sh

# Install Rust stable locally (if not present)
rustup toolchain install stable

# Install Node dependencies
pnpm install

3. Build & Run

CrystalCanvas handles C++/Rust/TS full-stack compilation in a unified flow.

Activation

Always source the environment script before starting development to ensure RUSTUP_HOME and CARGO_HOME point to the project-local folders:

source dev_env.sh

Run in Development Mode

# This starts the Vite dev server and the Tauri native window
pnpm run tauri dev

Run Standalone Rendering Demo

To verify GPU/wgpu compatibility without the full React UI:

cd src-tauri
RUST_LOG=info cargo run --bin render_demo

Controls: Left-click drag to rotate, scroll to zoom.

Note: The C++ kernel (Spglib, Gemmi, Eigen) is compiled automatically via the Rust build.rs script using cxx-build. No manual CMake interaction is required.


πŸ—ΊοΈ Roadmap & Progress

  • M1-M2: Infrastructure & Data Model β€” Rust/C++ bridge, CIF parsing.
  • M3: High-Performance Rendering (wgpu) β€” Impostor spheres, ray-picking, orbital camera.
  • M4-M6: UI Integration & Geometry Ops β€” Hybrid window, slab cleaving, supercells, atomic operations.
  • M7-M8: DFT/MD Ecology & I/O Pipeline β€” Overlap detection (MIC), native exporters (VASP, QE, LAMMPS).
  • M8.5: Persistent Settings & UI Polish β€” Local JSON caching, global rendering customization.
  • M9: LLM Command Bus β€” Context-aware semantic AI agent for macro-scale geometry manipulation.
  • M10: Structural Analysis & Phonons β€” Polyhedra identification, defect tracking, and imaginary frequency animation.
  • M11: Volumetric Rendering β€” GPU Marching Cubes isosurfaces, volume raycasting, 10 colormaps, CHGCAR/Cube/XSF parsers.
  • M12+: AI4Science Phase Space β€” High-throughput MLFF dataset perturbations, NEB playback, and Symmetry Subgroup extraction.

πŸ“ Project Structure

CrystalCanvas/
β”œβ”€β”€ .github/            # GitHub Actions (CI/CD release workflows)
β”œβ”€β”€ src-tauri/          # Rust backend (Tauri commands, state handling, wgpu orchestration)
β”‚   β”œβ”€β”€ shaders/        # WGSL shaders (volume_raycast, marching_cubes, isosurface_render)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ io/         # File parsers (CIF, POSCAR, CHGCAR, Cube, XSF, QE)
β”‚   β”‚   β”œβ”€β”€ renderer/   # wgpu pipelines (atoms, bonds, isosurface, volume raycast)
β”‚   β”‚   └── ...         # State manager, command router, volumetric module
β”‚   β”œβ”€β”€ build.rs        # Unified Rust + C++ build script (cmake/cxx bridge)
β”‚   └── Cargo.toml
β”œβ”€β”€ src/                # React frontend (TypeScript + TailwindCSS components)
β”‚   β”œβ”€β”€ components/     # UI Panel components (RightSidebar: volumetric controls)
β”‚   β”œβ”€β”€ hooks/          # Custom React hooks (tauri events, file-drop, 3D interaction)
β”‚   └── types/          # Strict TS IPC mappings (e.g., CrystalState, CrystalCommand)
β”œβ”€β”€ cpp/                # C++ physics kernel
β”‚   β”œβ”€β”€ include/        # Public C-compatible headers (cxx bridge)
β”‚   β”œβ”€β”€ src/            # Implementation code (Spglib, Gemmi, Eigen integrations)
β”‚   └── CMakeLists.txt
β”œβ”€β”€ docs/               # System documentation ([User Manual](docs/UserManual_v0.1.md), Development Notes)
β”œβ”€β”€ tests/              # Integration tests & benchmark data (LFS-tracked volumetric files)
β”œβ”€β”€ dev_env.sh          # Local toolchain environment activation script
β”œβ”€β”€ CHANGELOG.md        # Release history and known issues
└── README.md

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Development Notes

  • Primary dev platform: macOS (Intel & Apple Silicon)
  • Environment toolchains should be installed locally within the project directory when possible (see .gitignore for excluded paths).
  • Documentation in docs/ and CHANGELOG.md is tracked for release transparency.

πŸ“„ License

This project is dual-licensed under the MIT License and the Apache License 2.0. You may choose either license for your use.

For third-party software licenses used in this project, please see THIRD_PARTY_LICENSES.md.


πŸ™ Acknowledgments

  • Spglib β€” Crystal symmetry analysis
  • Gemmi β€” CIF/PDB file parsing
  • Eigen β€” Linear algebra
  • Tauri β€” Desktop app framework
  • wgpu β€” Cross-platform GPU API

Release History

VersionChangesUrgencyDate
main@2026-04-14Latest activity on main branchHigh4/14/2026
v0.3.0Latest release: v0.3.0High4/9/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

scorpio-analystYour personal Multi-Agent portfolio manager and financial analyst teamv0.2.4
scraping-browserπŸ” Automate dynamic web scraping with Scraping Browser, a full-host solution using Puppeteer, Selenium, and Playwright for seamless data collection.main@2026-04-21
ComfyUI_LinkFX✨ Enhance ComfyUI links with dynamic visual effects and gravity physics for vibrant animations like Neon, Matrix, and Fire.main@2026-04-21
ComfyUI-LoaderUtilsπŸ”„ Optimize model loading in ComfyUI with flexible node connections and controlled sequences for better performance and memory management.main@2026-04-21
Paper2SlidesπŸ“Š Transform research papers into professional slides and posters seamlessly and quickly with Paper2Slides, saving you valuable time.main@2026-04-21