Re: [gmx-users] Velocity Verlet integrator

2014-10-15 Thread Mario Fernández Pendás
Dear all,

I am still interested in some integrator related issues.

I understand that the easiest way to implement velocity Verlet was to split
the updates in two updates. But I don't understad the order of those
updates.
I mean why there are two updates for velocities and then the update for
positions?
My intuitive idea would be to update first one half for velocities, then a
full step for positions and, finally, using these new positions the second
half for velocities.
Maybe I am missunderstanding something.

Thank you very much,
Mario Fernández-Pendás

2014-03-23 14:33 GMT+01:00 Michael Shirts mrshi...@gmail.com:

 Putting both velocity Verlet and leapfrog Verlet both in Gromacs turns
 out to be non-trivial for the bookkeeping.  The easiest way to do this
 was split the velocity Verlet updates.

 Also, the additional computational cost of two half steps for
 velocities is trivial compared to the cost of the forces for almost
 all systems.

 On Sun, Mar 23, 2014 at 8:39 AM, Mario Fernández Pendás
 mariof...@gmail.com wrote:
  Dear all,
 
  In terms of computational efficiency, why the velocity Verlet integrator
 is
  implemented in GROMACS in one full step for positions and two half steps
  for velocities?
 
  Would it be more efficient to merge the second halft step for velocities
  with the first half step of the following scheme, ie, integrating in one
  full step for velocities?
 
  Thank you very much,
  Mario Fernánez-Pendás
  --
  Gromacs Users mailing list
 
  * Please search the archive at
 http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
 posting!
 
  * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
 
  * For (un)subscribe requests visit
  https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
 send a mail to gmx-users-requ...@gromacs.org.
 --
 Gromacs Users mailing list

 * Please search the archive at
 http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
 posting!

 * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

 * For (un)subscribe requests visit
 https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
 send a mail to gmx-users-requ...@gromacs.org.

-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Velocity Verlet integrator

2014-10-15 Thread Justin Lemkul



On 10/15/14 7:30 AM, Mario Fernández Pendás wrote:

Dear all,

I am still interested in some integrator related issues.

I understand that the easiest way to implement velocity Verlet was to split
the updates in two updates. But I don't understad the order of those
updates.
I mean why there are two updates for velocities and then the update for
positions?
My intuitive idea would be to update first one half for velocities, then a
full step for positions and, finally, using these new positions the second
half for velocities.


Yes, there are two separate half-step updates for velocities.  The comments in 
the md.cpp code are quite verbose if you want to trace through.


-Justin

--
==

Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalem...@outerbanks.umaryland.edu | (410) 706-7441
http://mackerell.umaryland.edu/~jalemkul

==
--
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Velocity Verlet integrator

2014-10-15 Thread Mario Fernández Pendás
Yes, I understand that. But my question is more about why the two velocity
updates are implemented before the position update and not the other way
round?

From the theoretical point of view I would think more in one of the
following schemes:


   1. Calculate: [image: \vec{v}\left(t + \tfrac12\,\Delta t\right) =
   \vec{v}(t) + \tfrac12\,\vec{a}(t)\,\Delta t\,]
   2. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
   \vec{v}\left(t + \tfrac12\,\Delta t\right)\, \Delta t\,]
   3. Derive [image: \vec{a}(t + \Delta t)] from the interaction potential
   using [image: \vec{x}(t + \Delta t)]
   4. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}\left(t +
   \tfrac12\,\Delta t\right) + \tfrac12\,\vec{a}(t + \Delta t)\Delta t,]



   1. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) + \vec{v}(t)\,
   \Delta t+\tfrac12 \,\vec{a}(t)\,\Delta t^2]
   2. Derive [image: \vec{a}(t + \Delta t)] from the interaction potential
   using [image: \vec{x}(t + \Delta t)]
   3. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}(t) +
   \tfrac12\,\left(\vec{a}(t)+\vec{a}(t + \Delta t)\right)\Delta t\,]


