Giter VIP home page Giter VIP logo

taurenmd's Introduction

taurenmd

https://raw.githubusercontent.com/joaomcteixeira/taurenmd/master/docs/img/taurenmd_logo_black_readme.png

PyPI Package latest release joss Zenodo Test Status Read the Docs (latest) Codecov master branch Code Climate Code Climate technical debt PyPI Wheel Supported versions PyPI - Downloads

A command-line interface for analysis routines of Molecular Dynamics data.

Taurenmd provides an easy, flexible and extensible, command-line interface for the most common (and not so common) routines of analysis and representation of Molecular Dynamics (MD) data.

It bridges the gap between the highly complex (and powerful) Python libraries available for analysis of MD data and the non-developer users that lack the programming skills to perform a thorough and proficient use those libraries. But not only, taurenmd also facilitates high throughput operations, even to those proficient devs, because complex executions are reduced to single argument-rich command-lines that can be concatenated or aliased.

Taurenmd wraps around feature-rich and powerful MD analysis libraries such as MDAnalysis and MDTraj (but not only), combining them to extract the best of those worlds. We use these libraries to access and extract MD data and calculate observables, and we have also added our own routines of analysis when needed. When using this software, you should cite taurenmd together with the dependencies used, please read our Citing page for a detailed explanation.

Though designed to perform as a command-line user-directed interface, all taurenmd's core functions are openly distributed and documented. Currently, there are already several command-line interfaces available, some that perform only single tasks, while others allow complex setups, all are one-liners.

With this said, taurenmd aims to be a flexible and extensible peace of software, built as simple and modular as we can think of, to agile the incorporation of new functionalities as needed.

Documentation

taurenmd's full documentation is available at: https://taurenmd.readthedocs.io, read there:

  1. how to install
  2. usage examples
  3. citing
  4. etc...

taurenmd's People

Contributors

joaomcteixeira avatar

Stargazers

Miquel Canyelles Niño avatar  avatar japeto avatar  avatar Andreas Thum avatar Vsevolod Shegolev avatar  avatar  avatar

Watchers

 avatar

taurenmd's Issues

[FEATURE] Update tox.ini

Update tox.ini so that py37 and check can receive posargs in the form of tox -e check -- {posargs}.

JOSS-review: comments about the paper

