Skip to main content

Set of tools for input preparation for conserved water search from MD trajectories (gromacs, amber) and their analysis

Project description

WaterNetworkAnalysis

https://readthedocs.org/projects/waternetworkanalysis/badge/?version=latest https://badge.fury.io/py/WaterNetworkAnalysis.svg https://img.shields.io/conda/vn/conda-forge/waternetworkanalysis.svg

The WaterNetworkAnalysis (WNA) Python package serves as a set of tools for input preparation and further analysis for ConservedWaterSearch (CWS) python package which identifies conserved water molecules from Molecular Dynamics (MD) trajectories.

https://raw.githubusercontent.com/JecaTosovic/WaterNetworkAnalysis/master/docs/source/figs/Scheme.png

Citation

For citations and more infromation see ConservedWaterSearch citation.

Installation of the Python package

The easiest ways to install WaterNetworkAnalysis is using conda from conda-forge:

conda install -c conda-forge WaterNetworkAnalysis

Alternatively, WNA is also available on PyPi via pip:

pip install WaterNetworkAnalysis

Pymol is an optional dependency for visualisation and is not present on PyPi, however WNA can be installed and used without it (bar pymol visualisation features). Pymol can be installed using conda:

conda install -c conda-forge pymol-open-source

For more information on CWS dependencies also see CWS installation guide.

Installation of the PyMOL plugin

See documentation for detailed instructions.

Known Issues with dependencies

AttributeError: 'super' object has no attribute '_ipython_display_' Some versions of Jupyter notebook are incpompatible with ipython (see here). To resolve install version of ipywidgets<8 using conda:

conda install "ipywidgets <8" -c conda-forge

or pip:

pip install ipywidgets==7.6.0

Example

The following example shows how to use WaterNetworkAnalysis to prepare a MD trajectory and analyse the results for determination of conserved water networks.

from WaterNetworkAnalysis import align_trajectory
from WaterNetworkAnalysis import get_center_of_selection
from WaterNetworkAnalysis import get_selection_string_from_resnums
from WaterNetworkAnalysis import extract_waters_from_trajectory
from ConservedWaterSearch.water_clustering import WaterClustering
from ConservedWaterSearch.utils import get_orientations_from_positions

# MD trajectory filename
trajectory="md.xtc"
# topology filename
topology="md.gro"
# aligned trajectory filename
alignedtrj = "aligned_trj.xtc"
# aligned snapshot filename
aligned_snap = "aligned.pdb"
# distance to select water molecules around
distance = 12.0
# align the trajectory and save the alignment reference configuration
align_trajectory(
    trajectory=trajectory,
    topology=topology,
    align_target_file_name=aligned_snap,
    output_trj_file=alignedtrj,
)
# define active site by aminoacid residue numbers
active_site_resnums = [111, 112, 113, 122, 133, 138, 139, 142, 143, 157, 166, 167, 169, 170, 203, 231, 232, 238]
# find centre of the active site in aligned trajectory
selection_centre = get_center_of_selection(
    get_selection_string_from_resnums(active_site_resnums),
    trajectory=alignedtrj,
    topology=topology,
)
# extract water coordinates of interest around selection centre
coordO, coordH =  extract_waters_from_trajectory(
    trajectory=alignedtrj,
    topology=topology,
    selection_center=selection_centre,
    dist=distance
)
# start the clustering procedure
Nsnaps = 200
WC=WaterClustering(nsnaps=Nsnaps)
# perform multi stage reclustering
WC.multi_stage_reclustering(*get_orientations_from_positions(coordO,coordH))
# visualise results with pymol
WC.visualise_pymol(aligned_snap, active_site_ids=active_site_resnums, dist=distance)
https://raw.githubusercontent.com/JecaTosovic/WaterNetworkAnalysis/master/docs/source/figs/Results.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waternetworkanalysis-0.5.1.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waternetworkanalysis-0.5.1-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file waternetworkanalysis-0.5.1.tar.gz.

File metadata

  • Download URL: waternetworkanalysis-0.5.1.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for waternetworkanalysis-0.5.1.tar.gz
Algorithm Hash digest
SHA256 0f4458b3f2c8f066e0c8a5436a0fd1e585e94041e80fc70469eb1d142139e97a
MD5 7e282c9634adeda363b2f2b31a89aaaf
BLAKE2b-256 c71f8094ef9dd6946e95576da4c5baba8ad9b4705b77c60e5d5c2f8b29a46f25

See more details on using hashes here.

File details

Details for the file waternetworkanalysis-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for waternetworkanalysis-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ef40cfc740efd54b7b6a08b5d45b3b314bc72c170d71140a94c82749616fc5d
MD5 51f59c54cd561604c1e148a9b6ad1b8a
BLAKE2b-256 03ce618f238fcde2d795cad47648b0f057746ffc34f250191e285c29f353e54d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page