Open vsheg opened 2 years ago
Hi @vsheg , Thanks for using taurenmd
!
If you installed taurenmd
from pip
both MDAnalysis v2
and mdtraj
should be installed.
taurenmd
tries to load the topology
and the trajectory
first with mdanalysis
and only if it can't, taurenmd
attempts reading the topology with openmm
and passing it to mdanalysis
universe creation. The conversion itself by trajedit
will always use mdanalysis
. If you say the mdanalysis
reads Amber files by default, we may need to investigate the error further. If you can give me some dummy Amber topology and traj that I can test locally would be great.
Otherwise, for now, you can try to install all dependencies using Anaconda and installing on top just the taurenmd
python code:
git clone https://github.com/joaomcteixeira/taurenmd
cd taurenmd
conda create -n taurenmd python=3.8
conda env update -n taurenmd --file requirements-dev.yml
python setup.py develop --no-deps
This should work. Otherwise, let me know. Many improvements will be done after #60. Looking forward to merging that pull request in the following days. After that PR, I will also review/update the installation instructions.
If you want to look further into the code to try to solve the problem yourself and make a PRs the function that reads the trajectories is here:
Thanks for your reply. I don't think I'm able to look at the PR or code in a meaningful way. I just write an instruction on how to reproduce this behavior. I hope it will be useful. This archive taurenmd-test.zip contains all needed files.
I tried to create a new Python environment with Poetry
(it's just a wrapper for pip
)
$ poetry init # init Poetry environment
<...>
$ poetry env use 3.9 # specify Python version to use
$ poetry add taurenmd # MDAnalysis won't be installed
$ poetry add MDAnalysis # add it explicitly
$ poetry update # update environment (not necessary, I guess)
$ poetry shell # activate the environment
# try to convert
$ taurenmd trajedit trpzip2.ff10.mbondi.parm7 trpzip2.gb.nc -d traj.dcd
<...>
ModuleNotFoundError: No module named 'mdtraj'
To install this environment, just unpack the attached archive and then
$ cd taurenmd-test
$ poetry install # install environment and dependencies
$ poetry shell # activate environment
(Poetry
can be installed with pip3 install poetry
)
In the archive :
pyproject.toml
and poetry.lock
are generated by Poetry
trpzip2.ff10.mbondi.parm7
and trpzip2.gb.nc
are taken from the Amber documentationmda.py
is a Python script that converts .nc
to .dcd
using pure MDAnalysis
pure-mda.dcd
is a result of
$ python3 mda.py
Hello, I've installed
taurenmd
via pip and I've tried to convert.nc
trajectory to the.dcd
format. I know, thatMDAnalysis
is capable of doing it natively, but when I try to do this withtaurenmd
:I see
and then, after installation of
mdtraj
:How I can use
taurenmd
to convert trajectory withoutmdtraj
,simtk.openmm
, etc., using onlyMDAnalysis
? Thanks for your attention