This is why my confusion arises.


2014-10-15 14:05 GMT+02:00 Justin Lemkul jalem...@vt.edu:



 On 10/15/14 7:30 AM, Mario Fernández Pendás wrote:

 Dear all,

 I am still interested in some integrator related issues.

 I understand that the easiest way to implement velocity Verlet was to
 split
 the updates in two updates. But I don't understad the order of those
 updates.
 I mean why there are two updates for velocities and then the update for
 positions?
 My intuitive idea would be to update first one half for velocities, then a
 full step for positions and, finally, using these new positions the second
 half for velocities.


 Yes, there are two separate half-step updates for velocities.  The
 comments in the md.cpp code are quite verbose if you want to trace through.

 -Justin

 --
 ==

 Justin A. Lemkul, Ph.D.
 Ruth L. Kirschstein NRSA Postdoctoral Fellow

 Department of Pharmaceutical Sciences
 School of Pharmacy
 Health Sciences Facility II, Room 629
 University of Maryland, Baltimore
 20 Penn St.
 Baltimore, MD 21201

 jalem...@outerbanks.umaryland.edu | (410) 706-7441
 http://mackerell.umaryland.edu/~jalemkul

 ==

 --
 Gromacs Users mailing list

 * Please search the archive at http://www.gromacs.org/
 Support/Mailing_Lists/GMX-Users_List before posting!

 * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

 * For (un)subscribe requests visit
 https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
 send a mail to gmx-users-requ...@gromacs.org.

-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Velocity Verlet integrator

2014-10-15 Thread Michael Shirts
Because the 'start' of the vv integrator step is halfway through the loop.
This is a byproduct of 1) putting leapfrog and velocity verlet in the same
loop and 2) minimizing communication and output.  It is not as elegant as
it should be.  There are efforts to clean this up, but it's a lot of
reorganization, and has gone slowly.

On Wed, Oct 15, 2014 at 8:46 AM, Mario Fernández Pendás mariof...@gmail.com
 wrote:

 Yes, I understand that. But my question is more about why the two velocity
 updates are implemented before the position update and not the other way
 round?

 From the theoretical point of view I would think more in one of the
 following schemes:


1. Calculate: [image: \vec{v}\left(t + \tfrac12\,\Delta t\right) =
\vec{v}(t) + \tfrac12\,\vec{a}(t)\,\Delta t\,]
2. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
\vec{v}\left(t + \tfrac12\,\Delta t\right)\, \Delta t\,]
3. Derive [image: \vec{a}(t + \Delta t)] from the interaction potential
using [image: \vec{x}(t + \Delta t)]
4. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}\left(t +
\tfrac12\,\Delta t\right) + \tfrac12\,\vec{a}(t + \Delta t)\Delta t,]



1. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) + \vec{v}(t)\,
\Delta t+\tfrac12 \,\vec{a}(t)\,\Delta t^2]
2. Derive [image: \vec{a}(t + \Delta t)] from the interaction potential
using [image: \vec{x}(t + \Delta t)]
3. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}(t) +
\tfrac12\,\left(\vec{a}(t)+\vec{a}(t + \Delta t)\right)\Delta t\,]


 This is why my confusion arises.


 2014-10-15 14:05 GMT+02:00 Justin Lemkul jalem...@vt.edu:

 
 
  On 10/15/14 7:30 AM, Mario Fernández Pendás wrote:
 
  Dear all,
 
  I am still interested in some integrator related issues.
 
  I understand that the easiest way to implement velocity Verlet was to
  split
  the updates in two updates. But I don't understad the order of those
  updates.
  I mean why there are two updates for velocities and then the update for
  positions?
  My intuitive idea would be to update first one half for velocities,
 then a
  full step for positions and, finally, using these new positions the
 second
  half for velocities.
 
 
  Yes, there are two separate half-step updates for velocities.  The
  comments in the md.cpp code are quite verbose if you want to trace
 through.
 
  -Justin
 
  --
  ==
 
  Justin A. Lemkul, Ph.D.
  Ruth L. Kirschstein NRSA Postdoctoral Fellow
 
  Department of Pharmaceutical Sciences
  School of Pharmacy
  Health Sciences Facility II, Room 629
  University of Maryland, Baltimore
  20 Penn St.
  Baltimore, MD 21201
 
  jalem...@outerbanks.umaryland.edu | (410) 706-7441
  http://mackerell.umaryland.edu/~jalemkul
 
  ==
 
  --
  Gromacs Users mailing list
 
  * Please search the archive at http://www.gromacs.org/
  Support/Mailing_Lists/GMX-Users_List before posting!
 
  * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
 
  * For (un)subscribe requests visit
  https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
  send a mail to gmx-users-requ...@gromacs.org.
 
 --
 Gromacs Users mailing list

 * Please search the archive at
 http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
 posting!

 * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

 * For (un)subscribe requests visit
 https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
 send a mail to gmx-users-requ...@gromacs.org.

