questions about the output of colvars in calculating PMF

Hello Dongjie, thanks for your email.

The columns in the colvars.traj file include the step number, and the values of the variables that you defined, along with related properties (e.g. the energy of the restraints, if you chose to output them).

In your case, “us” is the variable that you defined, and the numbers its value over time.

The original definition of umbrella sampling does not prescribe a standard method of unbiasing, although two widely used approaches are WHAM and MBAR. For the first one, there exist several implementation: the one by Grossfield will directly read .colvars.traj files like the one you have. If you need to concatenate multiple files, you may find the following useful:
https://raw.githubusercontent.com/Colvars/colvars/master/colvartools/plot_colvars_traj.py

For MBAR, a useful implementation is pymbar:
https://github.com/choderalab/pymbar
where there is an example for umbrella sampling that you can adapt. (I haven’t made such an example myself, but was considering adding it in the future).

You may also find useful to turn on outputEnergy for the restraint, and feed it to pymbar.

Giacomo

36FEF802@...8196....png