ASEconvert

Stable Dev Build Status Coverage

Light-weight module to install ASE and provide routines for converting between the Atoms datastructure from ASE and atomistic data provided in the AtomsBase ecosystem. For both the package makes use of the PythonCall.

This can be used for example as follows

using ASEconvert

# Make a silicon supercell using ASE
atoms_ase = ase.build.bulk("Si") * pytuple((4, 1, 1))

# Convert to an AtomsBase-compatible structure
atoms_ab = pyconvert(AbstractSystem, atoms_ase)

# Convert back to ASE and create a vacancy
newatoms_ase = convert_ase(atoms_ab)
newatoms_ase.pop(4)

AtomsCalculators interface

You can use ASE calculators in julia, by wrapping them to a ASEcalculator structure. Here is a brief example

using AtomsCalculators
using ASEconvert
using PythonCall

potential = "path to eam potential file"
EAM = pyimport("ase.calculators.eam")
eam_cal = ASEcalculator(EAM.EAM(potential))

atoms_ase = ase.build.bulk("Ni") * pytuple((4, 3, 2))
atoms_ab = pyconvert(AbstractSystem, atoms_ase)

AtomsCalculators.potential_energy(atoms_ab, eam_cal)
AtomsCalculators.forces(atoms_ab, eam_cal)