Git Product home page Git Product logo

dynophores's Introduction

Dynophores

GitHub Actions Build Status codecov Documentation Status Conda Version License

Dynamic pharmacophore modeling of molecular interactions

OpenCADD

Dynophores are an intuitive tool to explore the dynamics of molecular interactions between a macromolecule and a ligand throughout an MD simulation.

A dynophore is a collection of so-called superfeatures. A superfeature is defined as a pharmacophore feature on ligand site (defined by a feature type, e.g. HBA, and one or more ligand atom numbers/serials) that occurs at least once during an MD simulation. A superfeature can have one or more interaction partner(s) on macromolecule-side. These interaction partners are called environmental partners. Superfeatures and their environmental partners are monitored throughout an MD simulation.

Documentation

The documentation is available here, including installation instructions

Overview

This Python library offers visualization schemes for dynophore data generated with the DynophoreApp in a single Jupyter Notebook (template dynophore notebook).

  • 3D view of the dynophore's point clouds (one cloud per superfeature) using nglview allows easy visual inspection of the dynamic macromolecule-ligand interactions. Point clouds are rendered alongside the topology and (optionally) the trajectory underlying the dynophore. See details in this tutorial on 3D views.
  • Statistics cover the occurrence of superfeatures and their environmental partners as well as distances between them. See details in this tutorial on plotting options.
  • Dynophore data can be further analyzed conveniently right there in the same notebook by working with the Dynophore class. See details in this tutorial on the dynophore data structure.

License

dynophores is a free software and is licensed under the MIT license. Copyright (c) 2020, Wolber Lab.

Acknowledgements

Project based on the Computational Molecular Science Python Cookiecutter version 1.3.

dynophores's People

Contributors

dominiquesydow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dynophores's Issues

