Python interface for AtomForge: load, edit, and view atomic structures
Project description
Load, programmatically edit, and launch the AtomForge GUI to view atomic structures directly from Python.
Quick-start
import atomforge as af
# Load any format (XYZ/extXYZ natively; CIF/VASP/PDB via ase extra)
s = af.load("crystal.cif")
# Build from scratch
s2 = af.Structure()
s2.set_cell(2.87, 2.87, 2.87) # BCC iron unit cell
s2.add_atom("Fe", 0.0, 0.0, 0.0)
s2.add_atom("Fe", 1.435, 1.435, 1.435)
# Supercell + open in the AtomForge GUI (non-blocking)
s2.repeat(4, 4, 4).view()
# Edit and save
s2.translate(1, 0, 0).save("shifted.xyz")
Formats
XYZ and extended-XYZ are handled natively with no dependencies. CIF, VASP/POSCAR, PDB, LAMMPS, mol2, and all other ASE-supported formats are available via the ase extra:
pip install "atomforge[ase]"
Viewing
structure.view() serialises the structure to a temporary XYZ file and launches the AtomForge executable as a detached subprocess. Set the ATOMFORGE_PATH environment variable to the full path of AtomForge.exe if it is not on PATH.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atomforge_py-0.1.0.tar.gz.
File metadata
- Download URL: atomforge_py-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9390ca976ca35cab0afa2198534107e53f8567ad8576a8919596b706b47ebea9
|
|
| MD5 |
7de9089e628dc0048f25bc04a68adaf6
|
|
| BLAKE2b-256 |
c8e25c63424d52b821ab9e4c970bac87d151af05878d15670b4d254963e37c77
|
File details
Details for the file atomforge_py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: atomforge_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1ad32350cc7c1fa76cf80de97979ed8ae99b471cf5b1a210e48793d0f458f25
|
|
| MD5 |
45cfa9da23e70847d4f7b2d2850a92cc
|
|
| BLAKE2b-256 |
9dc14ce9beb854cc29eb3185582079719baf047e2d569d3ecefeb3dec194e8e6
|