From 68cef5d01c0895bd3d1d9544b010b5cba79125cf Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Leon Date: Sun, 14 Jan 2024 19:27:44 +0100 Subject: [PATCH] Update docs --- docs/index.rst | 1 + docs/source/CHANGELOG.md | 13 +++++++++++-- docs/source/moldrug_dahsboard.rst | 20 ++++++++++++++++---- docs/source/note_on_crem.rst | 8 ++++---- docs/source/note_on_rdkit.rst | 8 ++++++++ src/moldrug/utils.py | 2 +- 6 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 docs/source/note_on_rdkit.rst diff --git a/docs/index.rst b/docs/index.rst index 2c5e70f..6f7ee76 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,6 +21,7 @@ Welcome to moldrug's documentation! :numbered: source/note_on_crem + source/note_on_rdkit notebooks/quickstart notebooks/how_to diff --git a/docs/source/CHANGELOG.md b/docs/source/CHANGELOG.md index 4cb1a63..50af822 100644 --- a/docs/source/CHANGELOG.md +++ b/docs/source/CHANGELOG.md @@ -7,13 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [3.7.0] - 2024.01.14 + +## Fixed + +- Calculate SA_score with the molecule without explicit hydrogens. Based on: [https://github.com/rdkit/rdkit/discussions/7047](https://github.com/rdkit/rdkit/discussions/7047) + ### Added - The `moldrug.constraintconf.clashes_present` function. +- Attribute `_mol_no_hs` to `moldrug.utils.Inidividual` (the molecule without explicit hydrogens) ### Changed -- Filtering of conformation that clashes with the protein is no longer with `bio.PDB ` object. Now the coordinates are retrieved from the RDKit molecule object and the distance is calculated with NumPy. +- Filtering of conformation that clashes with the protein is no longer with `bio.PDB` object. Now the coordinates are retrieved from the RDKit molecule object and the distance is calculated with NumPy. +- The `smiles` property of the `moldrug.utils.Inidividual` is obtained from `_mol_no_hs` and not from `mol` ### Removed @@ -458,7 +466,8 @@ Print the starting date when MolDrug is called from the command line. - Minor code cleaning. - Better code covered during testing -[unreleased]: https://github.com/ale94mleon/MolDrug/compare/3.6.1...HEAD +[unreleased]: https://github.com/ale94mleon/MolDrug/compare/3.7.0...HEAD +[3.7.0]: https://github.com/ale94mleon/MolDrug/compare/3.6.1...3.7.0 [3.6.1]: https://github.com/ale94mleon/MolDrug/compare/3.6.0...3.6.1 [3.6.0]: https://github.com/ale94mleon/MolDrug/compare/3.5.0...3.6.0 [3.5.0]: https://github.com/ale94mleon/MolDrug/compare/3.4.0...3.5.0 diff --git a/docs/source/moldrug_dahsboard.rst b/docs/source/moldrug_dahsboard.rst index 91de73f..dffc180 100644 --- a/docs/source/moldrug_dahsboard.rst +++ b/docs/source/moldrug_dahsboard.rst @@ -2,18 +2,30 @@ MolDrug Dashboard ================= |streamlit| |MolDrug| |rdkit| |mols2grid| |ProLIF| |py3Dmol| |stmol| |mdanalysis| |meeko| |numpy| |pandas| |seaborn| -`MolDrug-Dashboard `__ will help you to get a overview -of your MolDrug simulation. +`MolDrug-Dashboard `__ will help you to get an overview +of your MolDrug simulation. It can be run online, but it is preferable to run it locally to not run with memory issues. To do so, you have to install its dependencies (you could activate your moldrug environment). + +.. code-block:: bash + + pip install -r https://raw.githubusercontent.com/ale94mleon/MolDrug/main/streamlit/requirements.txt + +And finally + +.. code-block:: bash + + streamlit run https://raw.githubusercontent.com/ale94mleon/MolDrug/main/streamlit/moldrug-dashboard.py + +Of course, you can always download the app to your personal computer. Inputs ------ -#. ``pbz2`` file. Exported when the command line is used. This file can be generated calling the function ``moldrug.utils.compressed_pickle``. The class ``moldrug.utils.Local`` and ``moldrug.utils.GA`` has already this method implemented. +#. ``pbz2`` file. Exported when the command line is used. This file can be generated by calling the function ``moldrug.utils.compressed_pickle``. The class ``moldrug.utils.Local`` and ``moldrug.utils.GA`` has already this method implemented. #. ``pdb`` file. The protein PDB if you would like to check the Protein-Ligand interaction network. Home ---- -The app presents a side bar (on the left) where the filters and representation options are located. The outputs are presented +The app presents a sidebar (on the left) where the filters and representation options are located. The outputs are presented in the center of the app. |01| diff --git a/docs/source/note_on_crem.rst b/docs/source/note_on_crem.rst index ffbdc9b..0c6ff55 100644 --- a/docs/source/note_on_crem.rst +++ b/docs/source/note_on_crem.rst @@ -1,9 +1,9 @@ -Note on CReM data base +Note on CReM database ====================== .. warning:: - For the tutorials we will use the CReM data base ``replacements02_sc2.db.gz``. - This is just because is the smaller one and therefore it has the fast download. - For real problems consider read first the `CReM paper `__ + For the tutorials, we will use the CReM database ``replacements02_sc2.db.gz``. + This is just because is a smaller one and therefore it has a fast download. + For real problems consider reading first the `CReM paper `__ and also see the discussion on `MolDrug repo `__ \ No newline at end of file diff --git a/docs/source/note_on_rdkit.rst b/docs/source/note_on_rdkit.rst new file mode 100644 index 0000000..479e350 --- /dev/null +++ b/docs/source/note_on_rdkit.rst @@ -0,0 +1,8 @@ +Note on explicit hydrogens and RKit library +=========================================== + +.. warning:: + + Many RDKit functions, including the ``sascore``, operate optimally when applied to molecules without explicit hydrogens. The ``sascore`` assigns a score ranging from 1 to 13, where 1 indicates an easily synthesizable molecule, and 13 signifies a challenging one. However, when explicit hydrogens are present, the function tends to yield higher scores, incorrectly suggesting a greater difficulty of synthesis. Detailed discussions on this issue can be found at `SA_Score gives different values depending if the molecule has explicit hydrogens `__. + + The MolDrug-3.7.0 release has addressed this concern for all built-in fitness functions. Refer to `MolDrug's CHANGELOG `__ for a comprehensive overview of the fixes and improvements. diff --git a/src/moldrug/utils.py b/src/moldrug/utils.py index d4d1dba..3e5ea80 100644 --- a/src/moldrug/utils.py +++ b/src/moldrug/utils.py @@ -1267,7 +1267,7 @@ class GA: with keys ``accepeted`` and ``generated`` with the number of accepted and genereated individuals on the generation respectively. AddHs : bool - In case explicit hydrogens should be added. + In case explicit hydrogens should be added for all genreated molecules. _seed_mol : list[Chem.rdchem.Mol] The list of seed molecules. InitIndividual : :meth:`moldrug.utils.Individuals`