Re: How to let NAMD terminate automatically at a given time

From: Jeff Comer (jeffcomer_at_gmail.com)
Date: Mon Mar 02 2015 - 13:58:14 CST

NAMD has a Tcl interface, so you can find a way to do many things.
Let's say I want my job to finish after 50 minutes and I don't want to
write restart files for some reason:

set timeLimit 3000
set steps 5000
set t0 [exec date +%s]
while {1} {
    run $steps
    if {[exec date +%s]-$t0 > $timeLimit} {
        break
    }
}

NAMD will run until 50 minutes have passed and then quit, writing the
final output. If you want it to finish just before a certain amount of
time has passed, you could even have the script keep track of the
maximum time required to run 5000 steps and quit when [exec date +%s]
- $t0 + $max_time_for_5000_steps > $timeLimit.

Jeff

–––––––––––––––––––––––––––––––––––———————
Jeffrey Comer, PhD
Assistant Professor
Institute of Computational Comparative Medicine
Nanotechnology Innovation Center of Kansas State
Kansas State University
Office: P-213 Mosier Hall
Phone: 785-532-6311

On Mon, Mar 2, 2015 at 1:19 PM, <hannes.loeffler_at_stfc.ac.uk> wrote:
> I believe what the OP is really asking for is a graceful termination after a specified time a la Gromacs. Gromacs will terminate at, say, 99% of the allocated runtime and write out a checkpoint file which can then be used for a smooth restart. This is basically a convenience function to max out the runtime limit. As far as I am aware of there is no equivalence in NAMD and the user would have to find sensible frequency for writing out the restart information for themselves.
>
> ________________________________________
> From: owner-namd-l_at_ks.uiuc.edu [owner-namd-l_at_ks.uiuc.edu] on behalf of Jérôme Hénin [jerome.henin_at_ibpc.fr]
> Sent: 02 March 2015 17:12
> To: Namd Mailing List; Dong Luo
> Cc: 吕晴
> Subject: Re: namd-l: How to let NAMD terminate automatically at a given time
>
> If you use Unix, the "at" command will let you kill the namd job when its time is up. Just write restart files somewhat frequently.
>
> Jerome
>
> On 2 March 2015 at 16:27, Dong Luo <us917_at_remove_yahoo.com<mailto:us917_at_remove_yahoo.com>> wrote:
> Hi Qing,
> If you are running NAMD locally, there is no meaning to restrict the running time since you must own the computer resource. If it's run on cluster, there should be some kind of queue system for you to submit your job. That system will allow you to specify the max time each job that is allowed to run
>
>

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2015 - 23:21:41 CST