Re: Define a colvar from other colvars

From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Thu Dec 14 2017 - 14:40:22 CST

Hi Ben,

Yes. Define a *single* colvar that has two (or more) components, which
by default get added together. Here is an example from my own research,
were I wanted a colvar (which I call cnumber) to be the difference
between two coordination number colvars.

colvar {
    name cnumber
    coordNum {
        group1 {
            atomsFile tagged.pdb
            atomsCol B
            atomsColValue 1
        }
        group2 {
            atomsFile tagged.pdb
            atomsCol B
            atomsColValue 2
        }
        cutoff 8.0
        expNumer 4
        expDenom 10
        componentCoeff 1
    }
    coordNum {
        group1 {
            atomsFile tagged.pdb
            atomsCol B
            atomsColValue 1
        }
        group2 {
            atomsFile tagged.pdb
            atomsCol B
            atomsColValue 3
        }
        cutoff 8.0
        expNumer 4
        expDenom 10
        componentCoeff -1
    }
}

The componentCoeff is the important part (see
http://www.ks.uiuc.edu/Research/namd/2.12/ug/node57.html#SECTION000134400000000000000).
Then you'd restrain as usual.

-Josh

On 12/14/2017 12:58 PM, Ben Adams wrote:
> Hi,
>
> My question is related to colvar module:
> Is there any way to define a collective variable as a combination of
> other colvars?
> Let's say I have two colvars 'c1' and 'c2' but I want to constrain
> 'c3' at a constant value and c3=a*c1+b*c2.
>
> Regards,
>
> Ben.

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:45 CST