✨ Rosetta Tool Support
Added the rosetta script for protein-ligand interface energy calculation using the Rosetta scoring function. Registered as a CLI command with pyrt/rosetta exec names. (add(lazydock/scripts/rosetta.py): Add support for the Rosetta tool)
✨ Interface Energy Calculation
Enhanced calcu_interface_energy function to support PDB string input and multiple energy functions, with detailed API documentation. (feat(lazydock/pyrt/energy_utils.py): Enhance the interface energy calculation function and add documentation)
✨ Single-Chain Energy Calculation
Added calcu_single_energy function for single-chain energy calculation. Refactored pose loading logic into an independent pose_utils module. (feat(lazydock/pyrt/energy_utils.py): Add the single-chain energy calculation function and reconstruct the pose loading logic)
✨ Pose Loading Utility
Added load_pose function to load Poses from file paths or Pose objects. (feat(lazydock/pyrt/pose_utils.py): add load_pose: Add a function to load Poses from file paths or pose objects)
✨ Structural Relaxation
Added relax_pdb helper function supporting multi-chain selection and loading PDB from strings or Pose objects. (feat(lazydock/pyrt/relax.py): Support multi-chain selection and loading PDB from strings or Pose objects)
✨ Relaxation Script with Parallel Processing
Implemented the relax command in the rosetta script for PDB structure relaxation, including before/after energy comparison and multi-process parallel processing. (feat(lazydock/scripts/rosetta.py): Add structural relaxation functionality and support parallel processing)
✨ Multi-Chain Energy Calculation
Added --energy-chain parameter to support specifying chains for energy calculation. When multiple chains are provided, calculates interface energy; otherwise calculates single-chain energy. (feat(lazydock/scripts/rosetta.py): relax: Add parameters to the energy calculation chain and support multi-chain energy calculation)
1.2 OpenMM Integration (opmm Module)
✨ ForceField Minimizer
Added ForceFieldMinimizer class in the new opmm module for OpenMM-based structure minimization. (add: My_Progs/LazyDock/lazydock/opmm/relax.py: add ForceFieldMinimizer)
✨ OpenMM Structure Optimization Script
Added the opmm script for PDB structure relaxation using OpenMM, supporting multi-process processing and multiple constraint conditions. (add(lazydock/scripts/opmm.py): 添加基于OpenMM的结构优化脚本)
1.3 Deep Learning - EHIGN Affinity Prediction
✨ EHIGN Model Integration
Added the EHIGN (Equivariant Hierarchical Interaction Graph Neural Network) model for protein-ligand affinity prediction, including model architecture, data processing, API interface, and utility functions. (add: lazydock/nn/EHIGN: add EHIGN for protein-ligand affinity predict as a deep learning model tool)
1.4 GROMACS Umbrella Sampling
✨ Umbrella Sampling Preparation and Execution
Added comprehensive scripts for GROMACS umbrella sampling: prepare_gmx_umbrella for system preparation and run_gmx_umbrella for pull simulation execution, including WHAM analysis. (add: add scripts for GROMACS umbrella sampling preparation and execution, for dev state)
✨ Pull Process Enhancement
Enhanced the pull process with new arguments: --calcu-center-atom for PBC center atom calculation, --position-restrain for position restraint, and --pull-only flag for performing only the pull step. (feat: lazydock/scripts/run_gmx_umbrella.py: enhance pull process with new arguments and functionality)
✨ Supplemental Sampling
Added any_sample class command for running supplemental pull samples when the initial pull-sample is insufficient. (feat: lazydock/scripts/run_gmx_umbrella.py: refactor sample MD run process and add WHAM analysis; introduce run_sample method and update argument handling, add any_sample cls command)
✨ Production MD Support
Added production MD step support for umbrella sample preparation when md-mdp parameter is specified. (feat(lazydock/scripts/prepare_gmx_umbrella.py): 为umbrella sample prepare添加生产MD步骤支持)
✨ WHAM Result Skipping
Added --skip-exist-wham parameter to skip WHAM analysis when results already exist. (feat(lazydock/scripts/run_gmx_umbrella.py: pull): 添加跳过已存在wham结果的功能)
✨ Complex Support in Pull NDX
Updated pull.ndx generation to consider tc_index.ndx, enabling pull to handle protein-ligand complexes. (feat(lazydock/scripts/run_gmx_umbrella.py: pull): 生成pull.ndx时考虑tc_index.ndx,使得pull可以处理蛋白小分子复合物)
✨ Complex Main Process
Implemented main_process for the complex class in prepare_gmx_umbrella. (feat(lazydock/scripts/prepare_gmx_umbrella.py: complex): 实现main_process)
1.5 GROMACS Force Field Preparation
✨ Sobtop Preparation Module
Added complex_sobtop sub-command in prepare_gmx.py for the sobtop tool pipeline. (add: lazydock/scripts/prepare_gmx.py: add complex_sobtop sub-cmd for sobtop tool pipeline)
1.6 Analysis and Preparation Enhancements
✨ Ligand PDB Format Support
Added ligand PDB format support in simple_analysis for interaction analysis. (feat: lazydock/scripts/ana_interaction.py: simple_analysis: add lig pdb format support)
✨ Skip Mismatch Option
Added --skip-mismatch parameter to skip receptor-ligand mismatches in interaction analysis, with improved error handling and user interaction. (feat(lazydock/scripts/ana_interaction.py): 添加跳过不匹配文件的选项并优化错误处理)
✨ Placeholder Detection for Distributed Computing
Added --placeholder parameter for detecting and writing MMPBSA_PLACEHOLDER files to avoid duplicate computation in distributed analysis. (feat(lazydock/scripts/ana_gmx.py): 添加占位符检测功能以避免分布式计算时竞争计算)
✨ Auto-detect N/C Terminal Types
Added automatic detection of N-terminal and C-terminal types in protein preparation. When set to "auto", detects MET as terminal type 1, otherwise 0. (feat(lazydock/scripts/prepare_gmx.py: protein): 添加自动检测N端和C端类型功能)
✨ Rotation Matrix Return Option
Added return_rot parameter to get_aligned_coords function to optionally return rotation matrices alongside aligned coordinates. (feat(lazydock/gmx/mda/align.py: get_aligned_coords): 添加返回旋转矩阵选项)
✨ PDB Converter Truncation Parameters
Added idx_ltruncate and resi_ltruncate parameters to PDBConverter for controlling serial and resSeq formatting. (feat(lazydock/gmx/mda/convert.py:PDBConverter): 增加idx_ltruncate和resi_ltruncate参数)
✨ Group Extraction Enhancement
Added n_name parameter to get_groups method for specifying ndx file name. (feat(lazydock/gmx/run.py: Gromacs: get_groups): 为get_groups方法添加n_name参数)
✨ kwargs2cmd Enhancement
Updated kwargs2cmd method to handle argument formatting for GROMACS commands, supporting Python keyword arguments with k_ format. (feat: lazydock/gmx/run.py: Gromcas: update kwargs2cmd method to handle argument formatting for Gromacs commands, support pass Python keyword as k_ format)
✨ Force Exit After Exec
Added --force-exit-after-exec parameter to force exit after script execution, with mutual exclusion check against --pause-after-exec. (feat: lazydock/scripts/_main_.py: 添加 --force-exit-after-exec 参数支持)
✨ Script Utility Function
Added make_args_and_excute function in _script_utils_.py to simplify script code. (feat: lazydock/scripts/_script_utils_.py: add make_args_and_excute func to simpfy scripts code)
✨ Interaction Result Suffix
Added result filename suffix option for interaction analysis to support multiple analysis configurations. (minor-addon: lazydock/scripts/ana_gmx.py: interaction: add result filename suffix option)
2. Improvements and Optimizations
2.1 Code Refactoring
🔄 Batch Directory Processing Refactoring
Moved process_batch_dir_lst method from the vina class to the Command parent class for code reuse. Removed redundant directory checking logic. (refactor(scripts): Move the batch directory processing logic to the parent class and simplify the main process)
🔄 Union Type Standardization
Uniformly replaced the | operator with Union type across the codebase for improved type annotation readability and compatibility. (refactor: Uniformly use the Union type instead of the/operator)
🔄 Umbrella Script Refactoring
Renamed classes and simplified argument handling in prepare_gmx_umbrella.py. (refactor: lazydock/scripts/prepare_gmx_umbrella.py: rename classes and simplify argument handling)
🔄 Distribute File Parameter Simplification
Renamed --source-root to --source with single file path support, added default empty string for --dist-name. (refactor(lazydock/scripts/distribute_file.py): 简化参数命名并增加默认值)
2.2 Configuration and Parameter Improvements
🔄 Default Threads Update
Changed default threads from 4 to 14 in simple_protein for improved performance. (fix(prepare_gmx, run_gmx): improve argument - change default threads from 4 to 14)
🔄 Verbose Mode for GROMACS Runs
Added default -v parameter for em/nvt/npt args to ensure mdrun uses verbose mode. (fix(lazydock/scripts/run_gmx.py): 为em/nvt/npt args添加默认参数-v并确保mdrun命令使用verbose模式)
🔄 Type Checking Configuration
Added pyrightconfig.json with updated exclude directories (.trae, .vscode, build, docs) and reportPrivateImportUsage set to none. (build(pyrightconfig.json): 更新类型检查排除目录和配置)
🔄 Dependency Adjustment
Removed autodocktools-py3 from [all] requirements and added installation instructions in documentation. (docs(install): Update the installation documentation and adjust the dependencies)
3. Bug Fixes
3.1 GROMACS Analysis Fixes
🐛 Task UID in Analysis File Names
Added task ID in analysis result file names to avoid skip issues when task suffix is assigned but file does not exist. (fix(lazydock/scripts/ana_gmx.py): simple: Add the task ID in the analysis result file name to avoid skip with task suffix assigned but file not exists)
🐛 Task UID in File Deletion
Fixed analysis file deletion and checking not including task_uid. (fix(lazydock/scripts/ana_gmx.py): 修正分析文件删除和检查时未包含task_uid的问题)
🐛 make_ndx Class Documentation
Corrected help information and comments in the make_ndx class, fixed comment errors (trjconv -> make_ndx), and added -ns parameter in xpm_show command. (fix(lazydock/scripts/ana_gmx.py): Correct the errors in the help information and comments of the make_ndx class)
🐛 Plot DataFrame Suffix
Added suffix for plot_df to avoid overwrite when different suffixes are used. (fix(lazydock/scripts/ana_gmx.py): interaction: add suffix for plot_df to avoid overwrite for diff suffix)
🐛 Default -ur Parameter
Changed default -ur parameter value for trjconv command from compact to rect to适配 LazyDock default workflow. (fix(lazydock/scripts/ana_gmx.py): 将trjconv命令的默认-ur参数值从compact改为rect,适配LazyDock默认工作流)
🐛 Trajectory Loading Messages
Enhanced trajectory loading messages and handled non-dict results in interaction calculation. (fix(lazydock/scripts/ana_gmx.py: interaction): enhance trajectory loading message and handle non-dict results in interaction calculation)
3.2 GROMACS Execution Fixes
🐛 Box Size Calculation
Fixed automatic box size and center calculation logic in make_box, correcting the formula from (x[0]/10+2*(x[1]+x[2])) to (x[0]/10+x[1]+x[2]). (fix-bug(lazydock/scripts/run_gmx.py: simple_protein: make_box): 修正自动生成盒子尺寸和中心点的计算逻辑)
🐛 Working Directory Switching
Fixed working directory switching issues in run_command_with_expect to ensure commands execute in the correct directory and avoid duplicate cd commands. (fix-bug(lazydock/gmx/run.py: Gromcas: run_command_with_expect): 修复工作目录切换问题, fix-bug(lazydock/gmx/run.py: Gromcas: run_command_with_expect): 修复工作目录切换逻辑以避免重复cd命令)
🐛 Continue Simulation Instructions
Updated GROMACS run parameters and added instructions for continuing simulations. (fix(lazydock/scripts/run_gmx.py): 更新GROMACS运行参数并添加继续模拟的说明)
3.3 Umbrella Sampling Fixes
🐛 Center Atom Calculation
Fixed axis parameter error in center atom distance calculation (axis=0 -> axis=1). Added PBC handling options and pull-pbc-ref-prev-step-com parameter. (fix-bug(lazydock/scripts/run_gmx_umbrella.py: pull): 修复中心原子计算错误并添加pbc处理选项)
🐛 Position Restraint Order
Adjusted position restraint application order from before pull mdrun to before pull grompp for proper constraint生效. (fix-bug(lazydock/scripts/run_gmx_umbrella.py: pull): 调整位置约束应用顺序以优化流程)
🐛 Histogram File Path
Fixed file path handling in plot_hist function to ensure correct file reading. (fix-bug(lazydock/scripts/run_gmx_umbrella.py): 修正plot_hist函数中文件路径处理问题)
🐛 Non-batch Processing
Added process_args method and iter_run_arg attribute to any_sample class for non-batch processing support. (fix-bug: lazydock/scripts/run_gmx_umbrella.py: any_sample: add process_args method to any_sample class to handle non-batch processing, fix-bug: lazydock/scripts/run_gmx_umbrella.py: any_sample: add iter_run_arg attribute to handle non-batch processing)
3.4 PLIP and PyMOL Plugin Fixes
🐛 Mode List Support
Updated check_support_mode to support list of modes. (fix-bug: lazydock/pml/plip_interaction.py: check_support_mode: support list of mode now)
🐛 Pattern Validation
Corrected type errors in pattern checking and added pattern validation before running PLIP analysis. Changed List type check to lowercase list for Python standard compliance. (fix(lazydock/pml/plip_interaction.py):run_plip_analysis & check_support_mode: Correct type errors in pattern checking and add pattern validation)
🐛 Spacing Parameter Type
Explicitly converted the spacing parameter to floating-point number to avoid potential type errors. (fix-bug: lazydock/pml_plugin/_init_.py: Explicitly convert the spacing parameter to a floating-point number)
3.5 Preparation and Docking Fixes
🐛 CGenFF Element Path
Updated element positioning path and added CGenFF 4.6 version selection support due to page structure changes. (fix(lazydock/web/cgenff.py): 更新元素定位路径并添加版本选择)
🐛 prepare_ff Import
Removed complex module prefix and directly called insert_content function. (fix-bug(lazydock/gmx/prepare_ff.py): 移除complex模块前缀,直接调用insert_content函数)
🐛 Vina out_name Handling
Added exception handling for missing out_name configuration to avoid program crashes. (fix(lazydock/scripts/dock.py: vina): 处理无out_name配置时跳过并报错)
🐛 File Write Mode
Fixed file write mode parameter error, changed 'wb' to 'w' with way='str' parameter. (fix(lazydock/scripts/prepare_gmx.py): 修正文件写入模式参数错误)
🐛 N/C Terminal Logic
Fixed automatic N/C terminal detection logic by extracting n_term and c_term as local variables to avoid undefined errors when not using auto mode. (fix(lazydock/scripts/prepare_gmx.py: protein: main_process): 修复自动判断N端和C端逻辑)
3.6 Other Fixes
🐛 PDB Regex Pattern
Fixed PDB mode regex pattern in autodock_utils to match more formats with continuous coordinate values. (fix(lazydock/pml/autodock_utils.py): 修正PDB模式正则表达式以匹配更多格式)
🐛 RMSD sqrt Zero
Avoided sqrt calculation on scalar zero in fast_calc_rmsd_rotation. (fix-bug(lazydock/algorithm/rms.py: fast_calc_rmsd_rotation): 避免sqrt计算标量0)
🐛 Elastic Network Task Waiting
Updated task waiting method and enhanced trajectory loading messages in elastic network analysis. (fix(lazydock/scripts/md_ana.py: elastic): update task waiting method and enhance trajectory loading messages)
🐛 Rosetta Timeout
Increased task query timeout from 30 seconds to 300 seconds to avoid timeout issues. (fix(lazydock/scripts/rosetta.py): Fix the task query timeout and add the energy chain parameter)
4. Documentation and Toolchain
4.1 Documentation Updates
📚 Installation Documentation
Updated installation documentation with autodocktools-py3 instructions and dependency adjustments. (docs(install): Update the installation documentation and adjust the dependencies)
📚 README Enhancement
Enhanced project description and improved title for clarity. (update README: enhance project description and improve title for clarity)
🛠️ CLI Script Registration
Registered new CLI scripts: rosetta (with pyrt/rosetta exec names), prepare_gmx_umbrella, and run_gmx_umbrella in the lazydock-cli-scripts-list.json. (lazydock/storage/lazydock-cli-scripts-list.json)
🛠️ Type Checking Configuration
Added pyrightconfig.json for Python type checking configuration. (add pyrightconfig.json)
🛠️ Gitignore Update
Added .trae to .gitignore. (.gitignore: add .trae)
4.3 Test Suite Expansion
🧪 Rosetta Energy Tests
Added test cases for calcu_interface_energy function, including file path, PDB string, different scoring functions, and error handling. (test(test/pyrt/test_energy_utils.py): Add test cases for the energy calculation tool module)
🧪 OpenMM Relax Tests
Added test for OpenMM ForceFieldMinimizer. (test: add My_Progs/LazyDock/test/opmm/test_relax.py)
🧪 OpenMM Constraint Test Suite
Added comprehensive OpenMM constraint system test suite including constraint vs external force, ligand movement exploration, leucine constraint, and new constraints API tests. (test: 添加OpenMM约束系统测试套件)
5. Compatibility Notes
5.1 Dependency Changes
🔥 autodocktools-py3 Removal
Removed autodocktools-py3 from [all] requirements and added installation instructions in documentation. (docs(install): Update the installation documentation and adjust the dependencies)
5.2 Default Value Changes
⚠️ Default Thread Count
Changed default threads from 4 to 14 in simple_protein for improved performance. (fix(prepare_gmx, run_gmx): improve argument - change default threads from 4 to 14)
⚠️ trjconv -ur Default
Changed default -ur parameter for trjconv from compact to rect. (fix(lazydock/scripts/ana_gmx.py): 将trjconv命令的默认-ur参数值从compact改为rect,适配LazyDock默认工作流)
5.3 Type Annotation Changes
🔄 Union Type Migration
Replaced all | operators with Union type annotations across the codebase. (refactor: Uniformly use the Union type instead of the/operator)