Skip to content

laagegroup/DCD_parser_jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GNU AGPL v3.0 License VERSION

Table of Contents
  1. DCD.jl
  2. Getting Started
  3. Usage
  4. License and acknowledgments

DCD.jl

A Julia package for reading DCD trajectory files.

This package currently supports only DCD files written by Lammps.

(back to top)

Getting Started

Prerequisites

This package is a Julia parser for DCD files written by Lammps. It needs Julia 1.5 or above.

Installation (with set-up ssh keys)

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

Installation (with https RECOMMENDED)

You can directly install this parser via https by running (from Julia):

pkg> add https://github.com/laagegroup/DCD_parser_jl.git

(back to top)

Usage

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

(back to top)

License and acknowledgments

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.

(back to top)

About

A Julia package to read a DCD trajectory from Lammps

Topics

Resources

License

AGPL-3.0, MIT licenses found

Licenses found

AGPL-3.0
LICENSE
MIT
original_MIT_license

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages