Table of Contents
A Julia package for reading DCD trajectory files.
This package currently supports only DCD files written by Lammps.
This package is a Julia parser for DCD files written by Lammps. It needs Julia 1.5 or above.
Adding private packages to Julia requires a password-less access (see the manual in this organization for setup)
pkg> add git@github.com:laagegroup/DCD_parser_jl.git
You can directly install this parser via https by running (from Julia):
pkg> add https://github.com/laagegroup/DCD_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 DCD
dcd = load_dcd("traj.dcd")
na = natoms(dcd) # Get the number of atoms.
nf = nframes(dcd) # Get the number of frames.
δt = timestep(dcd) # Get the time step.
hascell(dcd) # Check if the DCD file has unit cell information.
for frame in dcd # Iterate over each frame.
r = positions(frame) # Get an array of all current positions with dimensions (3, na).
c = cell(dcd) # Get the unit cell vector [$a, b, c, α, β, γ].
t = elapsedtime(frame) # Get the simulation time (in fs) of the current frame.
# Work on the current frame.
end
This package is a modification of the original package: https://github.com/mvondomaros/DCD.jl.git for NAMD. The original work is submitted to the MIT license original_MIT_license
in the current repository. This work can be retrieved from the commit tree or on the public Github repository of the original author.
Modifications are distributed under the GNU Affero General Public License v3.0. See LICENSE
for more information.