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.3

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.3
File Size Uploaded Provenance Actions
autogeom-0.0.3.tar.gz 33.3 kB Without provenance Details for autogeom-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 70.3 kB

Release files / autogeom-0.0.3.tar.gz

Download URL autogeom-0.0.3.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1b3011479563da0249ecf33adda74c018ed243ded4aa013821611ddeffcd0312
BLAKE2b-256 checksum
How to use checksums
92c152a016828cf28c9fb1121a5df6d7fe07186826006482544741c93731ae69
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.3-py3-none-any.whl

Download URL autogeom-0.0.3-py3-none-any.whl
Size 37.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2fb2bee33cc8e2b26bb55f6fa80258256186bbc0ae6d7ea0f339e20cba5d89e
BLAKE2b-256 checksum
How to use checksums
9d4f12afc4ecba0485848b6e135257ca8abf73f08ca89835732769960d30a3b7
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.3

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