puase MD integration to communicate between jobs

From: Floris Buelens (floris_buelens_at_yahoo.com)
Date: Sun May 11 2008 - 12:31:50 CDT


I'm interested in implementing some kind of replica exchange functionality for free energy calculation using NAMD. This involves testing pairs of states generated at different lambda values and requires calculation of the system energy for each configuration at two different values of lambda. This isn't too hard if you write configurations to disk and do the analysis externally, but this would take a lot of tedious bookkeeping and overhead... I can see a simpler and faster way of doing it as follows:

- start simulations at different lambda values as normal (independent processes);
- after a set interval, send a POSIX signal to a pair of jobs. The two jobs should catch this signal, stop MD integration, output current energy total at the original value, calculate and output energy at the alternative lambda value, and then wait for an external yes/no input (maybe by looking for an environment variable...?);
- read the energy totals with an external script and test for acceptance / rejection of the switch, and send yes/no to the jobs accordingly;
- the jobs should hear this yes/no, and restart MD integration either at the original lambda value (if no), or after switching to the alternative one (if yes).

This all seems like it should be possible but I'm struggling to get a grip on it, I can send USR1 signals into Controller.C and get it to wave back at me but I guess I'll need to delve into some message broadcasting to tell nodes to break out of the integration loop in a controlled way at the end of the next cycle?
Can anyone advise me how I could go about this? Or if there's some far simpler way?
Thanks a lot!

Floris Buelens
Department of Crystallography, Birkbeck College, London

Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:49:27 CST