Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

atomcad

БесплатноБез исполняемых скриптовНе проверен

Interact with atomCAD node networks programmatically. Query, edit, and replace CAD geometry nodes for atomic/molecular structure design. Use when working with…

atomCADот atomCAD★ 54 звезды на GitHub

Об этом скилле

atomCAD Skill

Programmatically interact with atomCAD node networks via CLI. Requires atomCAD to be running.

Prerequisites

  • atomCAD running (the CLI connects to a running instance)

CLI access (automatic detection):

  • In atomCAD repo root: ./atomcad-cli works directly (no PATH setup needed)
  • Elsewhere: requires atomcad-cli on PATH

Command Resolution

Before running CLI commands, detect the appropriate command:

  1. Development mode: If ./atomcad-cli exists in current directory → use ./atomcad-cli
  2. Installed mode: If atomcad-cli is in PATH → use atomcad-cli
  3. Not found: If neither works, inform the user they need to set up the CLI

Setup instructions (if CLI not found):

  • Run the setup script from the atomCAD installation directory:
    • Windows: .\setup\setup-skill.bat
    • Linux/macOS: bash setup/setup-skill.sh
  • Or add the CLI manually to PATH (the CLI is in the cli/ folder of the atomCAD installation)

Core Concepts

Node Networks

atomCAD designs are parametric node networks (DAGs):

  • Nodes have typed input pins (parameters) and one or more output pins (pin 0 is the primary result; e.g. atom_edit also has a diff pin, referenced as edited.diff), plus a title-bar function pin (@name) that exposes the node as a function value
  • Wires connect output→input of compatible types
  • Evaluation is lazy: only visible nodes trigger computation
  • Custom nodes are subnetworks with matching names

Each network can have an output node (set via output <node_name>) that defines what value the network returns when used as a custom node.

Lattice Coordinates

Important: Lattice geometry nodes (cuboid, sphere, half_space, circle, rect, …) take coordinates (positions, sizes, radii) in discrete lattice units (integers), not angstroms. The actual physical dimensions depend on the unit cell. This ensures all atomic structures are naturally lattice-aligned. The free_* nodes (free_sphere, free_circle, free_move, free_rot) are the exception: they work in real space (Å, floats).

Structure, Lattice and Motif

  • Default structure: cubic diamond — a cubic unit cell with a 3.567 Å lattice constant and the cubic zincblende motif with carbon atoms (pure diamond) — when nothing is wired
  • 3D geometry nodes have an optional, wire-only structure input (type Structure) to specify a different lattice/motif; build one with the structure node from lattice_vecs, motif and motif_offset (all optional; unwired ones default to diamond). 2D nodes take a d_plane (DrawingPlane) input instead
  • Non-cubic unit cells cause shapes like cuboid to become parallelepipeds (and sphere an ellipsoid)

Data Types

Type Description
Bool, String, Int, Float Primitives
Vec2, Vec3, IVec2, IVec3 2D/3D vectors (float/int)
IMat2, IMat3, Mat3 Matrices (int/float)
Geometry2D 2D shapes (for extrusion)
Blueprint 3D geometry (SDF-based) + the Structure it will be carved from; output of cuboid, sphere, union, …
Crystal Atoms (+ bonds) still bound to a structure; output of materialize
Molecule Free-floating atoms, no structure; output of exit_structure, import_xyz
HasAtoms, HasStructure, HasFreeLinOps Abstract input-pin types: Crystal or Molecule / Blueprint or Crystal / Blueprint or Molecule
Structure Lattice vectors + motif + motif offset
LatticeVecs Unit cell basis vectors
Motif Crystal motif definition
[T] Array of type T
Iter[T] Lazy stream (range, map, filter); turn it into [T] with collect
Record(Name), {a: Int, b: Float} Named / anonymous record
A -> B Function type
Unit Result of effect nodes (foreach, export_atoms)

Implicit conversions: Int↔Float, IVec2↔Vec2, IVec3↔Vec3, IMat3↔Mat3, T→[T], [T] or T→Iter[T], and a concrete phase type to its abstract supertypes (e.g. Crystal→HasAtoms). Iter[T]→[T] is not implicit (use collect).

Array pins (marked with dot) accept multiple wires; values are concatenated.

Text Format Syntax

# Set network description (single-line)
description "A parametric gear assembly"

# Or multi-line with triple quotes
description """
This network creates a parametric gear.

Parameters:
- teeth: number of teeth
- radius: outer radius
"""

# Create nodes: id = type { parameter: value, ... }
sphere1 = sphere { center: (0, 0, 0), radius: 5, visible: true }
cuboid1 = cuboid { min_corner: (-5, -5, -5), extent: (10, 10, 10) }

# Wire nodes by referencing node IDs as input values
union1 = union { shapes: [sphere1, cuboid1], visible: true }

# Set network output node
output union1

# Delete a node
delete sphere1

# Anchor a comment to what it documents: a node, or one wire
note1 = Comment { text: "the chassis", on: cuboid1 }
note2 = Comment { t
Полный SKILL.md на GitHub

Установить atomcad в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(atomcad-cli:*)
Bash(./atomcad-cli:*)

Вложенные файлы

references/data-types.mdreferences/text-format.md

FAQ

Что делает скилл atomcad?

Interact with atomCAD node networks programmatically. Query, edit, and replace CAD geometry nodes for atomic/molecular structure design. Use when working with atomCAD projects or when the user wants to manipulate node networks, create CSG shapes, or design atomic structures.

Как установить скилл atomcad?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл atomcad запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить atomcad с