<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi to all,</p>
    <p>I'm Elena della Valle, a Ph.D. student coming from la Sapienza
      University of Rome.</p>
    <p>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:</p>
    <p><img src="cid:part1.251A4226.CEFEA2D6@yahoo.it" alt=""></p>
    <p> I did this by modifying in the update.c file in gromacs the
      update_do_vv_vel and update_do_vv_pos ad follows:</p>
    <p> if ((ptype[n] != eptVSite) &amp;&amp; (ptype[n] != eptShell)
      &amp;&amp; !nFreeze[gf][d])<br>
                  {<br>
                      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]);<br>
                      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]);<br>
                      v[n][2] = mv1*(mv1*v[n][2] +
      0.5*(w_dt*mv2*f[n][2]))+0.5*accel[ga][2]*dt;<br>
                      <br>
                      <br>
                      <br>
                  //printf("frame %lf \n", mv1);<br>
                 // printf("frame %d: %lf\t%lf%lf\n", n, v[n][0],
      v[n][1], v[n][2]);<br>
                  }</p>
    <p>in the do_update_vv_pos:</p>
    <p>if ((ptype[n] != eptVSite) &amp;&amp; (ptype[n] != eptShell)
      &amp;&amp; !nFreeze[gf][d])<br>
                  {<br>
                      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);<br>
                      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);<br>
                      xprime[n][2]   = mr1*(mr1*x[n][2]+mr2*dt*v[n][2])
      + mr1*0.5*dt*(w_dt*mr2*f[n][2]);<br>
                  }</p>
    <p><br>
    </p>
    <p>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. <br>
    </p>
    <p>I want know if you think that this way is correct, if I
      implemented in the right way</p>
    <p>And Also I would like to know if in the grompp file I have to
      modify other parameters (I use a beredensed coupling)<br>
    </p>
    Thanks in advance <br>
    Sorry for bothering you<br>
    Best Regards <br>
    Elena della Valle
    <pre class="moz-signature" cols="72">-- 
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</pre>
  </body>
</html>