# Reconstruct 2D pmf

**URL:** <https://gromacs.bioexcel.eu/t/reconstruct-2d-pmf/5655>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [January 26, 2023, 12:50pm UTC](https://gromacs.bioexcel.eu/t/reconstruct-2d-pmf/5655 "2023-01-26T12:50:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgugliel](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sgugliel](https://gromacs.bioexcel.eu/u/sgugliel)\
**Post date:** [January 26, 2023, 12:50pm UTC](https://gromacs.bioexcel.eu/t/reconstruct-2d-pmf/5655/1 "2023-01-26T12:50:46Z")

</div>

GROMACS version: 2021.6-Colvars-2022-12-16-dev  
GROMACS modification: No  
Here post your question  
Hi all,  
I have performed a metadynamics simulation with the Colvars module; I decided to stop it before it got to the final step. In the simulation I biased three CV’s and I have the pmf file for each variable: I was wondering if there is a tool to “reconstruct” a 2d pmf having the 1d files.

Thanks in advance  
Stefano

---

<div class="post-metadata">

**Author:** ![giacomo.fiorin](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/giacomo.fiorin/32/2862_2.png) [@giacomo.fiorin](https://gromacs.bioexcel.eu/u/giacomo.fiorin)\
**Post date:** [January 26, 2023, 4:07pm UTC](https://gromacs.bioexcel.eu/t/reconstruct-2d-pmf/5655/2 "2023-01-26T16:07:29Z")

</div>

Hi Stefano, how did you bias the variables? If you have three separate PMF files it is likely that you ran three concurrent 1D metadynamics simulations. Did you add all three variables’s names to the bias?  
[https://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:colvarbias](https://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:colvarbias)

If on the other hand you already have a multi-dimensional PMF in this format:  
[https://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:colvar\_multicolumn\_grid](https://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:colvar_multicolumn_grid)  
you will find that there is a `colvars_grid` Python module in the `colvartools` folder of the Colvars repository.

Giacomo

---

<div class="post-metadata">

**Author:** ![sgugliel](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sgugliel](https://gromacs.bioexcel.eu/u/sgugliel)\
**Post date:** [January 26, 2023, 5:05pm UTC](https://gromacs.bioexcel.eu/t/reconstruct-2d-pmf/5655/3 "2023-01-26T17:05:52Z")

</div>

Hi Giacomo,  
I applied three 1d bias: actually I defined three separate metadynamics blocks. Does it make sense to try and get a bidimensional pmf? And if yes, is there a way?

Thanks again  
Stefano

---

<div class="post-metadata">

**Author:** ![giacomo.fiorin](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/giacomo.fiorin/32/2862_2.png) [@giacomo.fiorin](https://gromacs.bioexcel.eu/u/giacomo.fiorin)\
**Post date:** [January 26, 2023, 5:11pm UTC](https://gromacs.bioexcel.eu/t/reconstruct-2d-pmf/5655/4 "2023-01-26T17:11:47Z")

</div>

There is a metadynamics technique that makes use of multiple 1D metadynamics biases, but I am not familiar with it (I’m sure the paper can be found fairly quickly).

For a multi-dimensional PMF simply list multiple variables in the `colvars` keyword of the single `metadynamics` block. For reference, this is very similar to what you would to in PLUMED as well.

By the way, you mention 2D PMF but are biasing three CVs: what about the third one?

Giacomo

---

<div class="post-metadata">

**Author:** ![sgugliel](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sgugliel](https://gromacs.bioexcel.eu/u/sgugliel)\
**Post date:** [January 26, 2023, 5:24pm UTC](https://gromacs.bioexcel.eu/t/reconstruct-2d-pmf/5655/5 "2023-01-26T17:24:46Z")

</div>

Thanks for all the information.

Regarding the third CV, I was just trying to get “pairwise” pmf for clarity sake.

Thanks again  
stefano
