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 #84

Closed euhruska closed 5 years ago

euhruska commented 5 years ago

koopman ignores the number of dimensions requested, and later gives fatal error. Here Koopman generates 3 dimensions, but dim=5. The get_output fails @fnueske

Traceback (most recent call last):
  File "run-tica-msm3.py", line 712, in <module>
    Runticamsm().run()
  File "run-tica-msm3.py", line 154, in run
    y = tica_obj.get_output(stride=tica_stride)
  File "/mnt/b/projects/sciteam/bamm/hruska/vpy8/lib/python3.5/site-packages/pyemma/coordinates/data/_base/transformer.py", line 227, in get_output
    return super(StreamingTransformer, self).get_output(dimensions, stride, skip, chunk)
  File "/mnt/b/projects/sciteam/bamm/hruska/vpy8/lib/python3.5/site-packages/pyemma/coordinates/data/_base/datasource.py", line 407, in get_output
    trajs[itraj][i, :] = chunk[:, dimensions]
ValueError: could not broadcast input array from shape (100,3) into shape (100,5)
fnueske commented 5 years ago

I think var_cutoff needs to be set to 1.0 explicitly, otherwise dim is ignored, see TICA documentation. Does that explain what you see?

euhruska commented 5 years ago

No, that wouldn't explain it, tica should under no circumstances fail to write the output and this is a fatal error. I think it's related to Koopman cutting off the negative eigenvalues and giving the output function less dimensions than the output function expects.

fnueske commented 5 years ago

Oh right, I overlooked that this line

trajs[itraj][i, :] = chunk[:, dimensions]

was part of the TICA code, not of yours. So the dimension of the TICA object seems to change somewhere along the way and is not updated. It may very well be related to the dimension reduction after solving the eigenvalue problem. I'll try to go through the code later and check if the dimension is updated after the diagonalization.

fnueske commented 5 years ago

I have no idea what's going on here. As far as I can see, TICA checks how many eigenvalues are available before setting the dimension, so there should be no mismatch. Can you post this on the pyemma repo and tag Martin?