Conformation Sampling tutorial: factor of 2 in

From: Alexander Adams (
Date: Tue Feb 11 2020 - 13:24:21 CST

Hello all,

I was working through the Conformation Sampling NAMD tutorial
was confused by one of the included scripts. in the beus files
produces a file containing the exchange rates for each window, and I
believe calculates the rate with the following expression:
count[i]/(nr*nc/2). I understand this to be the number of exchange events
(read from the log file) divided by the total number of runs, divided again
by the number of copies (each of which can be exchanged after each run),
but I do not understand why there is an additional 1/2 in the denominator.
I have attached the monitor file and included it in this email. Thank you
in advance for your help.

ni=4 # number of images
nc=5 # number of copies
log="../sample-output/job0.log" # if you are using the sample-output

grep EXCHANGING $log | awk -v ni=$ni -v nc=$nc '{
    for(i=0;i<ni-1;i++) print i,count[i]/(nr*nc/2),nr
}' | sort -n | \
awk 'BEGIN{
    print "#image1 image2 rate(percentage)"
    print $1,$1+1,100*$2
    print "#avr",100*sum/n
    print "#runs",nr
}' > exchange.txt

Alexander Adams

University of Michigan, Ann Arbor
Ph.D. Candidate - Mayes Lab
College of Engineering - Chemical Engineering

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2020 - 23:17:12 CST