ai-startup-skills
创业公司做 AI 产品的 7 步 Agent Skill 合集:验证 → BP → 政策 → 路演 → 获客 → 定价 → 注册。
Translation pending
A minimal crystal structure viewer for the web.
OtherGitHub @jcwang587OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Repository information has not been collected yet.
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗A minimal crystal structure viewer for the web. Try the demo.
npm install bravais three
Add a container with a height:
<div id="viewer" style="height: 480px"></div>
Then read a CIF and visualize it:
import { buildScene, createViewer, expandStructure, readCif } from "bravais";
const response = await fetch("https://unpkg.com/bravais/examples/CoO.cif");
const scene = buildScene(expandStructure(await readCif(await response.text())));
createViewer(document.getElementById("viewer")).setLayers([{ scene }]);
A structure read elsewhere, such as by a CIF reader in another language, can be given as plain data instead, with its symmetry operations, its space group, or neither when the sites list every atom of the cell:
import { readStructure } from "bravais";
const structure = await readStructure({
lattice: { a: 4.26, b: 4.26, c: 4.26, alpha: 90, beta: 90, gamma: 90 },
sites: [
{ label: "Co", fractional: [0, 0, 0], species: [{ element: "Co" }] },
{ label: "O", fractional: [0.5, 0.5, 0.5], species: [{ element: "O" }] },
],
spaceGroup: { symbol: "F m -3 m" },
});
readStructure checks the data and throws StructureDataError for anything
missing or malformed; the result works everywhere a structure from readCif
does.
Thanks to Feitong Song's Pretty Lattice, whose look, controls and softened element colours this viewer follows.
The code was written by Claude Code, under the author's direction and review.