From: Andrei Tudor (
Date: Mon Jul 29 2013 - 11:14:01 CDT


I want to run a replica exchange simulation with my protein system. I am pretty sure I got the configuration of the replica exchange part working, but I want to use colvars and harmonic restraints to keep the protein in the center of the box (using it's center of mass).

I have never used colvars and I find them quite confusing. I know I have to create a group for the atoms forming my protein and use somehow the center of mass of that selection.

I want to use harmonic restraints to let the center of mass oscillate a bit, but not by much. Let's say 5 A. How does one make the config file of the colvars?

I am thinking of doing it something like this:

colvar {
        name COM
        group1 {
              atoms selected

But ai don't even know if this is correct for the colvar and I don't understand how to calculate the COM nor how to insert the harmonic restraint.

Any help will greatly appreciated.

Thank you,