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

From: Tristan Croll (tristan.croll_at_qut.edu.au)
Date: Tue Nov 10 2015 - 04:27:19 CST

Ah! Good call.

________________________________
From: Norman Geist <norman.geist_at_uni-greifswald.de>
Sent: Tuesday, 10 November 2015 8:18 PM
To: namd-l_at_ks.uiuc.edu; 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: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] Im Auftrag von Tristan Croll
Gesendet: Dienstag, 10. November 2015 10:01
An: namd-l_at_ks.uiuc.edu
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?

Thanks,

Tristan

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