Giter VIP home page Giter VIP logo

molhandler.jl's Introduction

MolHandler

Build Status Codecov Coveralls

Concept

Simple and intuitive package for handling Molecular dynamics trajectory data. Supported formats are xyz, pdb and dcd.

How to install

Julia version 1.2, 1.6 is supported.

pkg> add https://github.com/yutakasi634/MolHandler.jl.git
julia> using MolHandler

Example of use

Handling dcd file

julia> using MolHandler
julia> trj = read_dcd("trajectory.dcd")
julia> trj.coordinates[:,1] # get first snapshot as Coordinate object array.
julia> trj.coordinates[1,:] # get first atom coordinate time series by Coordinate object array.
julia> frame            = get_frame(1, trj)  # get first frame as Frame object.
julia> atom_time_series = get_atom(1, trj)   # get first atom time series as Atom object array.
julia> atom             = get_atom(2, frame) # get second atom as Atom object.
julia> atom.coordinate.x # return x element of atom  coordinate.
julia> com = center_of_mass(trj, geometric = ture)
julia> trj.coordinates .-= com[1] # move this trajectory to origin by first frame center of mass.
julia> write_dcd("com_fixed_trj.dcd", trj) # output this protein as dcd file.

Handling pdb file

julia> using MolHandler
julia> trj = read_pdb("1aki.pdb", model = :AA) # read protein as all atom model.
julia> com = center_of_mass(trj)
julia> rg  = radius_of_gyration(trj)
julia> trj.coordinates .-= com # move this protein to origin.
julia> write_pdb("com_fixed_1aki.pdb", trj) # output this protein as pdb file.

Support Multi-Threading

julia> using Molhandler
julia> trj = read_dcd("trajectory.dcd")
julia> contact_map = contact_probability_matrix_parallel(10.0, trj) # get contact-map of which contact threshold is 10.0.

You have to set the environment variable JULIA_NUM_THREADS before excution.

Document

Online document is https://yutakasi634.github.io/MolHandler.jl/dev.

molhandler.jl's People

Contributors

yutakasi634 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bondrewd

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.