-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Velocity Verlet integrator

2014-10-15 Thread Mario Fernández Pendás
Thank you very much Professor Shirts.

I have these doubts because I am trying to implement new integrators based
in the concatenation of two VV steps to make a single step. The idea
follows the integrators suggested in
http://web.mit.edu/~ripper/www/research/efficient_md_integrators.pdf

This is why it is important for me to know where each step starts and
finishes.

2014-10-15 15:52 GMT+02:00 Michael Shirts mrshi...@gmail.com:

 Because the 'start' of the vv integrator step is halfway through the loop.
 This is a byproduct of 1) putting leapfrog and velocity verlet in the same
 loop and 2) minimizing communication and output.  It is not as elegant as
 it should be.  There are efforts to clean this up, but it's a lot of
 reorganization, and has gone slowly.

 On Wed, Oct 15, 2014 at 8:46 AM, Mario Fernández Pendás 
 mariof...@gmail.com
  wrote:

  Yes, I understand that. But my question is more about why the two
 velocity
  updates are implemented before the position update and not the other way
  round?
 
  From the theoretical point of view I would think more in one of the
  following schemes:
 
 
 1. Calculate: [image: \vec{v}\left(t + \tfrac12\,\Delta t\right) =
 \vec{v}(t) + \tfrac12\,\vec{a}(t)\,\Delta t\,]
 2. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
 \vec{v}\left(t + \tfrac12\,\Delta t\right)\, \Delta t\,]
 3. Derive [image: \vec{a}(t + \Delta t)] from the interaction
 potential
 using [image: \vec{x}(t + \Delta t)]
 4. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}\left(t +
 \tfrac12\,\Delta t\right) + \tfrac12\,\vec{a}(t + \Delta t)\Delta t,]
 
 
 
 1. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
 \vec{v}(t)\,
 \Delta t+\tfrac12 \,\vec{a}(t)\,\Delta t^2]
 2. Derive [image: \vec{a}(t + \Delta t)] from the interaction
 potential
 using [image: \vec{x}(t + \Delta t)]
 3. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}(t) +
 \tfrac12\,\left(\vec{a}(t)+\vec{a}(t + \Delta t)\right)\Delta t\,]
 
 
  This is why my confusion arises.
 
 
  2014-10-15 14:05 GMT+02:00 Justin Lemkul jalem...@vt.edu:
 
  
  
   On 10/15/14 7:30 AM, Mario Fernández Pendás wrote:
  
   Dear all,
  
   I am still interested in some integrator related issues.
  
   I understand that the easiest way to implement velocity Verlet was to
   split
   the updates in two updates. But I don't understad the order of those
   updates.
   I mean why there are two updates for velocities and then the update
 for
   positions?
   My intuitive idea would be to update first one half for velocities,
  then a
   full step for positions and, finally, using these new positions the
  second
   half for velocities.
  
  
   Yes, there are two separate half-step updates for velocities.  The
   comments in the md.cpp code are quite verbose if you want to trace
  through.
  
   -Justin
  
   --
   ==
  
   Justin A. Lemkul, Ph.D.
   Ruth L. Kirschstein NRSA Postdoctoral Fellow
  
   Department of Pharmaceutical Sciences
   School of Pharmacy
   Health Sciences Facility II, Room 629
   University of Maryland, Baltimore
   20 Penn St.
   Baltimore, MD 21201
  
   jalem...@outerbanks.umaryland.edu | (410) 706-7441
   http://mackerell.umaryland.edu/~jalemkul
  
   ==
  
   --
   Gromacs Users mailing list
  
   * Please search the archive at http://www.gromacs.org/
   Support/Mailing_Lists/GMX-Users_List before posting!
  
   * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
  
   * For (un)subscribe requests visit
   https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
   send a mail to gmx-users-requ...@gromacs.org.
  
  --
  Gromacs Users mailing list
 
  * Please search the archive at
  http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
  posting!
 
  * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
 
  * For (un)subscribe requests visit
  https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
  send a mail to gmx-users-requ...@gromacs.org.
 
 --
 Gromacs Users mailing list

 * Please search the archive at
 http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
 posting!

 * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

 * For (un)subscribe requests visit
 https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
 send a mail to gmx-users-requ...@gromacs.org.

