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

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.2
File Size Uploaded Provenance Actions
autogeom-0.0.2.tar.gz 30.5 kB Without provenance Details for autogeom-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 64.3 kB

Release files / autogeom-0.0.2.tar.gz

Download URL autogeom-0.0.2.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
34ae81352b5b23fa060081561128da537f95f3b9103461c3dddd1e395bfad211
BLAKE2b-256 checksum
How to use checksums
31970150b2e407af3b8645d8a9997ac2e03fdfdc34fb7edd187b1dd34b508b31
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":"24.04","id":"noble","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.2-py3-none-any.whl

Download URL autogeom-0.0.2-py3-none-any.whl
Size 33.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d6008c6548d1fe1ddaf96f8d552a0215d233d70c142404f615560374395a0fb
BLAKE2b-256 checksum
How to use checksums
4c93e69a90aa0404953182e1c6d97c6a2e937dc8fca7fa5b01d6712d6140455d
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":"24.04","id":"noble","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.2

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