Saving and loading files

The following functions form the API for saving and loading files:

AtomsIO.load_systemFunction
load_system([parser], file::AbstractString; kwargs...)
load_system([parser], file::AbstractString, index; kwargs...)

Read an AtomsBase-compatible system from file. If file contains more than one structure the last entry is returned. If index is specified this indexes into the list of structures and returns the respective system.

By default AtomsIO picks an appropriate parser for the specified file format automatically. A specific parser (such as AtomsIO.ExtxyzParser or AtomsIO.ChemfilesParser) can be enforced by using it as the first argument. Some parsers support additional keyword arguments. E.g. AseParser supports the format argument to overwrite the ASE-internal selection of an input / output format.

source
AtomsIO.save_systemFunction
save_system([parser], file::AbstractString, system::AbstractSystem; kwargs...)

Save an AtomsBase-compatible system to the file. By default AtomsIO picks an appropriate parser for the specified file format automatically. A specific parser (such as AtomsIO.ExtxyzParser or AtomsIO.ChemfilesParser) can be enforced by using it as the first argument. Some parsers support additional keyword arguments. E.g. AseParser supports the format argument to overwrite the ASE-internal selection of an input / output format.

source
AtomsIO.load_trajectoryFunction
load_trajectory([parser], file::AbstractString; kwargs...)

Read a trajectory from a file and return a vector of AtomsBase-compatible structures. Providing a parser overwrites the automatic AtomsIO selection.

source
AtomsIO.save_trajectoryFunction
save_trajectory([parser], file::AbstractString, systems::AbstractVector; kwargs...)

Save a trajectory given as a list of AtomsBase-compatible systems to a file. Providing a parser overwrites the automatic AtomsIO selection.

source

See File Formats for the list of parsers.