Git Product home page Git Product logo

dcd's Introduction

DCD

DCD is a Ruby library for processing CHARMM and X-PLOR style binary trajectory files, aka DCD files. Based on the matdcd and VMD DCD plugin, DCD parses and allows access to various metadata and atom information for use in scripts and automated environments where the numeric positions of the atoms is useful.

Installation

Add this line to your application's Gemfile:

gem 'dcd'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dcd

Usage

DCD requires an io pointer to a binary DCD file upon initialization, and can be used in two ways: instant loading and lazy loading. The difference between instant and lazy loading is passing in an optional second argument upon initialization.

> require('dcd')
=> true
> dcd_pointer = File.read('1407.dcd')
=> #<File:./1407.dcd>
> lazy_load = false
=> false
> my_dcd = DCD.new(dcd_pointer, lazy_load)
=> ... 

Once loaded, you have access to the metadata, including the nstep, nset, and step, the title, and the frames with atom coordinates in x, y, z, and w if using a 4th dimensional DCD.

TODO

  1. Currently test coverage on this library is limited, especially around fixed atoms and CHARMM 4th dimensional parameters. If you DCDs, especially those with the aforementioned features, please make a pull request or an issue with the necessary files attached.
  2. Examples.

License

MIT. See LICENSE for more information.

dcd's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.