tetramol
Idealized molecular structures for illustrations, rendered as SVGs with xyzrender.
Atoms are placed on a tetrahedral "diamond" grid, with ideal bond lengths (1.1 Å to hydrogen, 1.5 Å otherwise) and angles (arccos(-1/3) ≈ 109.47°), so neighboring centers are always staggered. This is meant for clean, schematic pictures, not for real geometries.
Installation
pixi run init # first time only
pixi run local start # use the local ../automol checkout (see below)
tetramol depends on automol (from the avcopan
conda channel) for geometry handling, and on xyzrender (from PyPI) for rendering.
To develop against a local automol checkout next to this repository, toggle it with
pixi run local start and pixi run local stop.
Usage
from automol import geom
from tetramol import Builder, orient, render
b = Builder(up=(0, 1, 0), left=(-1, 0, 0)) # y is up the page, z toward you
c = b.add("C") # the first atom goes at the origin
n = b.add("N", c, toward=(0, 1, 0)) # bond through the slot closest to a direction
b.add("C", c, toward=(-1, 0, 0)) # ... or through a slot by index: b.add("C", c, 2)
b.add_hydrogens(avoid=(0, 0, -1)) # fill valences; N's lone pair points back
geo = b.geometry() # an automol Geometry
rot = orient(geo) # optional: rotate by hand in the browser,
geo = geom.rotate(geo, rot) # ... and apply the rotation
render(geo, "drawing.svg")
Each atom has four slots, one per tetrahedral direction, and bonded atoms bond back
through the same slot, which fills in the diamond lattice. Use automol.geom for
anything off the grid (e.g. geom.rotate(geo, rot, origin=..., keys=[...])).
To draw an umbrella inversion, b.umbrella_image(n) adds the mirror image of the
branch on atom n (through the plane of its parent bond, perpendicular to its lone
pair), keeping both, so that one side can be faded afterwards.
Drawings live in drawings/, one folder per molecule.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Credits
This package was created with copier and the avcopan/copier-pixi-python project template.
Metadata
Release files for tetramol 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tetramol-0.0.1.tar.gz | 10.5 kB | Without provenance | Details for tetramol-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tetramol-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for tetramol-0.0.1-py3-none-any.whl |
Total release size: 21.8 kB
Release files / tetramol-0.0.1.tar.gz
| Download URL | tetramol-0.0.1.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5270cf969b4c591117318ee85b0a2bb0443ca0e638659f25d744523e8a8feed2
|
|
BLAKE2b-256 checksum How to use checksums |
a820686a81e452674673f6af0f21e3848dd44ff0b942cb7c2729937c39d12144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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 / tetramol-0.0.1-py3-none-any.whl
| Download URL | tetramol-0.0.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
258d7be3ab5a64b005de5d08d2d882721fe022b24fbd0e89a3d9e37216ce74d5
|
|
BLAKE2b-256 checksum How to use checksums |
1e16e10daa36d558b7cc4144fc5d245beed45e3480c697be8a152e18224f4518
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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 tetramol 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.