|
From: | Evyatar Arad |
Subject: | [ESPResSo-users] (no subject) |
Date: | Sun, 15 Mar 2015 17:24:33 +0200 |
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++) {
#ifdef VIRTUAL_SITES
if (ifParticleIsVirtual(&p[i])) continue;
#endif
for(j=0; j < 3; j++){
#ifdef EXTERNAL_FORCES
if (!(p[i].l.ext_flag & COORD_FIXED(j)))
#endif
{
/* 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,
Evyatar.
[Prev in Thread] | Current Thread | [Next in Thread] |