pdb4ambermini
基于 pdb4amber 的精简工具(移除了对 Amber 可执行程序的依赖),用于清理/准备 PDB/CIF 结构,让其更适合 Amber 力场。支持保留输入文件中的 SEQRES 信息。
功能
- 读取本地文件、stdin、URL 或 PDB ID(依赖 ParmEd 下载)。
- 自动识别并重命名组氨酸(HIS → HID/HIE/HIP),可选常 pH 模式(ASP/GLU/HIS → AS4/GL4/HIP)。
- 检测二硫键并重命名 CYS → CYX,可选择写入/关闭 S–S CONECT 记录。
- 识别残基缺口、非标准残基;输出重编号对照表、非标准残基列表、二硫键列表。
- 支持删除氢、去水、按掩码 strip 原子/残基、模型选择、altloc 处理(保留/丢弃/按占据度)。
- 支持残基突变(如
-m "3-ALA,4-GLU"),输出为 PDB 或 MOL2。 - 新增:
--keep-seqres保留输入 PDB 中的 SEQRES 行并保持原始残基编号,便于后续与序列/补残流程对齐。
安装
pip install pdb4ambermini
命令行示例
# 查看帮助
pdb4ambermini --help
# 最简单用法,输出到文件
pdb4ambermini input.pdb -o cleaned.pdb
# 仅保留蛋白并去水
pdb4ambermini input.pdb -p -d -o protein.pdb
# 按掩码删除原子/残基
pdb4ambermini input.pdb -s ':LIG,HOH' -o stripped.pdb
# 处理 PDB ID,常 pH 重命名,按模型选择
pdb4ambermini 1tsu --pdbid --constantph --model 1 -o out.pdb
# 突变并保留 altloc
pdb4ambermini input.pdb -m "10-ALA,15-GLU" --keep-altlocs -o mutated.pdb
# 保留理论完整序列 SEQRES,同时保持原始残基编号
pdb4ambermini input.pdb --keep-seqres -o with_seqres.pdb
主要参数
-i/--in输入文件(默认 stdin);-o/--out输出文件(默认 stdout)-y/--nohyd去氢;-d/--dry去水;-s/--strip指定掩码 strip 原子/残基-m/--mutate突变;-p仅保留蛋白;-a仅保留 Amber 支持残基--constantph常 pH 重命名;--most-populousaltloc 取占据度最大;--keep-altlocs保留 altloc--pdbid以 PDB ID 下载;--model指定模型(负数保留全部)--no-conect不写二硫键 CONECT;--noter不写 TER--keep-seqres保留输入 PDB 的 SEQRES 行并放在输出开头
Python 调用示例
from pdb4ambermini.pdb4amber import run
ns_names, gaps, disulfides = run(
arg_pdbout="cleaned.pdb",
arg_pdbin="input.pdb", # 可为路径、类文件对象或 parmed.Structure
arg_nohyd=False,
arg_dry=False,
arg_strip_atom_mask=None,
arg_mutate_string=None,
arg_prot=False,
arg_amber_compatible_residues=False,
arg_constph=False,
arg_mostpop=False,
arg_model=0,
arg_keep_altlocs=False,
arg_logfile="pdb4ambermini.log",
arg_conect=True,
arg_noter=False,
arg_keep_seqres=True,
)
print("非标准残基:", ns_names)
print("缺口:", gaps)
print("二硫键:", disulfides)
许可
MIT License。项目基于 pdb4amber(BSD-3-Clause,AMBER 项目),原始源码的版权与 BSD 条款已在 LICENSE 中注明。
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdb4ambermini-0.1.3.tar.gz
(18.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdb4ambermini-0.1.3.tar.gz.
File metadata
- Download URL: pdb4ambermini-0.1.3.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef01bd22248f06da3d632cd1983126742dba4180f4e3c4a6857afa088e48f754
|
|
| MD5 |
9990900e81842062de36266450fec83b
|
|
| BLAKE2b-256 |
1e9d596ac8d7a7f8970e7fb950db22f201790ac1ae6795eafaa38c00e6a50b38
|
File details
Details for the file pdb4ambermini-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pdb4ambermini-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b8ed1e9dc1eaeca0e8d74bf590f8e77850fb3d0a43c8604386dfbfdb9873ae1
|
|
| MD5 |
1dd6ecc15d3a25e5a302e8f7a3d79a4f
|
|
| BLAKE2b-256 |
b0ab11b179970ec61f9e3a39c85457a8bb7ce74ca1b7f6aa38368757279a4eeb
|