AW: REMD and sortreplicas program

From: Norman Geist (
Date: Tue Sep 13 2016 - 01:19:34 CDT

Although you could easily adapt the replica.namd script to produce entries in the history file more frequently, I doubt it makes sense. Since you said your system requires 50ps between swap attempts, more frequently generated frames will contain the same state over and over, so what would be the benefit?


To have more frequent history writes, you would need to replace the single “run” command by series of run commands and generate the history entries in-between. But I don’t recommend doing that changes, since it doesn’t make sense to me at all and if you break the frame/history mapping while doing the changes, you might have wrong sorting later.


I’d say if your system is that large, that it requires 50ps per swap as you said, then REMD might not be a suitable method for whatever you try to find out with it.


Good luck


Norman Geist


Von: [] Im Auftrag von Horia Jalily Hasani
Gesendet: Montag, 12. September 2016 18:22
An: Norman Geist <>
Cc: <> <>
Betreff: Re: namd-l: REMD and sortreplicas program


Hi Norman,


I have changed the dcd frequency in the replica namd script to be written every 1000 steps instead of steps_per_run*runs_per_frame (which would have been 50,000 in my case). I did this to obtain a wider sampling.


The steps_per_run parameter is set to 50 ps because I have a huge system and I expect it to require these many steps to equilibrate before a swap.


Now again for the replica namd script, do you think there is a way to increase the outputs in the history file with the current parameters? So, I would eventually obtain more frames in the sorted dcd file.


dcdFreq 1000

steps_per_run 50000

set runs_per_frame 1

set frames_per_restart 1





On Mon, Sep 12, 2016 at 12:38 AM, Norman Geist < <> > wrote:

I meant steps_per_run*runs_per_frame


Von: <> [ <> ] Im Auftrag von Norman Geist
Gesendet: Montag, 12. September 2016 08:06
An: 'Horia Jalily Hasani' < <> >
Cc: <>
Betreff: AW: namd-l: REMD and sortreplicas program


Ok, it seems you are doing things very unusual O_o

Usually the replica namd scripts set the dcdfreq to steps_per_run*frames_per_restart. So generally with reasonable input values, the history file has more entries than the dcd has frames ;)


There are only some parameters that control how output is generated:


1. steps_per_run -> Number of timesteps between exchange attempts, usually between 2 and 5 picoseconds.

2. runs_per_frame -> Number of exchange attempts before writing a frame to the dcd, usually about 5

3. frames_per_restart -> Number of frames generated, before writing a set of restart files to continue, usually about 100


So there’s no need to change replica.namd, just your input. Btw. why the hell did you choose 50ps as exchange frequence??


Norman Geist


Von: Horia Jalily Hasani []
Gesendet: Freitag, 9. September 2016 17:48
An: Norman Geist < <> >
Betreff: Re: namd-l: REMD and sortreplicas program


Also, I use:

sortreplicas <job_output_root> <num_replicas> <runs_per_frame>

in my case:

sortreplicas <job_output_root> 128 1



On Thu, Sep 8, 2016 at 11:22 AM, Horia Jalily Hasani < <> > wrote:

Hi Norman,


Thanks for your reply.

Yes, it's normal parallel tempering.

I currently do an exchange after 50,000 steps, and so I get an entry in the history file only every 50,000 steps. Based on what you mentioned, this could explain the reason for sortreplicas giving me lesser frames in the sorted dcd files. I have only 50 entries and so I get only 50 frames in the sort.dcd file, whereas the initial dcd file has 2000 frames.


So I will need to increase the entries in the history file to for example every 1000 steps instead of doing it based on steps_per_run parameter. And for that I suppose I will need to modify this section of the replica.namd file:


while {$i_run < $num_runs} {


  run $steps_per_run


  incr i_step $steps_per_run

  set TEMP $saved_array(TEMP)

  set POTENTIAL [expr $saved_array(TOTAL) - $saved_array(KINETIC)]

  puts $history_file "$i_step $replica(index) $NEWTEMP $TEMP $POTENTIAL"


  if { $i_run % 2 == 0 } {

    set swap a; set other b

  } else {

    set swap b; set other a




Please advise if I am on the right track and what would be the best way to edit it.








On Thu, Sep 8, 2016 at 12:41 AM, Norman Geist < <> > wrote:

What kind of REMD did you perform? Just normal parallel tempering? If so, you should get all the frames in the sorted dcds for which you also have the corresponding history entry. Also, how did you call sortreplicas?


Norman Geist


Von: <> [ <> ] Im Auftrag von Horia Jalily Hasani
Gesendet: Donnerstag, 8. September 2016 02:11
An: < <> > < <> >
Betreff: namd-l: REMD and sortreplicas program




I have been performing REMD and I wonder if someone could give me a hint in the analysis part. When it comes to using the sortreplicas for sorting the dcd files and history files based on temperature, the program seems to take "only frames with the biasing potential V (d, i)" (quoted from the One-dimensional REUS tutorial).


For example, if I give it trajectories each of which have 2000 frames, I end up getting only 50 frames in the sorted dcd files. But I am interested in having all the 2000 frames sorted based on temperature without considering the potential at that point.


I would appreciate if anyone could give me a hint related to the sortreplicas program and if there is an alternative way of sorting the outputs based on temperature.







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