Enable CLI tests in CI

  • [Question] Make CLI unit tests work (somehow they are not run in GHA but locally); check missing lines in cli.py
  • [Question] Unit tests for CLI: capture the standard output (if there's any) and check that it contains substrings that are only present in a successful execution (and in reverse) > How to do this?

Open tasks for v1.0.0

core infrastructure

  • Add Ligand class - see #21
  • Use superfeature colors as defined in dynophore-0.2 output instead of hard-coded feature colors in definitions; update plots/nglview accordingly - see #22
  • Use Ligand as Dynophore attribute? If ligand PDB block were part of JSON/PML files, that would be fantastic! #31

Plots (static/interactive)

  • Interactive plots: Too slow for 20k frames. Optimize.
  • Plots: Heatmap: Add x/y labels
  • Add slider for frame range (min/max)
  • Add % to plot labels / legends
  • Use matplotlib.pyplot.eventplot for occurrence plots instead of simple dot plots... - see #23
  • Interactive plots: Also select envpartners (depending on superfeature)? > Set minimum percentage cutoff to filter out low-coverage envpartners and superfeatures - see #23
  • [TBD] Distance plots: Add distance cutoffs or interaction on/off - see #35
    • [Medium] Add marker for feature cutoffs (needs feature definitions added to pml file)
    • [Minor] Or add widget that toggles between "all frames" and "only frames where superfeature occurs"
    • Distance line plot: Add interaction-relevant distances as dots on-top
    • Distance histogram: Plot interaction-relevant distances only
  • [Minor] Add tick to collapse envpartners with same residue/different atoms for one superfeature (e.g. ASP 89) - see #36

3D viz

  • Feature clouds by superfeature ID? At the moment, pml only contains H-123344123124 IDs - can we add H[1234, 1235, ...] to pml?
  • Check if dcd file has appropriate number of frames (e.g. 1000 frames) > For 20k frames this was not a problem in the Jupyter Notebook
  • Add interpolation to nglview trajectory > Added nglview.player.TrajectoryPlayer(view) to notebooks.
  • Add frame index to points in PML?
  • [Minor] Add pocket residue side chains: We do not have all pocket residues in PML/JSON output but we can add to each superfeature the environmental partners. #28
  • [Major] Temporal resolution of dynophore clouds (use point frame index) - see #32

2D viz

  • 2D viz: Add 2D ligand view with highlighted features, as done in KinFragLib - see #17

CLI

  • Make dcd optional!
  • Add dynoviz demo

Package

  • Make package conda-installable (help from Jaime)
  • Make raise_keyerror_if_invalid_superfeature_name private!!

Documentation

Improve 2D ligand view

The viz.view2d module contains a first version of the 2D view of the structure-bound ligand with highlighted superfeatures. Added in PR #17.

In case, we toggle on the atom serial numbers, the visualization does not look so nice at the moment.
image

For later version, come back to improve this.

Update documentation

  • Comment on static figure save (to produce HR figure files) #53
  • Comment on bin size (expose this as method argument?)
  • Update installation (we have conda package now!)

Open tech tasks for v1.0.0

Technical TODOs for v1.0.0

Python package

  • [Minor] Move to @wolberlab https://github.com/wolberlab: #45
  • [Minor] Update installing (once conda-installable) + add Jupyter extensions (not installable via yml)
    • jupyter labextension install @jupyter-widgets/jupyterlab-manager nglview-js-widgets @jupyterlab/toc
    • Is this still necessary? Via dynophore conda installation, this was not needed... Double check with test user.

DynophoreApp

  • Remove README from output folder
  • Installers without date, only version?

Can't run dynoviz (OSError: 'seaborn' is not a valid package style)

Hi,

I just installed dynophores using conda.

When running dynoviz -h I get the following error message:

Traceback (most recent call last):
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/style/core.py", line 137, in use
style = _rc_params_in_file(style)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/init.py", line 866, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/init.py", line 843, in _open_file_or_url
with open(fname, encoding='utf-8') as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'seaborn'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/bmc/miniconda3/envs/dyno/bin/dynoviz", line 6, in
from dynophores.cli import main
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/init.py", line 8, in
from .viz import plot, view2d, view3d
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/viz/plot/init.py", line 6, in
from . import static
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/dynophores/viz/plot/static.py", line 13, in
plt.style.use("seaborn")
File "/home/bmc/miniconda3/envs/dyno/lib/python3.12/site-packages/matplotlib/style/core.py", line 139, in use
raise OSError(
OSError: 'seaborn' is not a valid package style, path of style file, URL of style file, or library style name (library styles are listed in style.available)

System: Ubuntu 22.04.4 LTS

Thanks for helping me resolve this issue this issue!

More documention in dynophore Jupyter notebook

Add more documentation in dynophore notebook

  • For 3D view, add all args explicitly and explain them in Markdown cell above
  • Give a short intro for each plot type, what kind of data is shown and what options for visualization are given

Prettify notebook plots

Prettify notebook plots

  • Check figure.max_open_warning for environmental barcode plots
  • Try to reproduce error in environmental barcode plots when ticking "Collapse" in certain settings
  • Heatmap: Do not allow 1e+02 numbers
  • Remove (fig, ax) prints below plots in notebooks (left-over TODO from #33)
    • jupyter-widgets/ipywidgets#712
    • Example: In notebook, between widget and plot:
      (<Figure size 576x396 with 2 Axes>,
       <AxesSubplot:xlabel='Superfeature IDs', ylabel='Environmental partner IDs'>)
      

Input Data

Hello,

Can I ask how the input files for dynophores, like 1KE7_dynophore.json, 1KE7_dynophore.cgo, etc , are generated? Thank you!

Move repo to wolberlab organization

Description

Move repo to @wolberlab: https://github.com/wolberlab

Todos

Broken notebooks using ipywidget -> nglview (`AttributeError`)

Our weekly CI failed. All notebooks using ipywidgets are broken with new version 8; affects e.g. nglview.

Error message:
AttributeError: 'super' object has no attribute '_ipython_display_'

See discussions here:
nglviewer/nglview#1032
jupyter-widgets/ipywidgets#3552

Solution for now:
Pin ipywidgets to version 7, see nglviewer/nglview#1033.

https://github.com/volkamerlab/teachopencadd/blob/daeb016bb89feb93813be925085aff47885225ce/devtools/test_env.yml#L11

Link CodeCov to wolberlab/dynophores repo

Transfer from https://codecov.io/gh/dominiquesydow/dynophores/branch/master to https://codecov.io/gh/wolberlab/dynophores/branch/master may not work out-of-the-box.

Check if URL works after first CI pass on master on wolberlab/dynophores > No.

--

CI triggers CodeCov:

- name: CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}

CI fails:
https://github.com/wolberlab/dynophores/runs/3653565981?check_suite_focus=true#step:8:49

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.