h5md-user
[Top][All Lists]
Advanced

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

Re: [h5md-user] Particle tracking


From: Pierre de Buyl
Subject: Re: [h5md-user] Particle tracking
Date: Tue, 03 Sep 2013 12:14:49 -0400
User-agent: Internet Messaging Program (IMP) H4 (5.0.21)

Hi,

Olaf Lenz <address@hidden> a écrit :
It looks to me as though reading the positions from an h5md-file is
becoming pretty difficult meanwhile.
I would suggest to implement a h5md library in C that provides functions
to read the particle trajectory (and possibly other structures later
on). Such a library can serve both as a reference implementation as well
as a library that can be interfaced from various languages.

A C reference library would be nice indeed.

The basic idea would be that the library initially allows to loop over
all timesteps and provides functions to initialize the loop, go to the
next timestep, and get the positions in the current timestep. The
positions will be ordered; this means that e.g. the id will have to be
handled, etc.

Of course, such a library will not be able to handle all possible cases
efficiently, but it can show how to handle them at all.

I even know who is going to implement it: my student helpers that are
working on the VMD plugin. They have to write C-functions to read the
positions anyway, so we just have to factor out these functions into the
library.

I just uploaded to the branch test_open at https://github.com/pdebuyl/pyh5md
in which there is an example of an open system.

The simulation is a random walk in which the particles disappear when exiting
the simulation box (similar to Mathieu's problem) and new particles appear
randomly (i.e. at random times) at the center of the box. Each new particles
carries a yet unused id. It is thus different than particles moving around
nodes in a parallel simulations.

The script show_walk_2d.py displays the trajectory for each id found in the
system. It is very (very) inefficient but works.

It is in Python, indeed, but it is a nice proof of principle :-)

Pierre





reply via email to

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