[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] (no subject)

From: Georg Rempfer
Subject: Re: [ESPResSo-users] (no subject)
Date: Sun, 15 Mar 2015 16:39:46 +0100

To make the short range force calculations O(n) with n the particle number, Espresso uses so-called cell-lists. Without having read that code, I am pretty sure that local_cells.n is the number of these cells processed by the local mpi rank and cell->n is the number of particles within one such cell.

On Sun, Mar 15, 2015 at 4:24 PM, Evyatar Arad <address@hidden> wrote:

Hello again everyone,

Serval questions here.

1) While going through the code of the Velocity-Verlet integrator, I’ve noticed the 3rd integration step is preformed with a call to “force_calc”.

One of the comments describing the function stated that the forces are initialised with “friction_thermo_langevin” from the thermostat.cpp code ( "Initialise forces with: \ref friction_thermo_langevin (ghost forces with zero)”).

This may come as trivial, why are the langevin coefficients needed to initialise the basic particle forces (FENE, harmonic etc.)?

2) Also, I couldn’t actually find any reference in the “force_calc” function’s body to “friction_thermo_langevin” or  “init_local_particle_force”. When and where does “friction_thermo_langevin” actually gets called?

3)In addition, I’ve been inspecting propagate_vel_pos and noticed two main loops.

The first runs ‘local_cells.n' times and the secondary one runs 'cell->n' times.

What do these values mean?

While running the example script ‘simplebilayer.tcl’ with 360 lipids the values are a steady 125 for the first loop (local_cells.n) and a random number (0 - ~30) in for the second loop (cell->n). Relevant code:

void propagate_vel_pos()


 for (c = 0; c < local_cells.n; c++) {

   cell = local_cells.cell[c];

   p  = cell->part;

   np = cell->n;

   printf("c,np= %d, %d \n",local_cells.n,np); //my addition

   for(i = 0; i < np; i++) {


      if (ifParticleIsVirtual(&p[i])) continue;


    for(j=0; j < 3; j++){


if (!(p[i].l.ext_flag & COORD_FIXED(j)))



   /* Propagate velocities: v(t+0.5*dt) = v(t) + 0.5*dt * f(t) */

   p[i].m.v[j] += p[i].f.f[j];

   /* Propagate positions (only NVT): p(t + dt)   = p(t) + dt * v(t+0.5*dt) */

   p[i].r.p[j] += p[i].m.v[j];




Have a great week, thanks in advance,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]