Name | ConservedWaterSearch JSON |
Version |
0.4.1
JSON |
| download |
home_page | None |
Summary | Conserved water search is a tool for finding conserved water molecules from MD trajectories. |
upload_time | 2024-05-11 01:35:20 |
maintainer | None |
docs_url | None |
author | Domagoj Fijan, Marko Jukic, Urban Bren |
requires_python | >=3.9 |
license | BSD 3-Clause License Copyright (c) 2022, Jelena Tosovic All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
simulation
analysis
molecular dynamics
biosimulation
conserved water
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
ConservedWaterSearch
====================
.. image:: https://readthedocs.org/projects/conservedwatersearch/badge/?version=latest
:target: https://conservedwatersearch.readthedocs.io/en/latest/?badge=latest
.. image:: https://badge.fury.io/py/conservedwatersearch.svg
:target: https://badge.fury.io/py/conservedwatersearch
.. image:: https://img.shields.io/conda/vn/conda-forge/conservedwatersearch.svg
:target: https://anaconda.org/conda-forge/conservedwatersearch
The ConservedWaterSearch (CWS) Python library uses density based clustering approach to detect conserved waters from simulation trajectories. First, positions of water molecules are determined based on clustering of oxygen atoms belonging to water molecules(see figure below for more information). Positions on water molecules can be determined using Multi Stage Re-Clustering (MSRC) approach or Single Clustering (SC) approach (see for more `information on clustering procedures <https://doi.org/10.1021/acs.jcim.2c00801>`_).
.. image:: https://raw.githubusercontent.com/JecaTosovic/ConservedWaterSearch/main/docs/source/figs/Scheme.png
:width: 700
Conserved water molecules can be classified into 3 distinct conserved water types based on their hydrogen orientation: Fully Conserved Waters (FCW), Half Conserved Waters (HCW) and Weakly Conserved Waters (WCW) - see figure below for examples and more information or see `CWS docs <https://conservedwatersearch.readthedocs.io/en/latest/conservedwaters.html>`_.
.. image:: https://raw.githubusercontent.com/JecaTosovic/ConservedWaterSearch/main/docs/source/figs/WaterTypes.png
:width: 700
Both, MSRC and SC can be used with either OPTICS (via `sklearn <https://scikit-learn.org/stable/modules/generated/sklearn.cluster.OPTICS.html>`_) and `HDBSCAN <https://hdbscan.readthedocs.io/en/latest/index.html>`_. MSRC approach using either of the two algorithms produces better quality results at the cost of computational time, while SC approach produces lowe quality results at a fraction of the computational cost.
Important links
===============
- `Documentation <https://conservedwatersearch.readthedocs.io/en/latest/>`_: hosted on Read The Docs
- `GitHub repository <https://github.com/JecaTosovic/ConservedWaterSearch>`_: source code/contribute code
- `Issue tracker <https://github.com/JecaTosovic/ConservedWaterSearch/issues>`_: Report issues/request features
Related Tools
=============
- `WaterNetworkAnalysis <https://github.com/JecaTosovic/WaterNetworkAnalysis>`_: prepare trajectories for identification of conserved water molecules.
Citation
========
See `this article <https://doi.org/10.1021/acs.jcim.2c00801>`_.
Installation
============
The easiest ways to install **ConservedWaterSearch** is to install it from conda-forge using :code:`conda`:
.. code:: bash
conda install -c conda-forge ConservedWaterSearch
CWS can also be installed from PyPI (using :code:`pip`). To install via :code:`pip` use:
.. code:: bash
pip install ConservedWaterSearch
Optional visualization dependencies
-----------------------------------
nglview can be installed from PyPI (:code:`pip`) or :code:`conda` or when installing CWS
through :code:`pip` by using :code:`pip install ConservedWaterSearch[nglview]`.
`PyMOL <https://PyMOL.org/2/>`_ is the recomended visualization tool for CWS and can be installed
only using :code:`conda` or from source. PyMOL is not available via PyPI
(:code:`pip`), but can be installed from conda-forge. If PyMOL is
already installed in your current ``python`` environment it can be used
with CWS. If not, the free (open-source) version can be installed from
`conda-forge <https://conda-forge.org/>`_ via :code:`conda` (or
:code:`mamba`):
.. code:: bash
conda install -c conda-forge pymol-open-source
and paid (licensed version) from schrodinger channel (see `here
<https://PyMOL.org/conda/>`_ for more details) via :code:`conda` (or
:code:`mamba`):
.. code:: bash
conda install -c conda-forge -c schrodinger pymol-bundle
Matplotlib is only required for analyzing of clustering and is useful
if default values of clustering parameters need to be fine-tuned (which
should be relatively rarely). You can install it from :code:`pip` or :code:`conda` or
when installing CWS through :code:`pip` by using :code:`pip install ConservedWaterSearch[matplotlib]`.
Both mpl and nglveiw can be installed when installing CWS by using:
.. code:: bash
pip install ConservedWaterSearch[all]
For more information see `installation <https://conservedwatersearch.readthedocs.io/en/latest/installation.html>`_.
Example
=======
The easiest way to use CWS is by calling :code:`WaterClustering` class. The starting trajectory should be aligned first, and coordinates of water oxygen and hydrogens extracted. See `WaterNetworkAnalysis <https://github.com/JecaTosovic/WaterNetworkAnalysis>`_ for more information and convenience functions.
.. code:: python
# imports
from ConservedWaterSearch.water_clustering import WaterClustering
from ConservedWaterSearch.utils import get_orientations_from_positions
# Number of snapshots
Nsnap = 20
# load some example - trajectory should be aligned prior to extraction of atom coordinates
Opos = np.loadtxt("tests/data/testdataO.dat")
Hpos = np.loadtxt("tests/data/testdataH.dat")
wc = WaterClustering(nsnaps=Nsnap)
wc.multi_stage_reclustering(*get_orientations_from_positions(Opos, Hpos))
print(wc.water_type)
# "aligned.pdb" should be the snapshot original trajectory was aligned to.
wc.visualise_pymol(aligned_protein = "aligned.pdb", output_file = "waters.pse")
.. image:: https://raw.githubusercontent.com/JecaTosovic/ConservedWaterSearch/main/docs/source/figs/Results.png
:width: 700
Sometimes users might want to explicitly classify conserved water molecules. A simple python code can be used to classify waters into categories given an array of 3D oxygen coordinates and their related relative hydrogen orientations:
.. code:: python
import ConservedWaterSearch.hydrogen_orientation as HO
# load some example
orientations = np.loadtxt("tests/data/conserved_sample_FCW.dat")
# Run classification
res = HO.hydrogen_orientation_analysis(
orientations,
)
# print the water type
print(res[0][2])
For more information on preprocessing trajectory data, please refer to the `WaterNetworkAnalysis <https://github.com/JecaTosovic/WaterNetworkAnalysis>`_.
Raw data
{
"_id": null,
"home_page": null,
"name": "ConservedWaterSearch",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "simulation, analysis, molecular dynamics, biosimulation, conserved water",
"author": "Domagoj Fijan, Marko Jukic, Urban Bren",
"author_email": "Jelena Tosovic <jecat_90@live.com>",
"download_url": "https://files.pythonhosted.org/packages/d4/09/9ab8d6877a01761ec62287dd41185df94149e2fe312aa4315876fe03743e/conservedwatersearch-0.4.1.tar.gz",
"platform": null,
"description": "ConservedWaterSearch\n====================\n.. image:: https://readthedocs.org/projects/conservedwatersearch/badge/?version=latest\n :target: https://conservedwatersearch.readthedocs.io/en/latest/?badge=latest\n.. image:: https://badge.fury.io/py/conservedwatersearch.svg\n :target: https://badge.fury.io/py/conservedwatersearch\n.. image:: https://img.shields.io/conda/vn/conda-forge/conservedwatersearch.svg\n :target: https://anaconda.org/conda-forge/conservedwatersearch\n\n\nThe ConservedWaterSearch (CWS) Python library uses density based clustering approach to detect conserved waters from simulation trajectories. First, positions of water molecules are determined based on clustering of oxygen atoms belonging to water molecules(see figure below for more information). Positions on water molecules can be determined using Multi Stage Re-Clustering (MSRC) approach or Single Clustering (SC) approach (see for more `information on clustering procedures <https://doi.org/10.1021/acs.jcim.2c00801>`_).\n\n.. image:: https://raw.githubusercontent.com/JecaTosovic/ConservedWaterSearch/main/docs/source/figs/Scheme.png\n :width: 700\n\nConserved water molecules can be classified into 3 distinct conserved water types based on their hydrogen orientation: Fully Conserved Waters (FCW), Half Conserved Waters (HCW) and Weakly Conserved Waters (WCW) - see figure below for examples and more information or see `CWS docs <https://conservedwatersearch.readthedocs.io/en/latest/conservedwaters.html>`_.\n\n.. image:: https://raw.githubusercontent.com/JecaTosovic/ConservedWaterSearch/main/docs/source/figs/WaterTypes.png\n :width: 700\n\nBoth, MSRC and SC can be used with either OPTICS (via `sklearn <https://scikit-learn.org/stable/modules/generated/sklearn.cluster.OPTICS.html>`_) and `HDBSCAN <https://hdbscan.readthedocs.io/en/latest/index.html>`_. MSRC approach using either of the two algorithms produces better quality results at the cost of computational time, while SC approach produces lowe quality results at a fraction of the computational cost.\n\nImportant links\n===============\n\t- `Documentation <https://conservedwatersearch.readthedocs.io/en/latest/>`_: hosted on Read The Docs\n\t- `GitHub repository <https://github.com/JecaTosovic/ConservedWaterSearch>`_: source code/contribute code\n\t- `Issue tracker <https://github.com/JecaTosovic/ConservedWaterSearch/issues>`_: Report issues/request features\n\nRelated Tools\n=============\n\t- `WaterNetworkAnalysis <https://github.com/JecaTosovic/WaterNetworkAnalysis>`_: prepare trajectories for identification of conserved water molecules.\n\nCitation\n========\nSee `this article <https://doi.org/10.1021/acs.jcim.2c00801>`_.\n\nInstallation\n============\nThe easiest ways to install **ConservedWaterSearch** is to install it from conda-forge using :code:`conda`:\n\n.. code:: bash\n\n conda install -c conda-forge ConservedWaterSearch\n\nCWS can also be installed from PyPI (using :code:`pip`). To install via :code:`pip` use:\n\n.. code:: bash\n\n pip install ConservedWaterSearch\n\nOptional visualization dependencies\n-----------------------------------\n\nnglview can be installed from PyPI (:code:`pip`) or :code:`conda` or when installing CWS\nthrough :code:`pip` by using :code:`pip install ConservedWaterSearch[nglview]`.\n`PyMOL <https://PyMOL.org/2/>`_ is the recomended visualization tool for CWS and can be installed\nonly using :code:`conda` or from source. PyMOL is not available via PyPI\n(:code:`pip`), but can be installed from conda-forge. If PyMOL is\nalready installed in your current ``python`` environment it can be used\nwith CWS. If not, the free (open-source) version can be installed from\n`conda-forge <https://conda-forge.org/>`_ via :code:`conda` (or\n:code:`mamba`):\n\n.. code:: bash\n\n conda install -c conda-forge pymol-open-source\n\nand paid (licensed version) from schrodinger channel (see `here\n<https://PyMOL.org/conda/>`_ for more details) via :code:`conda` (or\n:code:`mamba`):\n\n.. code:: bash\n\n conda install -c conda-forge -c schrodinger pymol-bundle\n\nMatplotlib is only required for analyzing of clustering and is useful\nif default values of clustering parameters need to be fine-tuned (which\nshould be relatively rarely). You can install it from :code:`pip` or :code:`conda` or\nwhen installing CWS through :code:`pip` by using :code:`pip install ConservedWaterSearch[matplotlib]`.\nBoth mpl and nglveiw can be installed when installing CWS by using:\n\n.. code:: bash\n\n pip install ConservedWaterSearch[all]\n\nFor more information see `installation <https://conservedwatersearch.readthedocs.io/en/latest/installation.html>`_.\n\nExample\n=======\nThe easiest way to use CWS is by calling :code:`WaterClustering` class. The starting trajectory should be aligned first, and coordinates of water oxygen and hydrogens extracted. See `WaterNetworkAnalysis <https://github.com/JecaTosovic/WaterNetworkAnalysis>`_ for more information and convenience functions.\n\n.. code:: python\n\n # imports\n from ConservedWaterSearch.water_clustering import WaterClustering\n from ConservedWaterSearch.utils import get_orientations_from_positions\n # Number of snapshots\n Nsnap = 20\n # load some example - trajectory should be aligned prior to extraction of atom coordinates\n Opos = np.loadtxt(\"tests/data/testdataO.dat\")\n Hpos = np.loadtxt(\"tests/data/testdataH.dat\")\n wc = WaterClustering(nsnaps=Nsnap)\n wc.multi_stage_reclustering(*get_orientations_from_positions(Opos, Hpos))\n print(wc.water_type)\n # \"aligned.pdb\" should be the snapshot original trajectory was aligned to.\n wc.visualise_pymol(aligned_protein = \"aligned.pdb\", output_file = \"waters.pse\")\n\n.. image:: https://raw.githubusercontent.com/JecaTosovic/ConservedWaterSearch/main/docs/source/figs/Results.png\n :width: 700\n\nSometimes users might want to explicitly classify conserved water molecules. A simple python code can be used to classify waters into categories given an array of 3D oxygen coordinates and their related relative hydrogen orientations:\n\n.. code:: python\n\n import ConservedWaterSearch.hydrogen_orientation as HO\n # load some example\n orientations = np.loadtxt(\"tests/data/conserved_sample_FCW.dat\")\n # Run classification\n res = HO.hydrogen_orientation_analysis(\n orientations,\n )\n # print the water type\n print(res[0][2])\n\n\nFor more information on preprocessing trajectory data, please refer to the `WaterNetworkAnalysis <https://github.com/JecaTosovic/WaterNetworkAnalysis>`_.\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License Copyright (c) 2022, Jelena Tosovic All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
"summary": "Conserved water search is a tool for finding conserved water molecules from MD trajectories.",
"version": "0.4.1",
"project_urls": {
"Documentation": "https://ConservedWaterSearch.readthedocs.io/",
"Homepage": "https://github.com/JecaTosovic/ConservedWaterSearch",
"Issue": "https://github.com/JecaTosovic/ConservedWaterSearch/issues",
"Source": "https://github.com/JecaTosovic/ConservedWaterSearch"
},
"split_keywords": [
"simulation",
" analysis",
" molecular dynamics",
" biosimulation",
" conserved water"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1e421376bfc7a63514a848920261d3ebcab998da9d8068460643019e40dab48c",
"md5": "0268043103b86c4a24eaa54d8f5963d7",
"sha256": "326e2fd2b064e98d5f0faa4c5c3f3c72e0bc46ab0fda126bc38aa23b8b45a72e"
},
"downloads": -1,
"filename": "ConservedWaterSearch-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0268043103b86c4a24eaa54d8f5963d7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 30772,
"upload_time": "2024-05-11T01:35:19",
"upload_time_iso_8601": "2024-05-11T01:35:19.345226Z",
"url": "https://files.pythonhosted.org/packages/1e/42/1376bfc7a63514a848920261d3ebcab998da9d8068460643019e40dab48c/ConservedWaterSearch-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d4099ab8d6877a01761ec62287dd41185df94149e2fe312aa4315876fe03743e",
"md5": "886a6a052cce5ead967a5e53bed55752",
"sha256": "97abe3dd122e57ce2496ba897e25e4f27f31ed383631c0d138db58905b1a31bc"
},
"downloads": -1,
"filename": "conservedwatersearch-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "886a6a052cce5ead967a5e53bed55752",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 32422,
"upload_time": "2024-05-11T01:35:20",
"upload_time_iso_8601": "2024-05-11T01:35:20.579462Z",
"url": "https://files.pythonhosted.org/packages/d4/09/9ab8d6877a01761ec62287dd41185df94149e2fe312aa4315876fe03743e/conservedwatersearch-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-11 01:35:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JecaTosovic",
"github_project": "ConservedWaterSearch",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "conservedwatersearch"
}