|Subject:||Re: [ESPResSo-users] Access local particles in each linked cell|
|Date:||Thu, 12 Dec 2013 16:11:43 +0100|
Hi!On what level do you want to access the particles? And do you really need to access the particles per cell, or just all particles on this processor, or just all particles?From a Tcl script, you can easily access all particles in the simulation via the "part $pid print" command. You have no access to the linked cells, as they have no physical meaning. However, it is of course simple to compute what cell a particle would be in.From serial C code, you can also access all particles. Again, you have no access to the linked cells. To see how to access all particles, have a look at the function "mindist" in src/statistics.cpp.If you really need to access the particles in the linked cells (why would you want that?), you will have to do this in parallel. As an example, have a look at "predict_momentum_particles" in src/statistics.cpp. If you actually need a loop over all particles within the cutoff range, have a look at the function "aggregation" in the same file.
Olaf--2013/12/12 Rahul Arora <address@hidden>
Dear Espresso Users,
I am simulating a simple Lennard-Jones fluid using Espresso. I am trying to access the particles in each linked cell (I found the type ParticleList in Espresso source code) of the my simulation domain and calculate the average properties in each linked cell. Is there any subroutine available to iterate over all the molecules in each linked cell?
Thanks in advance
Rahul AroraDr. rer. nat. Olaf LenzInstitut für Computerphysik, Allmandring 3, D-70569 StuttgartPhone: +49-711-685-63607
|[Prev in Thread]||Current Thread||[Next in Thread]|