Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

atomcad

FreeNo executable scriptsNot checked

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

atomCADby atomCAD★ 54 GitHub stars

About this skill

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
Full SKILL.md on GitHub

Install atomcad in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

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

Bundled files

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

FAQ

What does the atomcad skill do?

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.

How do I install the atomcad skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the atomcad skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare atomcad with