AtomsIO

Standard package for reading and writing atomic structures represented as an AtomsBase-compatible data structure. AtomsIO currently integrates with

and supports all file formats any of these packages support (see their respective documentation). This includes

For more details see Saving and loading files and File Formats.

Python-based parsers

Reading / writing some formats relies on parser libraries from third-party Python packages. To avoid introducing Python dependencies in all packages employing AtomsIO the additional package AtomsIOPython needs to be loaded to make these parsers available. See File Formats for more details.

Formats supported in earlier versions of AtomsIO

These file formats were supported in earlier versions of AtomsIO, but are now dropped as the implementing packages lack a maintainer and no longer function with the most recent version of AtomsBase.

  • XSF (XCrySDen) structure and trajectory files were supported using the XCrySDenStructureFormat package. In case of interest, see the draft PR, which can be completed to re-enable support.

Usage example

using AtomsIO        # Enables only Julia-based parsers
using AtomsIOPython  # Enable python-based parsers as well

# Load system from a cif file ... by default uses ASE.
# Returns an AtomsBase-compatible system.
system = load_system("Si.cif")

# The system can now be used with any package supporting AtomsBase,
# e.g. display unit cell, positions and chemical formula ...
@show bounding_box(system)
@show position(system)
@show chemical_formula(system)

# ... or do a DFT calculation using DFTK.
using DFTK
using PseudoPotentialData
pseudopotentials = PseudoFamily("dojo.nc.sr.lda.v0_4_1.oncvpsp3.standard.upf")
model  = model_DFT(system; pseudopotentials)
basis  = PlaneWaveBasis(model; Ecut=15, kgrid=(3, 3, 3))
scfres = self_consistent_field(basis);

# We could also load a whole trajectory (as a list of systems):
trajectory = load_trajectory("mdrun.traj")

# ... or only the 6-th structure:
last_system = load_system("mdrun.traj", 6)