Closed euhruska closed 6 years ago
@fnueske
/u/sciteam/hruska/scratch/radical.pilot.sandbox/rp.session.leonardo.rice.edu.eh22.017758.0032/pilot.0000/unit.000006 ntl9
Eugen, can you apply the following code block to the data in question:
koop = _KoopmanEstimator(lag=lag, stride=stride, skip=skip) koop.estimate(data, chunksize=cs) weights = koop.weights
This part computes the Koopman weights. If they contain infs or nans, these will be handed all the way down, until something fails. Parameters need to be the same as in your call to tica().
Saved weights as .npz file koop_weights.zip <pyemma.coordinates.estimation.koopman._KoopmanWeights object at 0x2aaacc893f90>
koop.u:
[ -1.44741269 -1.41021442 -1.27524134 6.80435086 -6.35325017
-0.57527146 11.31252763 4.32273943 1.29092326 2.96443575
4.65027585 2.9741678 6.25532477 -0.37797697 -6.12253137
3.64938295 -4.4162159 4.8008984 -1.31151944 -1.48437946
7.60312911 11.7213386 0.2185055 -1.70546792 0.45421057
-0.40038417 0.75047135 -6.18444047 -0.0631904 0.06792182
-0.22481375 0.10486416 0.38483166 0.69899538 -0.55630278
0.72069352 0.17300695 0.08101199 -0.28783623 0.91205656
0.42951334 0.46678493 -0.34448013 -0.14536374 0.67195342
-0.78990925 -1.01149807 1.24252342 0.37738346 -0.19936891
0.86359818 0.04082861 -0.23270495 0.28802588 0.1044228
-0.17448741 0.15703285 -0.4583108 -1.1777493 0.48086512
-1.19407233 0.77045126 1.68329875 0.66453219 -12.50235234]
('C00', array([[ 0.01338558, 0.00687435, 0.01676794, ..., 0.0021919 ,
0.01704439, 0.0221973 ],
[ 0.00687435, 0.00737539, 0.00982822, ..., -0.00094557,
-0.00635372, -0.00672989],
[ 0.01676794, 0.00982822, 0.02592116, ..., 0.00186075,
0.0051857 , 0.0110813 ],
...,
[ 0.0021919 , -0.00094557, 0.00186075, ..., 0.01462137,
-0.04286392, -0.03869312],
[ 0.01704439, -0.00635372, 0.0051857 , ..., -0.04286392,
-0.05754377, -0.20701788],
[ 0.0221973 , -0.00672989, 0.0110813 , ..., -0.03869312,
-0.20701788, -0.27758687]]))
('C0t', array([[ 9.79153985e-03, 4.86193957e-03, 1.33699098e-02, ...,
2.62236616e-03, 1.58399757e-02, 2.19902184e-02],
[ 5.42677880e-03, 5.18921277e-03, 8.36420839e-03, ...,
-1.03095000e-03, -6.10198861e-03, -7.59030180e-03],
[ 1.36481773e-02, 7.45378092e-03, 2.11911040e-02, ...,
1.95971954e-03, 5.36268971e-03, 1.14685796e-02],
...,
[ 2.24978279e-03, -8.75326741e-04, 2.32950407e-03, ...,
-1.28143641e-04, -2.11944656e-02, -2.51237760e-02],
[ 1.80361510e-02, -6.61070103e-03, 8.49732170e-03, ...,
-2.00809147e-02, -1.49447769e-01, -2.40554710e-01],
[ 2.27027192e-02, -6.62075409e-03, 1.39884270e-02, ...,
-2.50248724e-02, -2.34425555e-01, -2.95888624e-01]]))
had rerun this step, still leading to the same error, but no nan or infs in the C00 or C0t
C00.min()
-0.33721169507381465
C00.max()
0.53087998375466916
C0t.min()
-0.33818181071394315
C0t.max()
0.45154794412774701
with Feliks figured that the reweighted C00 matrix, which is ok, goes to
pyemma._ext.variational.solvers.direct.spd_inv_split and
pyemma._ext.variational.solvers.direct.spd_eig
goes to sm, Vm = spd_eig(C00)
,
where sm is negative array([-3.11519952])
and leads in the next line
https://github.com/markovmodel/PyEMMA/blob/devel/pyemma/_ext/variational/solvers/direct.py#L220
L = _np.dot(Vm, _np.diag(1.0/_np.sqrt(sm)))
to fatal nan values
That means the reweighted C00 matrix has negative eigenvalues, which prevents us from finishing the next tica step
solved, fixed bug
koopman error, ('n atoms', 6105) ('n frames total', 400000) ('n trajs', 200) (' input dimension', 64) chignolin