-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Velocity Verlet integrator

2014-10-15 Thread Michael Shirts
Yes, I've been using the theory here:

http://arxiv.org/abs/1301.3800

Which describes how to concantenate integrator steps in a formal way.

I can say that the time savings you get by concatenating integrators is
VERY small.  The only time it is nonnegligible is when there is a LOT of
communication, and even then, there are better ways to make simulations
faster.  It's not an area where there is a lot of improvement that can be
made.

When doing temperature and pressure control, there are many cases that you
cannot really join the steps as well.

On Wed, Oct 15, 2014 at 10:05 AM, Mario Fernández Pendás 
mariof...@gmail.com wrote:

 Thank you very much Professor Shirts.

 I have these doubts because I am trying to implement new integrators based
 in the concatenation of two VV steps to make a single step. The idea
 follows the integrators suggested in
 http://web.mit.edu/~ripper/www/research/efficient_md_integrators.pdf

 This is why it is important for me to know where each step starts and
 finishes.

 2014-10-15 15:52 GMT+02:00 Michael Shirts mrshi...@gmail.com:

  Because the 'start' of the vv integrator step is halfway through the
 loop.
  This is a byproduct of 1) putting leapfrog and velocity verlet in the
 same
  loop and 2) minimizing communication and output.  It is not as elegant as
  it should be.  There are efforts to clean this up, but it's a lot of
  reorganization, and has gone slowly.
 
  On Wed, Oct 15, 2014 at 8:46 AM, Mario Fernández Pendás 
  mariof...@gmail.com
   wrote:
 
   Yes, I understand that. But my question is more about why the two
  velocity
   updates are implemented before the position update and not the other
 way
   round?
  
   From the theoretical point of view I would think more in one of the
   following schemes:
  
  
  1. Calculate: [image: \vec{v}\left(t + \tfrac12\,\Delta t\right) =
  \vec{v}(t) + \tfrac12\,\vec{a}(t)\,\Delta t\,]
  2. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
  \vec{v}\left(t + \tfrac12\,\Delta t\right)\, \Delta t\,]
  3. Derive [image: \vec{a}(t + \Delta t)] from the interaction
  potential
  using [image: \vec{x}(t + \Delta t)]
  4. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}\left(t +
  \tfrac12\,\Delta t\right) + \tfrac12\,\vec{a}(t + \Delta t)\Delta
 t,]
  
  
  
  1. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
  \vec{v}(t)\,
  \Delta t+\tfrac12 \,\vec{a}(t)\,\Delta t^2]
  2. Derive [image: \vec{a}(t + \Delta t)] from the interaction
  potential
  using [image: \vec{x}(t + \Delta t)]
  3. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}(t) +
  \tfrac12\,\left(\vec{a}(t)+\vec{a}(t + \Delta t)\right)\Delta t\,]
  
  
   This is why my confusion arises.
  
  
   2014-10-15 14:05 GMT+02:00 Justin Lemkul jalem...@vt.edu:
  
   
   
