msmbuilder / msmbuilder-legacy

Legacy release of MSMBuilder
http://msmbuilder.org
GNU General Public License v2.0
25 stars 28 forks source link

Empty traj issue (msmb2.8 branch) #287

Closed kyleabeauchamp closed 10 years ago

kyleabeauchamp commented 10 years ago
In [29]: p1.empty_traj()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-29-cd370c33514b> in <module>()
----> 1 p1.empty_traj()

/home/kyleb/opt/lib/python2.7/site-packages/msmbuilder-2.8-py2.7-linux-x86_64.egg/msmbuilder/project/project.pyc in empty_traj(self)
    430     def empty_traj(self):
    431         traj = self.load_conf()
--> 432         traj.xyz = None
    433         return traj
    434 

/home/kyleb/opt/lib/python2.7/site-packages/mdtraj-0.5.1-py2.7-linux-x86_64.egg/mdtraj/trajectory.pyc in xyz(self, value)
    704 
    705         value = ensure_type(value, np.float32, 3, 'xyz', shape=shape,
--> 706                             warn_on_cast=False, add_newaxis_on_deficient_ndim=True)
    707         self._xyz = value
    708         self._rmsd_traces = None

/home/kyleb/opt/lib/python2.7/site-packages/mdtraj-0.5.1-py2.7-linux-x86_64.egg/mdtraj/utils/arrays.pyc in ensure_type(val, dtype, ndim, name, length, can_be_none, shape, warn_on_cast, add_newaxis_on_deficient_ndim)
    100         else:
    101             raise TypeError(("%s must be numpy array. "
--> 102                 " You supplied type %s" % (name, type(val))))
    103 
    104     if warn_on_cast and val.dtype != dtype:

TypeError: xyz must be numpy array.  You supplied type <type 'NoneType'>
rmcgibbo commented 10 years ago

This is committed now.