MDAnalysis

时间:2014-05-27 06:43:03
【文件属性】:

文件名称:MDAnalysis

文件大小:18.75MB

文件格式:GZ

更新时间:2014-05-27 06:43:03

分子动力学轨迹分析

MDAnalysis 分析分子动力学轨迹 MDAnalysis-0.7.2.tar.gz MDAnalysis is an object-oriented python toolkit to analyze molecular dynamics trajectories generated by CHARMM, Gromacs, NAMD, LAMMPS, or Amber. It allows one to read molecular dynamics trajectories and access the atomic coordinates through numpy arrays. This provides an extremely flexible and relatively fast framework for complex analysis tasks. In addition, CHARMM-style atom selection commands are implemented. Trajectories can also be manipulated (for instance, fit to a reference structure) and written out. A typical usage pattern is to iterate through a trajectory and analyze coordinates for every frame. In the following example the end-to-end distance of a protein and the radius of gyration of the backbone atoms are calculated: import MDAnalysis from MDAnalysis.tests.datafiles import PSF,DCD # test trajectory import numpy.linalg u = MDAnalysis.Universe(PSF,DCD) # always start with a Universe nterm = u.s4AKE.N[0] # can access structure via segid (s4AKE) and atom name cterm = u.s4AKE.C[-1] # ... takes the last atom named 'C' bb = u.selectAtoms('protein and backbone') # a selection (a AtomGroup) for ts in u.trajectory: # iterate through all frames r = cterm.pos - nterm.pos # end-to-end vector from atom positions d = numpy.linalg.norm(r) # end-to-end distance rgyr = bb.radiusOfGyration() # method of a AtomGroup; updates with each frame print "frame = %d: d = %f Angstroem, Rgyr = %f Angstroem" % (ts.frame, d, rgyr)


网友评论

  • 没有详细教程吗,只有程序包没有说明怎么用呢