Project

General

Profile

Task #2059

Separate different types of data in t_state

Added by Berk Hess about 3 years ago. Updated about 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
core library
Target version:
Difficulty:
uncategorized
Close

Description

In mdrun there are 3 different types of state information:
1) The microstate of the simulated system
2) History information for output, e.g. energy statistics
3) The state of the mdrun machinery

Currently types 1) and 2) are both stored in t_state. A little of of type 3) is stored in the checkpoint file.
Since types 1) and 2) serve very different purposes and are used mostly in different places in the code, they should be separated. My proposal is to only have data of type 1) in t_state.
Some data, like energyhistory_t are clearly of type 2), but for other data, such as free-energy and swap data, this is not clear to me.

Associated revisions

Revision bd9f965f (diff)
Added by Berk Hess about 3 years ago

Move energyhistory_t out of t_state

We have three different types of states in mdrun:
1) the microstate of the system we are simulating
2) history information for output
3) the state of the simulation machinery in mdrun
The struct energyhistory_t clearly belongs to 2) and is therefore
moved out of t_state, which should eventually only contain 1).

TODO: Consider what to do with the other structs in t_state that
(also) store history rather than the state of the simulated system.

Note: reverts recent commit ec827264

Part of #2059.

Change-Id: Ie84a19efcd0a170c0aaafe18c06275b7fb15244a

Revision 036fc219 (diff)
Added by Berk Hess almost 3 years ago

Use templating in checkpoint.cpp

The low level int, real and double writing routines have been
converted to a single template function. The listing functionality
has been moved to a separate function. Added functions for processing
more std::vector types.
Also fixes a bug causing memory corruption in gmx dump -cp.

Part of #2059.

Change-Id: Ia48e57841c7a2dfaa3aefd1f43f0cdc9c0034119

Revision f9399260 (diff)
Added by Berk Hess almost 3 years ago

Convert energyhistory_t to use std::vector

This change converts energyhistory_t and its child struct
delta_h_history_t to classes that use std::vector. Thus the init
and done routines and energyhistory.cpp are removed.

Part of #2059.

Change-Id: Ieb1f43d18187d4f8de5a21d043bcddcf6686280d

Revision 1ecd43b0 (diff)
Added by Berk Hess over 2 years ago

Introduce ObservablesHistory container

Introduces a ObservablesHistory class and moved energyhistory_t,
edsamstate_t and swapstate_t into this.

TODO: Move more observables history from t_state into this container.

Also added documentation in state.h.

Part of #2059.

Change-Id: Ic1efd95c5be2dede137763bfd24e3fb7d676eadd

History

#1 Updated by Gerrit Code Review Bot about 3 years ago

Gerrit received a related patchset '2' for Issue #2059.
Uploader: Berk Hess ()
Change-Id: Ie84a19efcd0a170c0aaafe18c06275b7fb15244a
Gerrit URL: https://gerrit.gromacs.org/6274

#2 Updated by Michael Shirts about 3 years ago

Some data, like energyhistory_t are clearly of type 2), but for other data, such as free-energy and swap data, this is not clear to me.

Great question. df_history is required by the expanded ensemble subroutines to be able to decide how to update the weights for a number of weight-updating methods; for example, the Wang-Landau histogram. For checkpointing, then if this history is required to be able to restart. But I don't know that per se it needs to be stored as the state. It sort of made sense at the time (the state of the simulation, meaning all the information needed to determine what it would do next at an algorithmic level) would include the information in df_history. If we think of the state as only the Markovian state of the simulation, then it wouldn't belong there.

Otherwise, df_history it's only used for output.

One other thing -- it turns out it would be rather nice to be able to read the df_history when restarting a simulation even when not using checkpoints. If running wang-landau, one might want to run a swarm of short trajectories (something we are working on now),and if the time for the histogram to flatten is too long, then you never really get the WL weights to converge.

Berk, we should set up a time to talk expanded ensemble methods at some point. Some interesting relationships between Lidmar's approach (which I know you've been using), MBAR, and provably optimally convergent methods are emerging (some but not all published). All of which might affect what would appear in df_history and how it is used.

#3 Updated by Michael Shirts about 3 years ago

real *Tij; / transition matrix /
real **Tij_empirical; /
Empirical transition matrix */

These definitely are descriptive, not required to define a non-markovian state for wang-landau, so could go somewhere else.

#4 Updated by Gerrit Code Review Bot about 3 years ago

Gerrit received a related patchset '4' for Issue #2059.
Uploader: Berk Hess ()
Change-Id: Ia48e57841c7a2dfaa3aefd1f43f0cdc9c0034119
Gerrit URL: https://gerrit.gromacs.org/6278

#5 Updated by Gerrit Code Review Bot about 3 years ago

Gerrit received a related patchset '4' for Issue #2059.
Uploader: Berk Hess ()
Change-Id: Ieb1f43d18187d4f8de5a21d043bcddcf6686280d
Gerrit URL: https://gerrit.gromacs.org/6279

#6 Updated by Gerrit Code Review Bot about 3 years ago

Gerrit received a related patchset '1' for Issue #2059.
Uploader: Berk Hess ()
Change-Id: Ic1efd95c5be2dede137763bfd24e3fb7d676eadd
Gerrit URL: https://gerrit.gromacs.org/6280

#7 Updated by Mark Abraham over 2 years ago

  • Target version changed from 2018 to 2019

I imagine there's more to do here, but not for this release.

#8 Updated by Gerrit Code Review Bot over 2 years ago

Gerrit received a related DRAFT patchset '1' for Issue #2059.
Uploader: Berk Hess ()
Change-Id: gromacs~master~Ideda2b0bf6bdd0eec1332549759bceb5ead87a5f
Gerrit URL: https://gerrit.gromacs.org/6620

#9 Updated by Gerrit Code Review Bot over 2 years ago

Gerrit received a related patchset '13' for Issue #2059.
Uploader: Berk Hess ()
Change-Id: gromacs~master~Ic1efd95c5be2dede137763bfd24e3fb7d676eadd
Gerrit URL: https://gerrit.gromacs.org/6280

#10 Updated by Mark Abraham about 1 year ago

  • Target version changed from 2019 to 2020

Also available in: Atom PDF