On 10/15/14 7:30 AM, Mario Fernández Pendás wrote:
   
Dear all,
   
I am still interested in some integrator related issues.
   
I understand that the easiest way to implement velocity Verlet was
 to
split
the updates in two updates. But I don't understad the order of those
updates.
I mean why there are two updates for velocities and then the update
  for
positions?
My intuitive idea would be to update first one half for velocities,
   then a
full step for positions and, finally, using these new positions the
   second
half for velocities.
   
   
Yes, there are two separate half-step updates for velocities.  The
comments in the md.cpp code are quite verbose if you want to trace
   through.
   
-Justin
   
--
==
   
Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow
   
Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201
   
jalem...@outerbanks.umaryland.edu | (410) 706-7441
http://mackerell.umaryland.edu/~jalemkul
   
==
   
--
Gromacs Users mailing list
   
* Please search the archive at http://www.gromacs.org/
Support/Mailing_Lists/GMX-Users_List before posting!
   
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
   
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
 or
send a mail to gmx-users-requ...@gromacs.org.
   
   --
   Gromacs Users mailing list
  
   * Please search the archive at
   http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
   posting!
  
   * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
  
   * For (un)subscribe requests visit
   https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
   send a mail to gmx-users-requ...@gromacs.org.
  
  --
  Gromacs Users mailing list
 
  * Please search the archive at
  

Re: [gmx-users] Velocity Verlet integrator

2014-10-15 Thread Mario Fernández Pendás
Thank you very much for this reference. I will take a look at it carefully.

We are trying to develop and implement this integrators for hybrid Monte
Carlo simulations and our interest is not really related to time saving but
to sampling efficiency.

Right now it doesn't look straightforward to me to adapt GROMACS to this
integration schemes.

2014-10-15 17:05 GMT+02:00 Michael Shirts mrshi...@gmail.com:

 Yes, I've been using the theory here:

 http://arxiv.org/abs/1301.3800

 Which describes how to concantenate integrator steps in a formal way.

 I can say that the time savings you get by concatenating integrators is
 VERY small.  The only time it is nonnegligible is when there is a LOT of
 communication, and even then, there are better ways to make simulations
 faster.  It's not an area where there is a lot of improvement that can be
 made.

 When doing temperature and pressure control, there are many cases that you
 cannot really join the steps as well.

 On Wed, Oct 15, 2014 at 10:05 AM, Mario Fernández Pendás 
 mariof...@gmail.com wrote:

  Thank you very much Professor Shirts.
 
  I have these doubts because I am trying to implement new integrators
 based
  in the concatenation of two VV steps to make a single step. The idea
  follows the integrators suggested in
  http://web.mit.edu/~ripper/www/research/efficient_md_integrators.pdf
 
  This is why it is important for me to know where each step starts and
  finishes.
 
  2014-10-15 15:52 GMT+02:00 Michael Shirts mrshi...@gmail.com:
 
   Because the 'start' of the vv integrator step is halfway through the
  loop.
   This is a byproduct of 1) putting leapfrog and velocity verlet in the
  same
   loop and 2) minimizing communication and output.  It is not as elegant
 as
   it should be.  There are efforts to clean this up, but it's a lot of
   reorganization, and has gone slowly.
  
   On Wed, Oct 15, 2014 at 8:46 AM, Mario Fernández Pendás 
   mariof...@gmail.com
wrote:
  
Yes, I understand that. But my question is more about why the two
   velocity
