Lightweight pdb4amber derivative without Amber binary dependencies
Project description
pdb4ambermini
基于 pdb4amber 的精简版工具(去除对 Amber 可执行程序的依赖),用于清理和准备 PDB/CIF 结构,生成更适合 Amber 力场的拓扑。
支持的功能
- 读取本地文件、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。
安装
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
主要命令行参数:
-i/--in输入文件(默认 stdin);-o/--out输出文件(默认 stdout)。-y/--nohyd去氢;-d/--dry去水;-s/--strip原子/残基掩码。-m/--mutate突变残基;-p仅保留蛋白;-a仅保留 Amber 支持残基。--constantph常 pH 重命名;--most-populousaltloc 取占据度最大;--keep-altlocs保留 altloc。--pdbid按 PDB ID 下载;--model指定模型(负数保留全部)。--no-conect不写二硫键 CONECT;--noter不写 TER。
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,
)
print("非标准残基:", ns_names)
print("缺口:", gaps)
print("二硫键:", disulfides)
许可证
MIT License。项目源自 pdb4amber(BSD-3-Clause,AMBER 项目),原始源码的版权与 BSD 条款已在 LICENSE 中致谢并注明。
Project details
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.0.tar.gz
(18.3 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.0.tar.gz.
File metadata
- Download URL: pdb4ambermini-0.1.0.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efe4a755c03c5ab6dcfeb7af701a1a87ab27d1d13d1b01d8a211f9d82aa12914
|
|
| MD5 |
feb78385fdb982ee6d49d4a7e4c735f9
|
|
| BLAKE2b-256 |
e597bb6a3801f5da2aef6d7f338e4fd57823fc9d9f1be577bb90c70b95733ba4
|
File details
Details for the file pdb4ambermini-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pdb4ambermini-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 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 |
e44c3d12dbd4bb0f1bc03633e81f65151f931cbb7b924cc51bc8bc707ab093d6
|
|
| MD5 |
6547945a2a0d01ab2f1ecbed2eeacc65
|
|
| BLAKE2b-256 |
b75cbc0132c81285f4157535e4e798b67c789b20dda50b17ca093fd9345ad239
|