RE: AW: Tcl script for simulated tempering?

From: Radak, Brian K (bradak_at_anl.gov)
Date: Tue Mar 15 2016 - 13:01:56 CDT

After some fooling about, I think I understand how the "callback" procedure works, although I have to say the manual is essentially useless on this area. I was able to extract the following from the replica exchange script:

#####
proc save_callback {labels values} {
  global saved_labels saved_values
  set saved_labels $labels
  set saved_values $values
}

proc save_array {} {
  global saved_labels saved_values saved_array
  puts $saved_labels
  foreach label $saved_labels value $saved_values {
    set saved_array($label) $value
  }
}

callback save_callback
#####

This is all well and good for a script that contains these commands, but I want to be able to load a generic set of commands from a different file and use them. This apparently breaks the global part of "saved_array", as that array no longer exists in the proper scope or else is not populated. I've tried mucking with Tcl namespaces and using the "variable" command instead of "global", but that does not seem to help.

Are there any solid example Tcl extensions for NAMD that actually produce a package? I'm trying to read off of ABF, but that looks like a very non-trivial example...


Brian Radak
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory

9700 South Cass Avenue, Bldg. 240
Argonne, IL 60439-4854
(630) 252-8643
brian.radak_at_anl.gov
________________________________
From: Norman Geist [norman.geist_at_uni-greifswald.de]
Sent: Tuesday, March 15, 2016 10:21 AM
To: namd-l_at_ks.uiuc.edu; Radak, Brian K
Subject: AW: AW: namd-l: Tcl script for simulated tempering?

Ah, sorry, misunderstood your question. I’m not actually familiar with the parallel tempering away from simple temperature replica exchange. If you can describe what you want to do exactly, we can likely give a better advice. Especially what is the difference to the conventional replica exchange method?

Norman Geist

Von: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] Im Auftrag von Brian Radak
Gesendet: Dienstag, 15. März 2016 14:14
An: Norman Geist <norman.geist_at_uni-greifswald.de>; namd-l_at_ks.uiuc.edu
Betreff: Re: AW: namd-l: Tcl script for simulated tempering?

Thanks for the reply - yes, that is definitely the main point. Unfortunately you described simulated annealing, whereas I want simulated tempering. Pointless semantics distinction? Probably.

Essentially I want to run hybrid MD/MC with the temperature changing along a fixed ladder using set statistical weights. I mostly just want to get a little bit better convergence out of some small alchemical calculations where some torsional barriers are rather important - and of course I want to avoid scaling this up to many many replicas in order to avoid a nail/sledge hammer situation.

Ultimately my main problem is that I'm not yet familiar with the specific ways that one can interact with the NAMD data (e.g. energy, volume) within Tcl. I can infer some of this from the parallel tempering (temperature replica exchange) script, but there's a lot of extra indexing, etc. in that example that I definitely do not need.

Cheers,
Brian
On 03/15/2016 02:53 AM, Norman Geist wrote:
For this purpose, you’d just need to understand that the namd inout script, is in fact a TCL script. So just leave out the numsteps parameter and do something like the following at the end of your namd conf:

[…]
set startT 10
set endT 300
set stepT 10
set perrun 1000000

set runs [expr floor(($endT-startT)/stepT)]
for {set i 0} {$i < $runs} {incr i} {
    langevintemp [expr $startT+($i*$stepT)]
    run $perrun
}

Norman Geist

Von: owner-namd-l_at_ks.uiuc.edu<mailto:owner-namd-l_at_ks.uiuc.edu> [mailto:owner-namd-l_at_ks.uiuc.edu] Im Auftrag von Radak, Brian K
Gesendet: Freitag, 11. März 2016 23:12
An: NAMD list ‎[namd-l_at_ks.uiuc.edu<mailto:namd-l_at_ks.uiuc.edu>]‎ <namd-l_at_ks.uiuc.edu><mailto:namd-l_at_ks.uiuc.edu>
Betreff: namd-l: Tcl script for simulated tempering?

Has anyone implemented a generic Tcl script for simulated tempering? I know that I could probably cannibalize the parallel tempering script for this purpose, but I'm not one to re-invent the wheel.

Thanks,
Brian

Brian Radak
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory

9700 South Cass Avenue, Bldg. 240
Argonne, IL 60439-4854
(630) 252-8643
brian.radak_at_anl.gov<mailto:brian.radak_at_anl.gov>

--
Brian Radak
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory

9700 South Cass Avenue, Bldg. 240
Argonne, IL 60439-4854
(630) 252-8643
brian.radak_at_anl.gov<mailto:brian.radak_at_anl.gov>

This archive was generated by hypermail 2.1.6 : Sun Dec 31 2017 - 23:20:14 CST