updates are implemented before the position update and not the other
  way
round?
   
From the theoretical point of view I would think more in one of the
following schemes:
   
   
   1. Calculate: [image: \vec{v}\left(t + \tfrac12\,\Delta t\right) =
   \vec{v}(t) + \tfrac12\,\vec{a}(t)\,\Delta t\,]
   2. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
   \vec{v}\left(t + \tfrac12\,\Delta t\right)\, \Delta t\,]
   3. Derive [image: \vec{a}(t + \Delta t)] from the interaction
   potential
   using [image: \vec{x}(t + \Delta t)]
   4. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}\left(t +
   \tfrac12\,\Delta t\right) + \tfrac12\,\vec{a}(t + \Delta t)\Delta
  t,]
   
   
   
   1. Calculate: [image: \vec{x}(t + \Delta t) = \vec{x}(t) +
   \vec{v}(t)\,
   \Delta t+\tfrac12 \,\vec{a}(t)\,\Delta t^2]
   2. Derive [image: \vec{a}(t + \Delta t)] from the interaction
   potential
   using [image: \vec{x}(t + \Delta t)]
   3. Calculate: [image: \vec{v}(t + \Delta t) = \vec{v}(t) +
   \tfrac12\,\left(\vec{a}(t)+\vec{a}(t + \Delta t)\right)\Delta t\,]
   
   
This is why my confusion arises.
   
   
2014-10-15 14:05 GMT+02:00 Justin Lemkul jalem...@vt.edu:
   


 On 10/15/14 7:30 AM, Mario Fernández Pendás wrote:

 Dear all,

 I am still interested in some integrator related issues.

 I understand that the easiest way to implement velocity Verlet was
  to
 split
 the updates in two updates. But I don't understad the order of
 those
 updates.
 I mean why there are two updates for velocities and then the
 update
   for
 positions?
 My intuitive idea would be to update first one half for
 velocities,
then a
 full step for positions and, finally, using these new positions
 the
second
 half for velocities.


 Yes, there are two separate half-step updates for velocities.  The
 comments in the md.cpp code are quite verbose if you want to trace
through.

 -Justin

 --
 ==

 Justin A. Lemkul, Ph.D.
 Ruth L. Kirschstein NRSA Postdoctoral Fellow

 Department of Pharmaceutical Sciences
 School of Pharmacy
 Health Sciences Facility II, Room 629
 University of Maryland, Baltimore
 20 Penn St.
 Baltimore, MD 21201

 jalem...@outerbanks.umaryland.edu | (410) 706-7441
 http://mackerell.umaryland.edu/~jalemkul

 ==

 --
 Gromacs Users mailing list

 * Please search the archive at http://www.gromacs.org/
 Support/Mailing_Lists/GMX-Users_List before posting!

 * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

 * For (un)subscribe requests visit
 https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
  

Re: [gmx-users] Velocity Verlet integrator

2014-03-23 Thread Michael Shirts
Putting both velocity Verlet and leapfrog Verlet both in Gromacs turns
out to be non-trivial for the bookkeeping.  The easiest way to do this
was split the velocity Verlet updates.

Also, the additional computational cost of two half steps for
velocities is trivial compared to the cost of the forces for almost
all systems.

On Sun, Mar 23, 2014 at 8:39 AM, Mario Fernández Pendás
mariof...@gmail.com wrote:
 Dear all,

 In terms of computational efficiency, why the velocity Verlet integrator is
 implemented in GROMACS in one full step for positions and two half steps
 for velocities?

 Would it be more efficient to merge the second halft step for velocities
 with the first half step of the following scheme, ie, integrating in one
 full step for velocities?

 Thank you very much,
 Mario Fernánez-Pendás
 --
 Gromacs Users mailing list

 * Please search the archive at 
 http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

 * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

 * For (un)subscribe requests visit
 https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
 mail to gmx-users-requ...@gromacs.org.
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.