Skip to main content

autogeom

License: MIT Pixi Badge Code style: ruff Typing: ty Copier

autogeom is a Python library for 3D molecular structures. It centers on a single Geometry model (atomic symbols, Cartesian coordinates, charge, and spin) and the functions that operate on it: xyz I/O, measurements, transformations, alignment, 3D visualization, and conversions to and from InChI, SMILES, and RDKit.

See the documentation for the user guide and API reference.

autogeom continues the Geometry part of automol 0.0.31 under a new name. See the changelog for what changed.

Installation

autogeom requires Python 3.13 or later. With Pixi, add it from the avcopan/automech channel on prefix.dev:

pixi workspace channel add https://repo.prefix.dev/avcopan/automech
pixi add autogeom
pixi add --pypi xyzrender  # optional: only on PyPI, needed for render_svg/render_gif

Or install it from PyPI, which includes xyzrender:

pip install autogeom  # or: uv add autogeom

For local development, see Contributing.

Usage

Everything is imported from the package root.

Geometry

import autogeom
from autogeom import Geometry

water = Geometry(
    symbols=["O", "H", "H"],
    coordinates=[[0.0, 0.0, 0.0], [0.0, 0.0, 0.96], [0.93, 0.0, -0.24]],
    charge=0,
    spin=0,
)

com = autogeom.center_of_mass(water)
angle = autogeom.angle(water, [1, 0, 2], degrees=True)

InChI, SMILES, and RDKit

autogeom.inchi(water)  # "InChI=1S/H2O/h1H2"
autogeom.smiles(water)  # "O"
autogeom.formula(water)  # "H2O"

ethanol = autogeom.from_smiles("CCO")  # embeds 3D coordinates
mol = autogeom.rdkit_mol(ethanol)  # rdkit.Chem.Mol

Visualization

from autogeom import View

# Visualization (e.g. in a Jupyter notebook)
view = View()
view.add_geometry(water, label=True)

In a notebook, a Geometry also displays itself as a 3D view.

See the documentation for more on geometries, conversions, and visualization.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See Contributing for the design rules and workflow.

License

This project is licensed under the MIT License.

Credits

This package was created with copier and the avcopan/copier-pixi-python project template.

Metadata

Release files for autogeom 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autogeom 0.0.4
File Size Uploaded Provenance Actions
autogeom-0.0.4.tar.gz 34.2 kB Without provenance Details for autogeom-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autogeom 0.0.4
File Interpreter ABI Platform Actions
autogeom-0.0.4-py3-none-any.whl Python 3 none any Details for autogeom-0.0.4-py3-none-any.whl

Total release size: 72.2 kB

Release files / autogeom-0.0.4.tar.gz

Download URL autogeom-0.0.4.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
40fd12bc41f317ad1f2b96b06fb4a09838d35454fe36e8e9f4467b9e7df273f0
BLAKE2b-256 checksum
How to use checksums
f7a46ef18842cbd029e0e0ea777b5549dd54852a157626a1896f3b7a1f5dba6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / autogeom-0.0.4-py3-none-any.whl

Download URL autogeom-0.0.4-py3-none-any.whl
Size 38.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdd02c270f66d350f49cb6a6d2af935a0be8072fea589e0de17d0fd082188439
BLAKE2b-256 checksum
How to use checksums
522fb6efc27fd7f2b8ce4d6bfdb1e71e4fdb81aa8738b7fe02f1d2c6d2c8b9de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for autogeom 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page