Re: replica_bias and colvars

From: Vermaas, Joshua (
Date: Thu Aug 10 2017 - 12:58:27 CDT

The old way would have been through something like "eval colvarbias [cat changeconfig somestuff here]". I ran into problems once when I neglected to change the name of the harmonic bias I wanted to change (I call all of mine harm), accidentally using the collective variable the harmonic was trying to bias as the name instead. Is "Z" the name of your collective variable or the harmonic that biases the collective variable?


On 08/10/2017 11:54 AM, Giacomo Fiorin wrote:
Hi JC, how is this code calling Colvars? I don't see any Tcl command that does call it in there.

The primary method for changing parameters for a bias should be through the "cv" command. Deleting the bias and re-creating it with the new configuration would be the way to go.


On Thu, Aug 10, 2017 at 1:07 PM, JC Gumbart <<>> wrote:
Has something changed in newer versions of NAMD with regards to how inputs are fed to different replicas in colvars?

Specifically, the input below worked fine in earlier versions (2.10 I think?), but in 2.12, the center and forceConstant both get set to the same value, namely that for the center.

> proc replica_bias { i } {
> set c [expr 5.5 + $i*0.5]
> set klist { 10 10 10 10 10 10 5 5 5 5 5 5 5 5 5 5 5 5 5 5 }
> set k [expr [lindex $klist $i]*0.05*0.05]
> return [list Z "centers \{$c\} forceConstant \{$k\}"]
> }

And then this is how that proc is used:
> set replica(colvarbias) [replica_bias $replica(index)]
> for { set i 0 } { $i < $replica(num_neighbors) } { incr i } {
> set replica(colvarbias.$i) [replica_bias $replica(index.$i)]
> set replica(colvarbias.$i) [replica_bias $replica(index.$i)]
> }


Giacomo Fiorin
Associate Professor of Research, Temple University, Philadelphia, PA
Contractor, National Institutes of Health, Bethesda, MD>>

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