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

# amchi

## Installation

```bash
pip install amchi
```

## API overview

### Classes

Core classes

- `UnsupportedElementError`: An element that amchi has no data for (amchi supports H to Xe, main group)
- `ParityMargins`: How far each candidate is from an ill-defined parity, with the candidates' keys
- `Candidates`: The stereocenter candidates, each with its stereo-determining neighbors
- `Connectivity`: The bonds of a species or a transition state
- `IllDefinedParityError`: A stereocenter whose parity the coordinates don't define

### Protocols

Structural typing protocols

- `GeometryLike`: Anything with atomic symbols and Cartesian coordinates (N x 3, Å)

### Exceptions

Exception classes

- `AmchiError`: Base class for the errors that amchi raises

### Functions

Public functions

- `from_geometry`: The AMChI string of a species, with its connectivity and candidates derived
- `from_ts_geometries`: The AMChI string of a TS, with its connectivity and candidates derived
- `string`: The AMChI string of a species or a transition state (TS)
- `add_bond_candidate`: Add a bond candidate, with all its neighbors by ascending index
- `candidates`: The stereocenter candidates of a species or a TS, with their neighbors
- `remove_candidate`: Remove an atom candidate (an index) or a bond candidate (a pair)
- `connectivity`: The bonds of a species, from its interatomic distances
- `ts_connectivity`: The bonds of a TS, from reactant-side and product-side geometries
- `parity_margins`: How nearly planar each candidate is, as a diagnostic

### Type Aliases

Type alias definitions

- `Bond`: Type alias

## Resources

- [Full documentation](https://avcopan.github.io/amchi/)
- [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/amchi)
