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

From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Tue Nov 10 2015 - 04:18:02 CST

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 : Thu Dec 31 2015 - 23:22:12 CST