Skip to main content

DuIvyInteraction

基于 MD 拓扑力场参数的分子间相互作用判定工具。

解决什么问题

现有工具(PLIP / ProLIF)分析 MD 轨迹时,通过 OpenBabel / RDKit 从坐标重建化学信息(键序、芳香性、加氢),丢弃了 MD 力场拓扑中原有的化学语义。这导致:

  • 对 trjconv 导出的 PDB(无 CONECT / 键序)芳香性判定失败
  • 每帧重复推断,效率低
  • 推断结果与力场参数不自洽

核心思路

直接从 GROMACS tpr 拓扑中读取力场原子类型,确定性识别化学基团,与模拟力场完全自洽。

力场原子类型(如 GAFF 的 ca = 芳香碳、na = 吡咯氮)是参数化时由 antechamber / sobtop 做出的化学判决的留存记录。直接读取 = 零损失、零歧义,不需要从坐标反推。

工具优势

  • 确定性:基团鉴定基于力场原子类型,不依赖几何推断
  • 与力场自洽:结果与模拟使用的力场参数同源
  • 全原子显式 H:H 键供体(D–H 键)、水桥(SOL 残基)、金属(元素+电荷)全部零推断
  • Amber 全家族兼容:已验证 amber03/94/96/99/99sb/99sb-ildn/GS/14sb + GAFF,类型映射零冲突
  • 支持 8 种相互作用类型:氢键、π-π 堆积、盐桥、π-阳离子、卤键、疏水、金属配位、水桥

依赖

  • Python >= 3.9
  • NumPy >= 1.20
  • SciPy >= 1.7
  • MDAnalysis >= 2.0
  • h5py >= 3.0
  • DuIvyTools >= 0.6.0
  • GROMACS(gmx dump,用于文本格式 tpr 解析)

安装

pip install -e .

项目状态

基团鉴定、相互作用检测、HDF5 结果存储、xvg/xpm/CSV 导出、Pipeline 编排和 DII 命令行工具均已完成。详见 doc/ 目录下的设计文档。

使用

# 安装
pip install -e .

# 运行相互作用检测并保存 h5(--ff 必选,当前支持 amber)
dii run -t md.tpr -f md.xtc -o out/ --ff amber
# 可选参数:
#   --interactions hydrogen_bond,pi_stacking   只检测部分类型(默认 all=8类)
#   --strategy two_pass|per_frame|per_tuple    检测策略(默认 two_pass)

# 导出 h5 结果为 xvg/xpm/csv 并打印概览(支持多 Interaction h5)
dii export -i out/salt_bridge.h5 -o out_export/

支持的 8 种相互作用类型:氢键、π-π 堆积、盐桥、π-阳离子、卤键、疏水、金属配位、水桥。

在 Python 中调用:

from DuIvyInteractions.pipeline import Pipeline

# 配置:力场 + 策略
pipeline = Pipeline(ff="amber", strategy="two_pass")
pipeline.run("md.tpr", "md.xtc", "out/", interactions=None)  # None=全部8类

Release files for duivyinteractions 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for duivyinteractions 0.0.1
File Size Uploaded
duivyinteractions-0.0.1.tar.gz 77.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for duivyinteractions 0.0.1
File Interpreter ABI Platform
duivyinteractions-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size:198.5 kB

Release files / duivyinteractions-0.0.1.tar.gz

Download URL duivyinteractions-0.0.1.tar.gz
Size 77.8 kB
Tags Source
SHA-256 checksum
How to use checksums
77d3ce8c2d428109b5ccc5675afcc8b27500f49c69c2c694861de028acf09c7b
BLAKE2b-256 checksum
How to use checksums
cac68781b9d611cf66738b9dbed2d329c9b792f2e813241d073f2bc44c1eee83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / duivyinteractions-0.0.1-py3-none-any.whl

Download URL duivyinteractions-0.0.1-py3-none-any.whl
Size 120.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97020c9223b7259220fb7789dc20fb641f7e2635420f08d75d1896c73e07f31f
BLAKE2b-256 checksum
How to use checksums
c4abb0d15164bc318c51d687965c97bec4daa843ef3e4b93fbdfe4f0f6a209fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page