AW: AW: How to run a TCL proc at every step in NAMD using callback command?

From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Thu Jun 14 2018 - 04:13:18 CDT

Yeah; my bad. If you are really forced to do it every step, yes then you would set stepspercycle and outputenergies to 1, but this is likely very slow.
Why not just setting outputenergies to 1 and redirect the namd output to a log file to analyze later?

> -----Ursprüngliche Nachricht-----
> Von: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] Im
> Auftrag von yjcoshc
> Gesendet: Donnerstag, 14. Juni 2018 11:07
> An: Norman Geist <norman.geist_at_uni-greifswald.de>
> Cc: namd-l_at_ks.uiuc.edu
> Betreff: Re: AW: namd-l: How to run a TCL proc at every step in NAMD using
> callback command?
>
> Thanks for your reply!. After trying I find the loop in your example
> should be:
>
> for {set r 0} {r < $runs} {incr r} {
> run $incr_step
> callback foo
> }
>
> Actually I am trying to analyze the gaussian accelerated molecular
> dynamics (GaMD) results in the foo proc. I need collect the delta V
> every step, so should I reduce the stepspercycle to 1?
>
> 在 2018年06月14日 16:38, Norman Geist 写道:
> > You can call foo now between "run" commands, you should't do it every
> step since this would be very slow. You can try running for at least
> stepspercycle (which is the lower bound anyway). You also
> > need to make sure that outputenergies is divisible by whatever number of
> steps you use for run, otherwise the energies are rubbish.
> >
> > e.g.:
> >
> > proc foo {labels values} {
> > print $labels
> > print "foo\n"
> > print $values
> > }
> > callback foo
> >
> > set i_step 0
> > set incr_step [stepspercycle]
> > set runs [expr floor(50000000/$incr_step)]
> > outputenergies $incr_step
> >
> > for {set r 0} {r < $runs} {incr r} {
> > run $incr_step
> > foo
> > }
> >
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] Im
> >> Auftrag von yjcoshc
> >> Gesendet: Donnerstag, 14. Juni 2018 10:11
> >> An: Namd Mailing List <namd-l_at_ks.uiuc.edu>
> >> Betreff: namd-l: How to run a TCL proc at every step in NAMD using
> callback
> >> command?
> >>
> >> Hello,
> >>
> >> I want to run a TCL proc every step in NAMD and the manual tells me
> >> the callback command can do that, so I have added following lines in the
> >> NAMD configuration file:
> >>
> >> proc foo {labels values} {
> >> print $labels
> >> print "foo\n"
> >> print $values
> >> }
> >> callback foo
> >> run 50000000
> >>
> >> However when I read the log file the "foo" string is only printed once.
> >> What I want is running the foo proc at every step. Are there any
> >> examples of using the callback command?
> >>
> >> Thanks,
> >>
> >> Haochuan Chen
> >

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:21:11 CST