From 8ef5b33d924b55c43c729069b61d7b80c956d837 Mon Sep 17 00:00:00 2001 From: BHM-Bob <2262029386@qq.com> Date: Wed, 18 Dec 2024 21:23:18 +0800 Subject: [PATCH] v0.9.1 --- docs/index.md | 5 +++- docs/release_notes/0.9.1.md | 48 +++++++++++++++++++++++++++++++++ docs/scripts/eval_modeling.md | 34 +++++++++++++++++++++++ docs/scripts/sort_mol2_bonds.md | 29 ++++++++++++++++++++ docs/source/conf.py | 6 ++--- lazydock/__version__.py | 4 +-- setup.py | 4 +-- 7 files changed, 122 insertions(+), 8 deletions(-) create mode 100644 docs/release_notes/0.9.1.md create mode 100644 docs/scripts/eval_modeling.md create mode 100644 docs/scripts/sort_mol2_bonds.md diff --git a/docs/index.md b/docs/index.md index 4be24d4..92923fb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,7 +1,7 @@ @@ -80,9 +80,12 @@ pip install lazydock - [get_pocket](scripts/get_pocket.md): get pocket info from ProteinPlus. - [ana_interaction](scripts/ana_interaction.md): analyze interaction between receptor and poses. - [dock](scripts/dock.md): perform batch molecular docking. +- [sort_mol2_bonds](scripts/sort_mol2_bonds.md): sort mol2 bonds. +- [eval_modeling](scripts/eval_modeling.md): evaluate modeling result. ## release note +- [0.9.1](release_note/0.9.1.md) - [0.9.0](release_note/0.9.0.md) - [0.8.0](release_note/0.8.0.md) - [0.7.0](release_note/0.7.0.md) diff --git a/docs/release_notes/0.9.1.md b/docs/release_notes/0.9.1.md new file mode 100644 index 0000000..6cd849c --- /dev/null +++ b/docs/release_notes/0.9.1.md @@ -0,0 +1,48 @@ + +2024-12-18 21:18:57 + +## Focus on +1. add Gromacs scripts +2. add scripts and fix bug in docs + + +## What's New +- addon: lazydock\scripts\eval_modeling.py: add eval_modeling script for protein modeling evaluation +- addon: lazydock\gmx\thirdparty\cgenff_charmm2gmx.py: Add new script `cgenff_charmm2gmx.py` to convert CHARMM parameters to GROMACS format, with compatibility with Networkx 3.X. THIS SCRIPT IS FROM https://github.com/Lemkul-Lab/cgenff_charmm2gmx +- addon: lazydock\storage\lazydock-cli-scripts-list.json: add gmx script +- addon: add lazydock\gmx\run.py: add Gromacs class for running GROMACS commands +- addon: lazydock\pml\utils.py: add get_seq function to get protein sequences +- addon: lazydock\scripts\gmx.py: add prepare_complex script for GROMACS + + +## Minor Addon +- minor-addon: lazydock\scripts\dock.py: HDOCK and HPEPDOCK: add GUI option for browser and refactor docking process +- minor-addon: lazydock_pymol_plugin\__init__.py: add align_pose_to_axis command to LazyDock Pymol Plugin +- minor-addon: lazydock\pml\align_to_axis.py: add 'alter' method to align pose to axis +- minor-addon: lazydock\pml\align_to_axis.py: add dss option to align_pose_to_axis function + + +## BUG-FIX +- fix-bug: lazydock\pml\align_to_axis.py: sort_vertices: improve bounding box alignment algorithm +- fix-bug: lazydock\gmx\thirdparty\__init__.py: create thirdparty init file +- + + +## CODE-FIX +- fix-code: lazydock\scripts\eval_modeling.py: add QMEAN and QMEANDisCo support and improve result formatting +- fix-code: lazydock\scripts\dock.py: update run_vina task to include vina_name argument +- + + +## Remove +None or a little. + + +## Other Changes +- build(dependencies): add networkx +- requirements.json: remove compas because it require numpy<2 diff --git a/docs/scripts/eval_modeling.md b/docs/scripts/eval_modeling.md new file mode 100644 index 0000000..78987f1 --- /dev/null +++ b/docs/scripts/eval_modeling.md @@ -0,0 +1,34 @@ +# Model Evaluation CLI Tool + +## Overview +This Python script serves as a command-line interface (CLI) tool for evaluating protein models using various web servers. It automates the process of submitting models, retrieving evaluation results, and compiling them into a user-friendly format. + +## Command: model_eval +### Brief +The `model_eval` command evaluates protein models in a specified directory using multiple web servers. + +### Arguments +- `-d`, `--dir`: The input directory containing the models to be evaluated. Defaults to the current working directory. +- `-n`, `--name`: A substring to filter model filenames. Only files containing this substring will be processed. Defaults to an empty string, meaning all files are considered. +- `-t`, `--type`: The file type of the models to search for in the input directory. Defaults to "pdb". +- `--servers`: A comma-separated list of web servers to use for evaluation. Available servers include ProQ, VoroMQA, ProSA, MolProbity, ProQ3, SAVES, QMEANDisCo, and QMEAN. Defaults to all supported servers. +- `--n-workers`: The number of worker threads for parallel processing. Defaults to 4. +- `-r`, `--recursive`: A flag indicating whether to search the input directory recursively. Defaults to False. +- `--disable-cache`: A flag to disable caching of results. If enabled, the tool will re-evaluate models even if results already exist. Defaults to False. + +### Behavior +1. The script processes the input directory and filters files based on the specified type and name substring. +2. It initializes a task pool with the specified number of worker threads. +3. For each model file, it checks if cached results exist (unless caching is disabled). If cached results are found, it skips evaluation and adds the result path to the task list. +4. If no cached results are found, it alters the chain code of the model using PyMOL and saves the modified file. +5. The script then submits a task to the task pool for evaluation using the specified web servers. +6. Once all tasks are completed, it gathers the results, compiles them into a pandas DataFrame, and exports the DataFrame to an Excel file named `eval_.xlsx` in the input directory. + +### Notes +- Ensure that the input directory exists and contains the desired model files. +- The script assumes that the necessary dependencies, including PyMOL and the `mbapy_lite` and `lazydock` libraries, are installed and properly configured. +- Be aware of the terms of use and rate limits of the web servers to avoid any potential issues. + +### Example +```bash +lazydock-cli eval-modeling -d /path/to/models -n my_model -t pdb --servers ProQ,ProSA --n-workers 8 -r \ No newline at end of file diff --git a/docs/scripts/sort_mol2_bonds.md b/docs/scripts/sort_mol2_bonds.md new file mode 100644 index 0000000..6112735 --- /dev/null +++ b/docs/scripts/sort_mol2_bonds.md @@ -0,0 +1,29 @@ +# Mol2 Bond Sorter CLI Tool + +## Overview +This Python script is a command-line interface (CLI) tool designed to sort the bonds in Mol2 files based on atom indices. It can process individual Mol2 files or directories containing multiple Mol2 files. + +## Command: sort_mol2_bonds +### Brief +The `sort_mol2_bonds` command sorts the bonds in Mol2 files by atom index, ensuring that the bonds are listed in the correct order. + +### Arguments +- `-i`, `--input`: The input Mol2 file or directory path. If a directory is provided, the script will process all Mol2 files within it. Defaults to the current working directory. +- `-s`, `--suffix`: The suffix to append to the sorted Mol2 file names. Defaults to "_sorted". +- `-r`, `--recursive`: A flag indicating whether to search the input directory recursively. Defaults to False. + +### Behavior +1. The script processes the input path to determine if it is a single Mol2 file or a directory containing Mol2 files. +2. If the input is a directory, it retrieves a list of Mol2 files within the directory (and its subdirectories if recursive search is enabled). +3. For each Mol2 file, it sorts the bonds based on atom indices using the `sort_bonds` function. +4. The sorted Mol2 content is then saved to a new file with the specified suffix appended to the original file name. + +### Notes +- Ensure that the input path is valid and contains the desired Mol2 files. +- The script assumes that the necessary dependencies, including the `mbapy_lite` and `lazydock` libraries, are installed and properly configured. +- The `sort_bonds` function is responsible for the actual bond sorting logic, which is not detailed here. + +### Example +```bash +lazydock-cli sort_mol2_bonds -i /path/to/mol2_files -s _sorted_bonds -r +``` \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 0bf79df..a1923fd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,7 +1,7 @@ ''' Date: 2024-08-24 22:24:47 LastEditors: BHM-Bob 2262029386@qq.com -LastEditTime: 2024-12-16 15:26:54 +LastEditTime: 2024-12-18 21:18:18 Description: ''' # Configuration file for the Sphinx documentation builder. @@ -12,8 +12,8 @@ copyright = '2024, BHM-Bob' author = 'BHM-Bob G' -release = '0.9.0' -version = '0.9.0' +release = '0.9.1' +version = '0.9.1' # -- General configuration diff --git a/lazydock/__version__.py b/lazydock/__version__.py index 7c10bfe..6781c31 100644 --- a/lazydock/__version__.py +++ b/lazydock/__version__.py @@ -8,8 +8,8 @@ __title__ = "lazydock" __description__ = "Lazy Dock" __url__ = "https://github.com/BHM-Bob/LazyDock" -__version__ = "0.9.0" -__build__ = "20241216_0" +__version__ = "0.9.1" +__build__ = "20241218_0" __author__ = "BHM-Bob G" __author_email__ = "bhmfly@foxmail.com" __license__ = "MIT" \ No newline at end of file diff --git a/setup.py b/setup.py index c1ca168..fcf6d4c 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ ''' Date: 2024-05-06 17:18:10 LastEditors: BHM-Bob 2262029386@qq.com -LastEditTime: 2024-12-16 15:27:21 +LastEditTime: 2024-12-18 21:18:45 Description: ''' @@ -88,4 +88,4 @@ # pip install . # python setup.py sdist -# twine upload dist/lazydock-0.9.0.tar.gz \ No newline at end of file +# twine upload dist/lazydock-0.9.1.tar.gz \ No newline at end of file