RE(PI)MD

140 views
Skip to first unread message

Marc Riera

unread,
Jun 16, 2018, 5:43:58 PM6/16/18
to ipi-users
Hello,

Following your advice, I have been digging in the examples to see how a REMD simulation is performed with i-pi.
Seems like the test that I should follow (if that's not the best, please let me know) is:
IPI_HOME/examples/regtest/ph2/remd-nvt/remd_nvt.xml

I was not able to find documentation on REMD in the manual, so I would like to ask a few questions about it.

1. At the beginning of the xml file, there is a comment:
<!-- REGTEST
DEPENDENCIES our_ref.pdb our_ref.xyz remd_nvt.xml
COMMAND(8) i-pi-driver -h localhost -p 31415 -m sg -o 30.0
ENDREGTEST -->

<!-- With REMD is necessary to use threading='False' in regtests -->
Does it mean we cannot use multiple threads for different replicas, or is only for the test? Let's say I have 16 threads available to perform the simulation, and my energy function can calculate the energy with 2 threads. This means that I would be able to run 8 parallel energy calculations with two threads each (I am using openmp parallelization in the energy calculation). How would I ask for that in the xml? From the manual, seems like I can run multiple instances of my driver (if I understood it properly) connected to the same socket. Would it be enough to run then 8 instances of the driver?

2. I also see in that example, that one needs to set a system for each replica, and for each system we can set the number of beads. I assume that is the way to run RE-PIMD, correct?

3. Looking into ipi/inputs/smotion/remd.py, i assume that the stride keyword in:
  <smotion mode="remd">
      <remd>
         <stride> 2 </stride>
      </remd>
   </smotion>
is the exchange rate between replicas. Is that correct?

4. When the REMD runs, there will be exchange of temperatures in the simulation. Let's say we have two replicas R1 and R2, initially at Ta and Tb respectively. At a given time t, R1 and R2 exchange the temperature, so not R1 is at T=Tb, and R2 is at T=Ta. Let's assume we are saving the trajectory of R1 and R2 in R1_pos.xyz and R2_pos.xyz. The configurations in R1_pos.xyz will always contain the configurations of R1, independently of which is it's temperature, or will that file contain the configurations at Ta independently of the replica ID?

That's all for now. Thanks in advance!

venkat kapil

unread,
Jun 17, 2018, 7:06:55 AM6/17/18
to ipi-users
Hey Marc, 

Thanks for the inquiry. I have added a new example that performs REPIMD with NPT for q-TIP4P water. That has the latest infrastructure that also allows one to not redundantly refine systems. The input.xml should be self explanatory. However, if you have questions you can post here. Now coming to  your questions:

1)  Threading (for now) doesn't work for regression tests so you need to set it to false (only for tests). This means that for regular runs you can time evolve the systems simultaneously if you have enough force providers.  So in your specific case all you need to do is to run 8 instances of the "driver" code connected to the same socket.  

2) Yes, in the new example you will see a system template section which will allow you to specify the different ensembles that can be sampled by various replicas of the system. And for REPIMD you just need to make sure nbeads > 1. 

3) Yes, the stride is the exchange rate. 

4) In i-pi instead of swapping configurations we swap ensembles. So the trajectory of R1 will contain configurations sampled for various ensembles. To re sort the output so that samples consistent with different ensembles are stored in different files you can use the tool i-pi-remdsort.  

Marc Riera

unread,
Jun 17, 2018, 12:46:22 PM6/17/18
to ipi-users
Hey Venkat,

Thanks a lot. I will play around and see if everything works.
I will reply if there is any other question from my side. See you!

Marc Riera

unread,
Jun 18, 2018, 5:07:41 PM6/18/18
to ipi-users
Hey Venkat,

I think the toy simulation is running well. However, i-pi is showng a message at every time step it swaps temperatures:
====
 @ PT:  SWAPPING replicas     3 and     1.
 @ PT:  SWAPPING replicas     3 and     2.
WARNING: RETURNS AN INCORRECT RESULT IF OPEN PATHS ARE BEING USED. CALL NM.VSPRING INSTEAD!!
WARNING: RETURNS AN INCORRECT RESULT IF OPEN PATHS ARE BEING USED. CALL NM.VSPRING INSTEAD!!
 @ PT:  SWAPPING replicas     1 and     0.
WARNING: RETURNS AN INCORRECT RESULT IF OPEN PATHS ARE BEING USED. CALL NM.VSPRING INSTEAD!!
 @ PT:  SWAP REJECTED BETWEEN replicas     2 and     0.
 @ PT:  SWAPPING replicas     2 and     1.
WARNING: RETURNS AN INCORRECT RESULT IF OPEN PATHS ARE BEING USED. CALL NM.VSPRING INSTEAD!!
 @ PT:  SWAP REJECTED BETWEEN replicas     3 and     0.
 @ PT:  SWAPPING replicas     3 and     1.
 @ PT:  SWAPPING replicas     3 and     2.
====

Is that supposed to happen? Thanks!

venkat kapil

unread,
Jun 18, 2018, 5:55:07 PM6/18/18
to ipi-users
Its a warning for RE with open paths for which the spring term is not the same. Nothing to worry about. 
Reply all
Reply to author
Forward
0 new messages