Materializr
開源參數式 3D CAD 給創客 — 受限草圖、實體建模、螺紋、SVG 與文字雕刻、STL/STEP 匯出。Android、iPad、Linux、Mac、Windows。Vibe 編碼。
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Interactive honeycomb editor for designing benzenoid (fused-ring C/H) molecules and exporting .xyz files
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
An interactive honeycomb editor for designing benzenoid molecules — fused hexagonal
rings of carbon with hydrogens on the perimeter (benzene, naphthalene, pyrene, coronene,
graphene flakes, …) — and exporting them as standard .xyz files with ideal
lattice geometry.
Click hexagons on a honeycomb grid; the carbon skeleton and the hydrogens appear as you
go, the formula and validation update live, and the exported file is ready for
ParaView, Avogadro, VMD, or a quantum-chemistry / machine-learning pipeline.檢視完整 README ↗An interactive honeycomb editor for designing benzenoid molecules — fused hexagonal
rings of carbon with hydrogens on the perimeter (benzene, naphthalene, pyrene, coronene,
graphene flakes, …) — and exporting them as standard .xyz files with ideal
lattice geometry.
Click hexagons on a honeycomb grid; the carbon skeleton and the hydrogens appear as you go, the formula and validation update live, and the exported file is ready for ParaView, Avogadro, VMD, or a quantum-chemistry / machine-learning pipeline.
It is aimed at anyone who needs polycyclic aromatic hydrocarbon geometries quickly — for a calculation, a figure, a teaching example, or as input to a machine-learning pipeline — without hand-editing coordinates.
.xyz download or copy, ring coordinates as JSON, SVG / PNG image of the
structure, and a share link that reproduces the whole state (rings are stored as row
ranges, so even a 5 000-ring flake fits in ~1 500 characters; a selection that would
need more than 8 000 characters is kept out of the URL and shared as cells JSON instead).The app is a static site. To run it locally:
npm install
npm run dev # http://localhost:5173
npm run build writes a deployable copy to dist/. The repository ships a GitHub
Actions workflow that publishes dist/ to GitHub Pages on every push to main
(enable Settings → Pages → Source: GitHub Actions once).
Benzenoids are polyhexes: sets of hexagons on a triangular lattice. The builder works in integer lattice coordinates and converts to Ångström once at the end, so there are no floating-point tolerances and no geometry optimisation.
A ring is an axial cell (q, r) with centre (√3·d·(q + r/2), 1.5·d·r) and pointy-top
orientation. Its six carbons sit on integer honeycomb sites
X = 2q + r + a_k, Y = 3r + b_k, (a_k, b_k) = (0,2) (−1,1) (−1,−1) (0,−2) (1,−1) (1,1)
at Cartesian position (√3·d·X/2, d·Y/2). A carbon with only two carbon neighbours
carries one hydrogen along its third, missing, lattice direction — the exterior angle
bisector, without any trigonometry.
| Convention | Value |
|---|---|
| d(C–C) | 1.42 Å (adjustable) — fitted to DFT-optimised geometries of 18 benzenoids from benzene to C114H30; every atom lands within 0.17 Å of the ideal lattice (RMSD ≤ 0.075 Å per molecule), so no geometry optimisation is needed |
| d(C–H) | 1.09 Å (adjustable) |
| Frame | all-atom centroid at the origin, molecule in the z = 0 plane |
| Orientation | long axis along x (default): principal axes of the carbon skeleton, heavier end (third moment) towards +x; round molecules (benzene, coronene, triphenylene, HBC) keep the lattice orientation. As drawn: only centred |
| Atom order | carbons first, sorted by lattice site (X, then Y); then hydrogens in the order of their parent carbons |
.xyz file 12
6 -1.229756 0.710000 0.000000
6 -1.229756 -0.710000 0.000000
...
1 -2.173735 1.255000 0.000000
Line 1 is the atom count, line 2 the comment (blank by default), then one atom per line
as atomic number and x, y, z in Å in fixed-width columns (%6d%22.6f%12.6f%12.6f).
Readers split on whitespace, so the widths are cosmetic. Atomic numbers are the default
because many computational pipelines expect them; viewers that only accept element
symbols (C, H) are served by the Write element symbols switch under Parameters.
Internally a molecule is just a list of rings in axial coordinates. Copy cells JSON gives you that list,
{"cells": [[0,0],[1,0],[1,1]]}
which is handy for scripts and for describing a molecule in a few bytes; Import cells
accepts the same text (or a bare [[q,r],…] list, or q,r q,r …). Share links use the
same coordinates in a compact row-range form.
| Keys | Action |
|---|---|
Ctrl+Z / Ctrl+Shift+Z (or Ctrl+Y) | undo / redo |
Ctrl+S | download the .xyz file |
F / 0 | fit the view to the molecule / reset the view |
G H L R | toggle grid, hydrogens, atom numbers, ring numbers |
Space + drag | pan |
| Touch | tap = add/remove, drag = move, pinch = zoom; the on-canvas Paint switch makes drags paint rings instead |
Shift + drag | erase rings |
? | help |
src/core/ chemistry engine, no DOM: lattice geometry, orientation, validation,
presets and families, .xyz writer, share-link codec
src/ui/ React application: honeycomb canvas, sidebar panels, export preview
tests/ Vitest suites; tests/fixtures/*.xyz are reference files the core must reproduce
scripts/ gen-fixtures.py (regenerate fixtures), screenshots.mjs (README images), favicon.mjs
src/core is usable outside the app:
import { buildMolecule, hexFlake, toXyz, validateCells } from './src/core';
const cells = hexFlake(1); // coronene
console.log(validateCells(cells).ok); // true
console.log(toXyz(buildMolecule(cells))); // the .xyz text
npm run dev # Vite dev server with hot reload
npm test # Vitest (core + UI smoke tests)
npm run typecheck # tsc
npm run lint # ESLint
npm run format # Prettier
npm run build # production build in dist/
The .xyz files in tests/fixtures/ were produced by an independent Python
implementation of the same lattice construction; the TypeScript core must reproduce
them byte for byte, which pins the geometry and the file format. scripts/gen-fixtures.py
regenerates them given that implementation (MOLGEN_SRC=/path/to/its/src).
The core already carries an element registry (src/core/elements.ts: H, C, N, O, F, S,
Cl, B with atomic numbers, colours and typical bond lengths to carbon) and a per-site
terminal-atom map in BuildParams.terminal, so a perimeter hydrogen can be replaced by
another single atom without touching the writer or the renderer. The UI does not expose
this yet; wiring a picker to terminal is the intended path.
.xyz import with ring detection (recognise the hexagons in an existing file)If this tool is useful in your work, please cite it — see CITATION.cff.
MIT.