Acellera / htmd

HTMD: Programming Environment for Molecular Discovery
https://software.acellera.com/docs/latest/htmd/index.html
Other
261 stars 59 forks source link

HTMD adaptive problem during MSMs #1036

Closed AChatzigoulas closed 2 years ago

AChatzigoulas commented 2 years ago

Hello,

I' m running adaptive MD simulations with ACEMD3 and HTMD version 2.1.7. After projecting the trajectories the following error appears:

Projecting trajectories: 100%|██████████████████████████████████████████████████████████| 77/77 [15:48<00:00, 12.32s/it]
2022-09-22 12:11:23,395 - htmd.projections.metric - INFO - Frame step 0.1ns was read from the trajectories. If it looks
wrong, redefine it by manually setting the MetricData.fstep property.
2022-09-22 12:11:23,395 - htmd.metricdata - INFO - Dropped 0 trajectories from 77 resulting in 77
2022-09-22 12:14:22,417 - htmd.metricdata - INFO - Dropped 0 trajectories from 77 resulting in 77
Traceback (most recent call last):
  File "/work2/pr008/alchatz/anastasia/newLee/lee_no_50/central_script.py", line 37, in <module>
    ad.run()
  File "/users/pr008/alchatz/htmd/htmd/adaptive/adaptive.py", line 196, in run
    flag = self._algorithm()
  File "/users/pr008/alchatz/htmd/htmd/adaptive/adaptiverun.py", line 211, in _algorithm
    self._createMSM(data)
  File "/users/pr008/alchatz/htmd/htmd/adaptive/adaptiverun.py", line 262, in _createMSM
    self._model.markovModel(self.lag, self._numMacrostates(data))
  File "/users/pr008/alchatz/htmd/htmd/model.py", line 111, in markovModel
    self.coarsemsm = self.msm.pcca(macronum)
  File "/users/pr008/alchatz/miniconda3/envs/htmd_2.1.1/lib/python3.9/site-packages/deeptime/markov/msm/_markov_state_mo
del.py", line 974, in pcca
    return pcca(self.transition_matrix, n_metastable_sets, self.stationary_distribution)
  File "/users/pr008/alchatz/miniconda3/envs/htmd_2.1.1/lib/python3.9/site-packages/deeptime/markov/_pcca.py", line 48,
in pcca
    M = _algorithm_impl(P, m, pi)
  File "/users/pr008/alchatz/miniconda3/envs/htmd_2.1.1/lib/python3.9/site-packages/deeptime/markov/tools/analysis/dense
/_pcca.py", line 421, in pcca
    raise RuntimeError(f"{m} metastable states requested, but transition matrix only has {nmeta}. "
RuntimeError: 8 metastable states requested, but transition matrix only has 1. Consider using a prior or request less me
tastable states.

This error appeared after updating from HTMD version 2.1.1 to 2.1.7.

stefdoerr commented 2 years ago

The new error has to do with our transition from pyemma to deeptime which seems to handle PCCA differently. However the fact that the transition matrix only has 1 state preoccupies me more.

stefdoerr commented 2 years ago

https://github.com/Acellera/htmd/commit/d36de36991cead8a1c1dd120ebd3d7b6caa5e428 This commit should fix the issue.