Table of Contents
A Julia package for reading XYZ trajectory files.
It currently supports XYZ files with a constant number of atoms.
This package is a Julia parser for XYZ files. It works with Julia 1.5 or above.
It requires the DCD package. You should install the DCD parser first!
Adding private packages to Julia requires a password-less access (see the manual in this organization for setup)
pkg> add git@github.com:laagegroup/XYZ_parser_jl.git
This package can be directly added via https by running the following command from the Julia interface:
pkg> add https://github.com/laagegroup/XYZ_parser_jl.git
This package can be used in the Julia REPL or within a Julia script. Here is an example of the main features:
using XYZ
xyz = load_xyz("foo.xyz")
na = natoms(xyz) # Get the number of atoms.
nf = nframes(xyz) # Get the number of frames.
atoms = atomnames(xyz) # Get the list of atom names.
for frame in xyz # Iterate over each frame.
r = positions(frame) # Get an array of all current positions with dimensions (3, na).
# Work on the current frame.
end
This package is a modification of the DCD parser in this organization: https://github.com/laagegroup/DCD_parser_jl.git (The original development is due to Michael von Domaros, see https://github.com/mvondomaros/DCD.jl.git and the MIT license original_MIT_license
).
Modifications are distributed under the GNU Affero General Public License v3.0. See LICENSE
for more information.