用途:Packmol 用于为分子动力学(MD)模拟生成初始构型,按空间约束放置分子,可用于装盒、围绕蛋白质、构建界面或复杂几何(球、圆柱、椭球)体系,并避免原子重叠。
主要能力:支持多分子类型混合装盒;蛋白质溶剂化(水与离子);液-液/液-气界面(plane 约束);球、圆柱、椭球等几何约束;原子级选择与旋转约束;周期性边界条件;restart 文件分步构建大体系;原子特异半径。
使用方式:安装 pip install packmol,验证 packmol -h。输入文件需包含 tolerance、output、filetype 及 structure 块。structure 块语法为 structure molecule.pdb 后接 number <N>、inside|outside <constraint>、可选参数,以 end structure 结束。常见约束:inside box xmin ymin zmin xmax ymax zmax;inside sphere xcenter ycenter zcenter radius;inside cylinder x1 y1 z1 dx dy dz radius length;above plane a b c d 或 below plane a b c d;inside ellipsoid。运行:packmol < input.inp。
常用可选参数:pbc、seed、discale、maxit、precision。定位与旋转:fixed(6 参数)、center、constrain_rotation、atoms ... end atoms 选择特定原子施加约束。
验证:scripts/validate_input.py 校验输入语法;scripts/check_overlaps.py 检查原子重叠;scripts/analyze_density.py 计算密度;scripts/verify_success.py 验证完成;scripts/solvate_helper.py 自动溶剂化,如 python scripts/solvate_helper.py protein.pdb --shell 15.0 --charge +4。输出成功时目标函数与约束违规值应小于 0.01。
适用场景:水盒子、水/乙醇混合物、蛋白质加溶剂与离子、水/氯仿或水/己烷界面、球形囊泡、膜系统、纳米管/孔道等。
限制:输入文件格式受限为 pdb、xyz、tinker;大体系可能报 “Killed”,需减少分子数或用 restart 增量构建;不收敛时可尝试 discale 1.5、减少分子数、简化约束或增大 maxit;几何异常需检查约束语法与冲突;官方未提供收费、平台、价格或效果信息,这些暂未提供。