radical-collaboration / extasy-grlsd

Repository to hold the input data and scripts for the ExTASY gromacs-lsdmap work
1 stars 1 forks source link

koopman error #77

Closed euhruska closed 6 years ago

euhruska commented 6 years ago
from pyemma._ext.variational.solvers.direct import spd_eig
sm, Vm = spd_eig(coo)

leads to one negative value sm = array([ 1.90963508, 1.72242421, 1.18440072, -1.16845181]) and fatal error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/coordinates/api.py", line 1261, in tica
    res.estimate(data, chunksize=cs)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/coordinates/transform/tica.py", line 159, in estimate
    return super(TICA, self).estimate(X, **kwargs)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/coordinates/data/_base/transformer.py", line 216, in estimate
    super(StreamingEstimationTransformer, self).estimate(X, **kwargs)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/coordinates/data/_base/streaming_estimator.py", line 45, in estimate
    super(StreamingEstimator, self).estimate(X, **kwargs)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/_base/estimator.py", line 415, in estimate
    self._model = self._estimate(X)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/coordinates/transform/tica.py", line 210, in _estimate
    self._diagonalize()
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/coordinates/transform/tica.py", line 218, in _diagonalize
    eigenvalues, eigenvectors = eig_corr(self.cov, self.cov_tau, self.epsilon, sign_maxelement=True)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/pyemma/_ext/variational/solvers/direct.py", line 278, in eig_corr
    l, R_trans = eigh(Ct_trans)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/scipy/linalg/decomp.py", line 374, in eigh
    a1 = _asarray_validated(a, check_finite=check_finite)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/scipy/_lib/_util.py", line 238, in _asarray_validated
    a = toarray(a)
  File "/scratch1/eh22/conda/envs/extasy11/lib/python2.7/site-packages/numpy/lib/function_base.py", line 461, in asarray_chkfinite
    "array must not contain infs or NaNs")
euhruska commented 6 years ago

the weights out of https://github.com/markovmodel/PyEMMA/blob/1a280481ed6cbbfc3fbceaacfa22136e26983678/pyemma/coordinates/estimation/koopman.py#L60 are all negative, but around -1

weights2=koop.weights.weights(X[0])
weights2.min()
-1.3627317624126105
weights2.max()
-0.4757296230659884

C00 matrix koop_C00.zip

euhruska commented 6 years ago

solved, was a bug, caused by machine precision