MolHandler.jl Documentation
This is simple and intuitive package for handling Molecular dynamics(MD) trajectory data. Supported formats are xyz, pdb and dcd.
How to install
This package assumes julia 1.2.
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
ulia> 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.
Functions list
MolHandler.atom_mass
MolHandler.center_of_mass
MolHandler.clip_trajectory
MolHandler.contact_bool_matrix
MolHandler.contact_bool_matrix_parallel
MolHandler.contact_bool_matrix_pbc
MolHandler.contact_probability_matrix
MolHandler.contact_probability_matrix_parallel
MolHandler.distance_pbc
MolHandler.fix_pbc
MolHandler.geometric_center_of_mass
MolHandler.get_atom
MolHandler.get_frame
MolHandler.move_pbc_center
MolHandler.pair_length_matrix
MolHandler.pair_length_matrix_parallel
MolHandler.pair_length_matrix_pbc
MolHandler.radius_of_gyration
MolHandler.read_dcd
MolHandler.read_pdb
MolHandler.read_xyz
MolHandler.residue_mass
MolHandler.sasa
MolHandler.write_dcd
MolHandler.write_pdb
MolHandler.write_xyz