next up previous contents index
Next: Enabling and controlling the Up: Collective Variable-based Calculations (Colvars) Previous: Overview


Writing a Colvars configuration: a crash course

The Colvars configuration is a plain text file or string that defines collective variables, biases, and general parameters of the Colvars module. It is passed to the module using back-end-specific commands documented in section 9.2.

Now let us look at a complete, non-trivial configuration. Suppose that we want to run a steered MD experiment where a small molecule is pulled away from a protein binding site. In Colvars terms, this is done by applying a moving restraint to the distance between the two objects. The configuration will contain two blocks, one defining the distance variable (see section 9.3 and 9.3.2), and the other the moving harmonic restraint (9.5.5).


colvar {
  name dist
  distance {
    group1 { atomNumbersRange 42-55 }
    group2 {
      psfSegID PR
      atomNameResidueRange CA 15-30
    }
  }
}

harmonic {
  colvars dist
  forceConstant 20.0
  centers 4.0         # initial distance
  targetCenters 15.0  # final distance
  targetNumSteps 500000
}

Reading this input in plain English: the variable here named dist consists in a distance function between the centers of two groups: the ligand (atoms 42 to 55) and the $ \alpha$ -carbon atoms of residues 15 to 30 in the protein (segment name PR). To the ``dist'' variable, we apply a harmonic potential of force constant 20 kcal/mol/Å$ ^2$ , initially centered around a value of 4 Å, which will increase to 15 Åover 500,000 simulation steps.

The atom selection keywords are detailed in section 9.4.


next up previous contents index
Next: Enabling and controlling the Up: Collective Variable-based Calculations (Colvars) Previous: Overview
http://www.ks.uiuc.edu/Research/namd/