[gmx-developers] Verlet Algorithm

Elena della Valle elena.dv46 at yahoo.it
Tue Oct 4 17:52:08 CEST 2016


Perfect Thanks for you suggestions, I will check all these parameters

Best Regards

Elena della Valle


Il 04/10/2016 17:41, Michael R Shirts ha scritto:
> I think it’s that the best thing to do in testing algorithms is to come up with some good tests. Having other people inspect code is not as useful, because they may miss something, especially if only a code fragment is given.
>
> The most important tests for a new integrator:
>
> • Should it conserve energy when run with NVE? If so, does it?  It should conserve energy as well as the current integrators.
> • Is it symplectic? (if Verlet, the answer is yes). If so, then the fluctuations in energy must scale as (dt)^2.
>
> For new functionality:
>
> • What model systems can I run that give analytical or at least well-known answers?  For example, if adding a magnetic field, then you would expect cyclotron orbits for a single charged ion.  Does this happen, and do the orbits have the right radius as a function of mass, charge, field, etc.?
>
> These would be the most important things to check.  If it passes these checks, then it likely is working correctly.
>
> Best,
> ~~~~~~~~~~~~~~~~
> Michael Shirts
> Associate Professor
> michael.shirts at colorado.edu
> http://www.colorado.edu/lab/shirtsgroup/
> Phone: (303) 735-7860
> Office: JSCBB C123
> Department of Chemical and Biological Engineering
> University of Colorado Boulder
> On 10/4/16, 9:03 AM, "gromacs.org_gmx-developers-bounces at maillist.sys.kth.se on behalf of Elena Della valle" <gromacs.org_gmx-developers-bounces at maillist.sys.kth.se on behalf of elena.dv46 at yahoo.it> wrote:
>
>      I used the gromacs 4.6.5
>      Best regards
>      Elena della Valle
>      
>      
>      > Il giorno 04 ott 2016, alle ore 16:49, David van der Spoel <spoel at xray.bmc.uu.se> ha scritto:
>      >
>      >> On 04/10/16 15:15, Elena della Valle wrote:
>      >>
>      >> Hi to all,
>      >>
>      >> I'm Elena della Valle, a Ph.D. student coming from la Sapienza
>      >> University of Rome.
>      >>
>      >> I'm writing because I have some questions about some modifications that
>      >> I have done to the update of velocities and positions in the verlet
>      >> algorithm. My aim is to implement the magnetic field in gromacs by
>      >> introducing the therm of the larmor frequency to the velocities and
>      >> positions. By literature I read that this has been done by the update of
>      >> the verlet velocities and positions with the frequency larmor therm.
>      >> These are  the equations in order to be more clear on what i wanted to do:
>      >>
>      >> I did this by modifying in the update.c file in gromacs the
>      >> update_do_vv_vel and update_do_vv_pos ad follows:
>      >>
>      >> if ((ptype[n] != eptVSite) && (ptype[n] != eptShell) && !nFreeze[gf][d])
>      >>            {
>      >>                v[n][0] = mv1*(mv1*v[n][0] +
>      >> 0.5*(w_dt*mv2*f[n][0]))+0.5*accel[ga][0]*dt +
>      >> w_dt*charge[n]*campoB*v[n][1]*mv1*mv1 +
>      >> 0.25*dt*invmass[n]*charge[n]*campoB*((w_dt*mv2*mv1*f[n][1]) +
>      >> accel[ga][1]*dt -2*w_dt*charge[n]*campoB*mv1*mv1*v[n][0]);
>      >>                v[n][1] = mv1*(mv1*v[n][1] +
>      >> 0.5*(w_dt*mv2*f[n][1]))+0.5*accel[ga][1]*dt +
>      >> w_dt*charge[n]*campoB*v[n][0]*mv1*mv1 -
>      >> 0.25*dt*invmass[n]*charge[n]*campoB*((w_dt*mv2*mv1*f[n][0]) +
>      >> accel[ga][0]*dt +2*w_dt*charge[n]*campoB*mv1*mv1*v[n][1]);
>      >>                v[n][2] = mv1*(mv1*v[n][2] +
>      >> 0.5*(w_dt*mv2*f[n][2]))+0.5*accel[ga][2]*dt;
>      >>
>      >>
>      >>
>      >>            //printf("frame %lf \n", mv1);
>      >>           // printf("frame %d: %lf\t%lf%lf\n", n, v[n][0], v[n][1],
>      >> v[n][2]);
>      >>            }
>      >>
>      >> in the do_update_vv_pos:
>      >>
>      >> if ((ptype[n] != eptVSite) && (ptype[n] != eptShell) && !nFreeze[gf][d])
>      >>            {
>      >>                xprime[n][0]   = mr1*(mr1*x[n][0]+mr2*dt*v[n][0]) +
>      >> mr1*0.5*dt*(w_dt*mr2*f[n][0] + w_dt*charge[n]*campoB*v[n][1]*mr1);
>      >>                xprime[n][1]   = mr1*(mr1*x[n][1]+mr2*dt*v[n][1]) +
>      >> mr1*0.5*dt*(w_dt*mr2*f[n][1] - w_dt*charge[n]*campoB*v[n][0]*mr1);
>      >>                xprime[n][2]   = mr1*(mr1*x[n][2]+mr2*dt*v[n][2]) +
>      >> mr1*0.5*dt*(w_dt*mr2*f[n][2]);
>      >>            }
>      >>
>      >>
>      >> After that in the grompp file I modified the integrator in md-vv and I
>      >> run the simulation and it seems to use the position and velocities
>      >> modifications.
>      >>
>      >> I want know if you think that this way is correct, if I implemented in
>      >> the right way
>      >>
>      >> And Also I would like to know if in the grompp file I have to modify
>      >> other parameters (I use a beredensed coupling)
>      >>
>      >> Thanks in advance
>      >> Sorry for bothering you
>      >> Best Regards
>      >> Elena della Valle
>      >>
>      >> --
>      >> Elena della Valle
>      >> Ph.D. Student in Electronic Engineering
>      >>
>      >> Department of Information Engineering, Electronics and Telecommunications
>      >> Sapienza, University of Rome
>      >> via Eudossiana, 18 00184 Rome
>      >>
>      >>
>      >>
>      > Just a quick question: which version did you use? All development should be in the master version and this looks like uses something older.
>      >
>      >
>      >
>      > --
>      > David van der Spoel, Ph.D., Professor of Biology
>      > Dept. of Cell & Molec. Biol., Uppsala University.
>      > Box 596, 75124 Uppsala, Sweden. Phone:    +46184714205.
>      > spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
>      > --
>      > Gromacs Developers mailing list
>      >
>      > * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_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-developers or send a mail to gmx-developers-request at gromacs.org.
>      
>      --
>      Gromacs Developers mailing list
>      
>      * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_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-developers or send a mail to gmx-developers-request at gromacs.org.
>      
>

-- 
Elena della Valle
Ph.D. Student in Electronic Engineering

Department of Information Engineering, Electronics and Telecommunications
Sapienza, University of Rome
via Eudossiana, 18 00184 Rome



More information about the gromacs.org_gmx-developers mailing list