taurenmd is deployed in the Python ecosystem and is available for direct download at PyPI
(https://pypi.org/project/taurenmd/):
$ pip3 install taurenmd[all]

Given the issues with Anaconda/PyPi dependencies, I would refrain from giving the installation command directly in the paper, and rather point users to the documentation for this.

I also think that taurenmd would benefit from being also distributed as a conda package as well as a pip one. I personally prefer not to mix conda-managed packages with pip ones; as you can realise from the issues I've been opening =) Since Python package management is such a mess, I prefer to keep two separated package trees to keep it under control.

Whenever I see a package telling me to install it with pip, I assume it works fully on PyPi, with no dependencies on conda universe; and inversely. I am sure some future users of taurenmd will make the same distinction.

State of the field: Do the authors describe how this software compares to other commonly-used packages?

I did not find such comparison in the paper, in particular to the gmx family of tools distributed with GROMACS (I guess taurenmd would be easier to extend but slower/available on less platforms); pytraj (https://github.com/Amber-MD/pytraj); or graphical interface tools such as the analysis plugins of VMD, PyMol, Chimera.

Since taurenmd seems to be targeted at non-programmers, I think a justification of its use case compared to GUI tools is needed, since a command line tool is less beginner-friendly than a GUI. In particular, MDAnalysis seems to be usable within PyMol directly.

[DOCUMENTATION] Installation using Pipenv on ArchLinux

I was able to install taurenmd on using pipenv. I use ArchLinux:
archlinux

These are the steps that I followed:
After installing and activating pipenv, I first had to install the dependencies MDAnalysis, MDTraj and OpenMM myself:
pipenv install mdanalysis mdtraj openmm
Then I installed taurenmd:
pipenv install taurenmd

taurenmd now runs in the pipenv shell:
pipenv shell
taurenmd
taurenmd

[BUG] Broken installation with Anaconda

Describe the bug

Trying to install taurenmd using the Anaconda method outlined in the documentation, I get the following error:

$ taurenmd
Traceback (most recent call last):
  File "/usr/local/bin/taurenmd", line 5, in <module>
    from taurenmd.cli import maincli
  File "/usr/local/lib/python3.7/site-packages/taurenmd/cli.py", line 85, in <module>
    import taurenmd.cli_distances as cli_dist
  File "/usr/local/lib/python3.7/site-packages/taurenmd/cli_distances.py", line 48, in <module>
    from taurenmd.libs import libcli, libio, libmda, libplot  # noqa: F401
  File "/usr/local/lib/python3.7/site-packages/taurenmd/libs/libmda.py", line 14, in <module>
    import MDAnalysis as mda
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/__init__.py", line 194, in <module>
    from .lib import log
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/lib/__init__.py", line 40, in <module>
    from . import NeighborSearch
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/lib/NeighborSearch.py", line 37, in <module>
    from MDAnalysis.core.groups import AtomGroup, Atom
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/core/__init__.py", line 58, in <module>
    from . import AtomGroup
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/core/AtomGroup.py", line 28, in <module>
    from . import universe
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/core/universe.py", line 101, in <module>
    from .topology import Topology
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/core/topology.py", line 64, in <module>
    from .topologyattrs import Atomindices, Resindices, Segindices
  File "/Users/guillaume/code/mdanalysis/package/MDAnalysis/core/topologyattrs.py", line 38, in <module>
    import Bio.Seq
ModuleNotFoundError: No module named 'Bio'

To Reproduce

$ curl https://raw.githubusercontent.com/joaomcteixeira/taurenmd/master/requirements.yml -o taurenmdenv.yml
$ conda env create -f taurenmdenv.yml
$ conda activate taurenmd
# this was an error
$ pip install taurenmd
zsh: command not found: pip
# so I used this one
$ pip3 install taurenmd
$ taurenmd
# the above error

Additional context

I am running miniconda instead of a full anaconda distribution, not sure if that changes anything.


My guess is that there is a missing dependency in the PyPI package, or a missing conditional import.

[FEATURE] Distances should be able to do periodic boundaries

The distance calculations don't seem to be able to handle periodic boundaries, they probably should. Even with a centered and sane configuration, linalg.norm isn't going to give the minimum distance between two centers. One way of doing this would be mda.lib.distances.distance_array or mda.lib.distances.calc_bonds which will take a unitcell (box=) to given a minimum distance between two centers.

Maybe less importantly, calling center_of_geometry() isn't always going to give the real center if the atoms are split over a periodic boundary, eg if the atoms were all forced to be within the primary unit cell and the residue was bridging a box boundary.

[QUESTION] Can't convert Amber's trajectories with `MDAnalysis`

Hello, I've installed taurenmd via pip and I've tried to convert .nc trajectory to the .dcd format. I know, that MDAnalysis is capable of doing it natively, but when I try to do this with taurenmd:

$ taurenmd trajedit top.prmtop traj.nc -d traj.dcd

I see

ModuleNotFoundError: No module named 'mdtraj'

and then, after installation of mdtraj:

ModuleNotFoundError: No module named 'simtk.openmm'

How I can use taurenmd to convert trajectory without mdtraj, simtk.openmm , etc., using only MDAnalysis? Thanks for your attention

Solve this deprecation with openmm

· taurenmd report ../Floudas_noSol_complete_frame0.pdb Floudas_noSol_aDNA.xtc Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.

appendable logs

Log files restart every taurenmd run, therefore if we are working on a folder calling the API several times the log file will be overwritten at every run.

  • make an cmd option to allow appendable logs
  • make it such that if a log file already exists, it does not get overwritten. For example, creating consecutive logs: .taurenmd.log.1, .taurenmd.log.2, etc..

[DOCUMENTATION] test errors while going through contribution guideline

I am trying to follow https://taurenmd.readthedocs.io/en/latest/contributing.html#code-development, and I got a few errors while running tox:

  • ERROR: py36: InterpreterNotFound: python3.6: would there be a way to automatically check if python 3.6 is installed instead of erroring if it can not be found?
  • error related to missing dependencies, they should perhaps be added to tox.ini
___________________________________________________________________________________ ERROR collecting tests/test_clis.py ____________________________________________________________________________________
ImportError while importing test module '/Users/guillaume/code/tests/taurenmd/tests/test_clis.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py37/lib/python3.7/site-packages/_pytest/python.py:511: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
.tox/py37/lib/python3.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
.tox/py37/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:152: in exec_module
    exec(co, module.__dict__)
tests/test_clis.py:12: in <module>
    from taurenmd import __main__ as main_module
.tox/py37/lib/python3.7/site-packages/taurenmd/__main__.py:10: in <module>
    from taurenmd.cli import maincli
.tox/py37/lib/python3.7/site-packages/taurenmd/cli.py:86: in <module>
    from taurenmd import cli_distances as cli_dist
.tox/py37/lib/python3.7/site-packages/taurenmd/cli_distances.py:49: in <module>
    from taurenmd.libs import libcli, libio, libmda, libplot  # noqa: F401
.tox/py37/lib/python3.7/site-packages/taurenmd/libs/libmda.py:14: in <module>
    import MDAnalysis as mda
E   ModuleNotFoundError: No module named 'MDAnalysis'
__________________________________________________________________________________ ERROR collecting tests/test_libcalc.py __________________________________________________________________________________
ImportError while importing test module '/Users/guillaume/code/tests/taurenmd/tests/test_libcalc.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py37/lib/python3.7/site-packages/_pytest/python.py:511: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
.tox/py37/lib/python3.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
.tox/py37/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:152: in exec_module
    exec(co, module.__dict__)
tests/test_libcalc.py:2: in <module>
    import MDAnalysis as mda
E   ModuleNotFoundError: No module named 'MDAnalysis'
__________________________________________________________________________________ ERROR collecting tests/test_libmda.py ___________________________________________________________________________________
ImportError while importing test module '/Users/guillaume/code/tests/taurenmd/tests/test_libmda.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py37/lib/python3.7/site-packages/_pytest/python.py:511: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
.tox/py37/lib/python3.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
.tox/py37/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:152: in exec_module
    exec(co, module.__dict__)
tests/test_libmda.py:4: in <module>
    import MDAnalysis as mda
E   ModuleNotFoundError: No module named 'MDAnalysis'
__________________________________________________________________________________ ERROR collecting tests/test_libmdt.py ___________________________________________________________________________________
ImportError while importing test module '/Users/guillaume/code/tests/taurenmd/tests/test_libmdt.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py37/lib/python3.7/site-packages/_pytest/python.py:511: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
.tox/py37/lib/python3.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
.tox/py37/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:152: in exec_module
    exec(co, module.__dict__)
tests/test_libmdt.py:2: in <module>
    import mdtraj as md
E   ModuleNotFoundError: No module named 'mdtraj'

[BUG] `pip3 install taurenmd[all]` fails with zsh

I am using zsh as my main shell, not bash. I think it tries to interpret [ and ] as some sort of regex, meaning I get the following error

$ pip3 install taurenmd[all]
zsh: no matches found: taurenmd[all]

A simple fix is pip3 install "taurenmd[all]" (with quotes), which should also work with bash and other shells, so you may want to update the corresponding documentation.

[BUG] Progress bar for `fext` only prints upon completion

Describe the bug
When extracting trajectories with fext the progress bar only prints upon completion. Seen when trying to extract frames from multiple .dcd trajectories. Also minor bug (typo) with "writen" should be "written" on the second last line in the Output section.

To Reproduce
Steps to reproduce the behavior:
taurenmd fext asyn_desres_a99sbdisp.pdb pnas2018b-asyn-a99SBdisp-protein*.dcd -p 29 --odir asynN1000ran/
Please see DropBox for required files: https://www.dropbox.com/s/oogxt8ezcaqwvqk/asyn_desres_pnas2018b.tar.xz?dl=0

Expected behavior
As taurenmd processes and extracts each frame, it's expected for the progress bar to increment by 1 upon completion.

Output

Starting...
    loading trajectory(ies): (Path('pnas2018b-asyn-a99SBdisp-protein-0000.dcd'),
 Path('pnas2018b-asyn-a99SBdisp-protein-0001.dcd'),
 Path('pnas2018b-asyn-a99SBdisp-protein-0002.dcd'))
    with topology: asyn_desres_a99sbdisp.pdb

* Reporting On Universe ...
    number of frames: 29977
    duration: 0.49 ns
    timestep per frame: 0.00 ns
    number of atoms: 2017
    components:
    segid C1 with 140 residues from 1 to 140

* Creating Trajectory Frame Slicing From: ...
    start: None
    stop : None
    step : 29
29.0  0.04888821
    slicing: None:None:29
    created slice: slice(None, None, 29)
    extracting 1034 frames
 |-----------------------------------------------------------------| 0.0% 0/1034 frames    writen frame 29957, to frame_29957.pdb
 |-----------------------------------------------------------------| 0.1% 1/1034 frames

Additional context
N/A

Version
Current running version: 0.11.2

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.