MDTraj 开源项目教程

MDTraj 开源项目教程

mdtrajAn open library for the analysis of molecular dynamics trajectories项目地址:https://gitcode.com/gh_mirrors/md/mdtraj

1. 项目的目录结构及介绍

MDTraj 项目的目录结构如下:

mdtraj/
├── docs/
├── examples/
├── mdtraj/
│   ├── core/
│   ├── formats/
│   ├── geometry/
│   ├── io/
│   ├── testing/
│   ├── topology/
│   ├── utils/
│   └── __init__.py
├── scripts/
├── tests/
├── .gitignore
├── .travis.yml
├── AUTHORS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── setup.cfg
├── setup.py
└── tox.ini

目录介绍:

  • docs/: 包含项目的文档文件。
  • examples/: 包含示例代码和数据。
  • mdtraj/: 核心代码目录,包含各种模块和功能。
    • core/: 核心功能模块。
    • formats/: 文件格式处理模块。
    • geometry/: 几何计算模块。
    • io/: 输入输出模块。
    • testing/: 测试模块。
    • topology/: 拓扑结构处理模块。
    • utils/: 工具模块。
    • __init__.py: 初始化文件。
  • scripts/: 包含一些脚本文件。
  • tests/: 包含测试文件。
  • .gitignore: Git 忽略文件配置。
  • .travis.yml: Travis CI 配置文件。
  • AUTHORS.md: 作者列表。
  • CHANGELOG.md: 变更日志。
  • CONTRIBUTING.md: 贡献指南。
  • LICENSE: 许可证文件。
  • MANIFEST.in: 清单文件。
  • README.md: 项目说明文件。
  • setup.cfg: 安装配置文件。
  • setup.py: 安装脚本。
  • tox.ini: Tox 配置文件。

2. 项目的启动文件介绍

MDTraj 项目的启动文件主要是 setup.py,它负责项目的安装和配置。通过运行 python setup.py install 可以安装 MDTraj 库。

3. 项目的配置文件介绍

MDTraj 项目的配置文件主要包括:

  • setup.cfg: 包含安装和打包的配置信息。
  • tox.ini: 用于配置 Tox 自动化测试环境。
  • .travis.yml: 用于配置 Travis CI 持续集成环境。

这些配置文件确保了项目的正确安装、测试和持续集成。


以上是 MDTraj 开源项目的目录结构、启动文件和配置文件的介绍。希望这份教程能帮助你更好地理解和使用 MDTraj 项目。

mdtrajAn open library for the analysis of molecular dynamics trajectories项目地址:https://gitcode.com/gh_mirrors/md/mdtraj

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)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

邢霜爽Warrior

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值