tetramol
  • Reference

Skills

A skill is a package of structured files that teaches an AI coding agent how to work with a specific tool or framework. The skill below was generated by Great Docs from this project’s documentation. Install it in your agent and it will be able to run commands, edit configuration, write content, and troubleshoot problems without step-by-step guidance from you.

Any agent — install with npx:

npx skills add https://avcopan.github.io/tetramol/

Codex / OpenCode

Tell the agent:
Fetch the skill file at https://avcopan.github.io/tetramol/skill.md and follow the instructions.

Manual — download the skill file:

curl -O https://avcopan.github.io/tetramol/skill.md

Or browse the SKILL.md file.

SKILL.md

---
name: tetramol
description: >
  Use when writing Python code that uses the tetramol package.
license: MIT
compatibility: Requires Python >= 3.13.
---

# tetramol

## Installation

```bash
pip install tetramol
```

## API overview

### Classes

Core classes

- `Builder`: Build a molecule atom by atom on a tetrahedral grid

### Builder Methods

Methods for the Builder class

- `Builder.slot_direction`
- `Builder.open_slots`
- `Builder.add`
- `Builder.add_hydrogens`
- `Builder.geometry`
- `Builder.umbrella_image`

### Functions

Public functions

- `orient`: Rotate a geometry by hand in the browser and get the rotation
- `render`: Render a geometry as an SVG, looking down the z axis (x right, y up)
- `tetrahedral_basis`: Get the four bond directions of a tetrahedral grid
- `draw.orient_page`
- `draw.serve_orient_page`

### Constants

Module-level constants and data

- `VALENCES`: dict() -> new empty dictionary
- `STYLE`: Rendering settings
- `TETRAHEDRAL_ANGLE`: Convert a string or number to a floating-point number, if possible
- `XH_LENGTH`: Convert a string or number to a floating-point number, if possible
- `XY_LENGTH`: Convert a string or number to a floating-point number, if possible

### Other

Additional exports

- `grid`: The tetrahedral grid: ideal bond directions, angles, and lengths

## Resources

- [Full documentation](https://avcopan.github.io/tetramol/)
- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
- [Source code](https://github.com/avcopan/tetramol)

Developed by Andreas V. Copan.
Site created with Great Docs.