markovmodel / PyEMMA

🚂 Python API for Emma's Markov Model Algorithms 🚂
http://pyemma.org
GNU Lesser General Public License v3.0
307 stars 118 forks source link

issue loading dcd file with pyemma.coordinates.load #1427

Closed wemd closed 5 years ago

wemd commented 5 years ago

Hello

I have no problem uploading a *dcd traj using mdtraj:

file = md.load_dcd('../protein_traj_p750mV_pbc-ali.dcd', top='../protein_ref.pdb', stride=1) print(file) <mdtraj.Trajectory with 16000 frames, 29672 atoms, 1860 residues, and unitcells>

However, I have an issue when calling the trajectory using pyemma.coordinates.load:

ValueError Traceback (most recent call last)

in 2 torsions_feat = pyemma.coordinates.featurizer(pdb) 3 torsions_feat.add_backbone_torsions(cossin=True, periodic=False) ----> 4 torsions_data = pyemma.coordinates.load(file, features=torsions_feat) 5 labels = ['backbone\ntorsions'] ~/Software/anaconda3/lib/python3.7/site-packages/pyemma/coordinates/api.py in load(trajfiles, features, top, stride, chunksize, **kw) 248 return trajs 249 else: --> 250 raise ValueError('unsupported type (%s) of input' % type(trajfiles)) 251 252 ValueError: unsupported type () of input

I'll appreciate any help! Thanks in advance wmiranda

OS: Ubuntu 18.04.2 LTS, 64-bit PyEMMA v2.5.6 pip_list.txt

clonker commented 5 years ago

Hi, this is because pyemma.coordinates.load(...) expects a filename, not the mdtraj trajectory object. Try calling load('../protein_traj_p750mV_pbc-ali.dcd', top='../protein_ref.pdb').

wemd commented 5 years ago

Many thanks!