Re: On-the-fly modification of tclforces script?

From: Tristan Croll (
Date: Tue Nov 10 2015 - 04:27:19 CST

Ah! Good call.

From: Norman Geist <>
Sent: Tuesday, 10 November 2015 8:18 PM
To:; Tristan Croll
Subject: AW: namd-l: On-the-fly modification of tclforces script?

Hey Tristan,

I don't think that namd re-reads the tcl forces script everytime. But you could easily use "source"

to include new code on the fly.

so something like the following may work as expected:

tclForcesScript {

while {1} {

                                    source forcescript.tcl

                                    run 200



Good luck

Norman Geist

Von: [] Im Auftrag von Tristan Croll
Gesendet: Dienstag, 10. November 2015 10:01
Betreff: namd-l: On-the-fly modification of tclforces script?

Hi all,

I'm looking for a way to add some more complex interactions to interactive MD simulations (e.g. to force a defined group of atoms into a particular conformation). Preferably I'd like to be able to do this on-the-fly without having to restart the simulation. Would an approach something like the following in the NAMD configuration file work?

tclForces on

while {1} {

  tclForcesScript forcescript.tcl

  run 200


.. with forcescript.tcl being modified/replaced as necessary from within VMD?



This archive was generated by hypermail 2.1.6 : Tue Dec 27 2016 - 23:21:31 CST