# ABF error with colvars module

**URL:** <https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492>\
**Category:** User discussions\
**Tags:** colvars\
**Created:** [May 25, 2023, 7:42pm UTC](https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492 "2023-05-25T19:42:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobertCoff](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RobertCoff](https://gromacs.bioexcel.eu/u/RobertCoff)\
**Post date:** [May 25, 2023, 7:42pm UTC](https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492/1 "2023-05-25T19:42:28Z")

</div>

GROMACS version:2022.5-Colvars\_2023\_05\_01  
GROMACS modification: Yes  
I am attempting to use ABF in the colvars module for my simulation. I have tried installing several versions of Gromacs (gromacs2021.6-colvars, fresh download of gromacs2022.5 that I patched with colvars). I have tried installing them on my own laptop in Ubuntu22.04 on WSL2 as well as in a folder I have write permission to in our HPC environment. The error I’m getting is “colvars: Error: total forces are currently not implemented.”  
I have learned that if I delete the abf block within the colvars.dat file and keep the colvar and harmonicwalls block the simulation will run just fine.

Any help is greatly appreciated.

Thanks,

Robert Coffman

---

<div class="post-metadata">

**Author:** ![jhenin](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jhenin/32/1086_2.png) [@jhenin](https://gromacs.bioexcel.eu/u/jhenin)\
**Post date:** [May 25, 2023, 10:57pm UTC](https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492/2 "2023-05-25T22:57:29Z")

</div>

Hi Robert,  
Indeed, the projected force calculation that is the basis of “classic ABF” is not available so far in Gromacs. However, you can run the extended-system variant eABF by adding the extended Lagrangian options to the collective variables involved.  
[http://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:eABF](http://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:eABF)  
[http://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:colvar\_extended](http://colvars.github.io/colvars-refman-gromacs/colvars-refman-gromacs.html#sec:colvar_extended)

Mostly, you need to add to the `colvar` block:

```auto
extendedLagrangian on
extendedFluctuation <positive decimal, a small fluctuation of the variable>

```

The Colvars / Gromacs manual needs to be updated to reflect this. Thanks for your report.

Best,  
Jérôme

---

<div class="post-metadata">

**Author:** ![RobertCoff](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RobertCoff](https://gromacs.bioexcel.eu/u/RobertCoff)\
**Post date:** [May 26, 2023, 3:37pm UTC](https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492/3 "2023-05-26T15:37:30Z")

</div>

Jérôme,  
Thank you! This is very helpful to know.

Sincerely,

Robert

---

<div class="post-metadata">

**Author:** ![RobertCoff](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RobertCoff](https://gromacs.bioexcel.eu/u/RobertCoff)\
**Post date:** [May 26, 2023, 5:04pm UTC](https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492/4 "2023-05-26T17:04:37Z")

</div>

I am running into a different issue now. I added extendedLangrangian and extendedFluctuation to my colvar block but I’m getting the error that the keyword isn’t supported or not recognized in this context. I have pasted in my colvar block below.  
colvar {  
name dist1  
distance {  
group1 { #add in grouping information here.  
indexGroup Transmembrane\_helix  
}  
group2 { #add in grouping information here.  
indexGroup Headgroup\_residues  
}  
}  
extendedLangrangian on  
extendedFluctuation 0.03  
lowerBoundary 5.0  
upperBoundary 5.5  
width 0.05  
}

Thanks,

Robert

---

<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:** [May 26, 2023, 5:09pm UTC](https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492/5 "2023-05-26T17:09:17Z")

</div>

Hi Robert, try “extendedLagrangian”, not “extendedLa **n** grangian” :-)

---

<div class="post-metadata">

**Author:** ![RobertCoff](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@RobertCoff](https://gromacs.bioexcel.eu/u/RobertCoff)\
**Post date:** [May 26, 2023, 5:12pm UTC](https://gromacs.bioexcel.eu/t/abf-error-with-colvars-module/6492/6 "2023-05-26T17:12:21Z")

</div>

Haha, Thanks for you help. It is working great now.
