next up previous contents index
Next: Colvars as scripted functions Up: Collective variable components (basis Previous: Advanced usage and special   Contents   Index


Linear and polynomial combinations of components

To extend the set of possible definitions of colvars $ \xi(\mathbf{r})$ , multiple components $ q_i(\mathbf{r})$ can be summed with the formula:

$\displaystyle \xi(\mathbf{r}) = \sum_i c_i [q_i(\mathbf{r})]^{n_i}$ (13.13)

where each component appears with a unique coefficient $ c_i$ (1.0 by default) the positive integer exponent $ n_i$ (1 by default).

Any set of components can be combined within a colvar, provided that they return the same type of values (scalar, unit vector, vector, or quaternion). By default, the colvar is the sum of its components. Linear or polynomial combinations (following equation (13.14)) can be obtained by setting the following parameters, which are common to all components:

Example: To define the average of a colvar across different parts of the system, simply define within the same colvar block a series of components of the same type (applied to different atom groups), and assign to each component a componentCoeff of $ 1/N$ .


next up previous contents index
Next: Colvars as scripted functions Up: Collective variable components (basis Previous: Advanced usage and special   Contents   Index
vmd@ks.uiuc.edu