Skip to main content

atorvi - ATomic ORbitals VIsualization

License: MIT

atorvi is a Python package for visualizing individual atomic orbitals and their various linear combinations. The library generates requested atomic orbitals on a 3D mesh and exports them, along with the inputted crystal structure (molecule or periodic crystal), into a file in XCrysDen .xsf format.

The resulting .xsf file can be opened and visualized using your favorite visualization software, such as XCrysDen, VESTA or VMD.

Installation

To install atorvi, you can use pip:

pip install atorvi

Features

  • Atomic Orbitals Generation: Create atomic orbitals at a specific position in space or at a designated atom/element within a crystal structure.

  • Flexible Structure Input: Input crystal structures either manually, atom-by-atom, or directly from standard file formats such as POSCAR, XSF, CIF, and more. The integration with the pymatgen package simplifies structure handling.

  • Orbital Hybridization: Implement orbital hybridization by mixing different orbitals with custom coefficients, allowing for the exploration of complex bonding interactions.

  • Orbital Squared Moduli: Generate squared moduli of orbitals, providing insight into their spatial distribution and probability densities.

  • DFT+U State Visualization: Visualize local electron or hole states from Quantum ESPRESSO +U occupation-matrix eigenvectors for selected atoms.

Examples of orbitals generated with atorvi: could be found in examples folder.

Quick start

The full user manual is available in docs/atorvi_manual.md.

atorvi can be used in two modes: package mode (for scripting and notebooks) and CLI interactive mode (only basic functionality is available).

1.Package Mode

In your Python script or Jupyter notebook, you can generate and visualize atomic orbitals with the following example:

import atorvi

# Example: visualize a d_{3z^2-r^2} orbital for an Ni atom (Z = 28)
outfile = atorvi.OrbitalFile("Ni_orbital.xsf")

outfile.add_orbital("d_{3z^2-r^2}", position=[0, 0, 0], znumber=28)

outfile.write_data()

Then just open the Ni_orbital.xsf file in your favorite visualization software.

The orbitals available for generation are:

s, \\
p_z, p_x, p_y \\
d_{3z^2-r^2}, d_{xz}, d_{yz}, d_{x^2-y^2}, d_{xy} \\
f_{z^3}, f_{xz^2}, f_{yz^2}, f_{z(x^2-y^2)}, f_{xyz}, f_{x(x^2-3y^2)}, f_{y(3x^2-y^2)} 
print(atorvi.supported_orbitals)

['s', 
'p_z', 'p_x', 'p_y', 
'd_{3z^2-r^2}', 'd_{xz}', 'd_{yz}', 'd_{x^2-y^2}', 'd_{xy}', 
'f_{z^3}', 'f_{xz^2}', 'f_{yz^2}', 'f_{z(x^2-y^2)}', 'f_{xyz}', 'f_{x(x^2-3y^2)}', 'f_{y(3x^2-y^2)}']

2. CLI Interactive Mode

atorvi also offers an interactive mode via the command line interface (CLI). You can simply run the script directly in a terminal:

atorvi_cli

Follow the prompts to generate orbitals and export them to XCrysDen-compatible formats.

Once the file is generated, you can open it using visualization tools like XCrysDen or VESTA.

Author

atorvi is developed and maintained by Dmitry Korotin. Contributions, suggestions, and feedback are welcome to help improve the project.

License

atorvi is released under the MIT License. You are free to use, modify, and distribute the software, provided that the original copyright and permission notice are included in all copies or substantial portions of the software.

The author kindly asks that you cite this GitHub repository github.com/dkorotin/atorvi and the related paper (link will be available soon) in any publications that use images or data generated with the atorvi package.

For more details, refer to the full MIT License.

Metadata

Release files for atorvi 0.2.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 atorvi 0.2.1
File Size Uploaded
atorvi-0.2.1.tar.gz 18.3 kB Details

Built distribution (wheel)

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

Total release size: 35.9 kB

Release files / atorvi-0.2.1.tar.gz

Download URL atorvi-0.2.1.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
016f472d6e7bd317ec6e35c4901b89b476dfcb6f45cba469d25c802d29cbcb8d
BLAKE2b-256 checksum
How to use checksums
94e00e8d8a4b6bebbe49362c4e872f4a09b57d5e5838be15fe963df9dcfbb164
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.

Transparency log

Release files / atorvi-0.2.1-py3-none-any.whl

Download URL atorvi-0.2.1-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b562c2572095641f5ce921c2ab8929b80b38ebdd0d86ac78ae03ab2dc52b3701
BLAKE2b-256 checksum
How to use checksums
80cbf3d03a6aeb8665daf7c08360b3a145cf3185a8a547cbfbb148ddcd7fd3a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

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