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

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.1
File Size Uploaded Provenance Actions
autogeom-0.0.1.tar.gz 30.4 kB Without provenance Details for autogeom-0.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 64.1 kB

Release files / autogeom-0.0.1.tar.gz

Download URL autogeom-0.0.1.tar.gz
Size 30.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c7db9e02c226fca48a6ede29fa3f56322fef64afdac789f1d478bb91da12e395
BLAKE2b-256 checksum
How to use checksums
3ae92c78a34d18f657f73ee6b55f3b9f79961ee434da0e68a641bd2f5cbac019
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.1-py3-none-any.whl

Download URL autogeom-0.0.1-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2dd63e65b99c3719645af9eb4aa9f5e6962f23848a27658905d8821ae0fe28e8
BLAKE2b-256 checksum
How to use checksums
c9b25281e5f422b9d045f3c80e4083c9d07a0941638ee9db8d8657b141d05023
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.1

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