[MMTK] Auto-discard notification

Konrad Hinsen research at khinsen.fastmail.net
Fri Jun 24 16:47:36 UTC 2011


On 24 Jun, 2011, at 10:10 , n.becker at amolf.nl wrote:

> i have written a simulation steering algorithm in python, which allows
> trajectories to be simulated over a certain time, then stores them as
> Datasets in a HDF5 file (using h5py). Later, the trajectory may be
> revisited and re-started, according to some criteria determined by my
> steering method.
> 
> the actual propagation algorithm depends on the particular use case and
> is 'supplied by the user'.  i am looking into doing md simulations in
> this way.
> 
> mmtk looks like a goog match since it is python-scriptable and flexible.
> would mmtk be a good match from the point of view of how trajectories
> are stored and restarted? i gathered that the trajectories are netcdf4
> files, and apparently netcdf4 is built on hdf5. is it feasible to have
> mmtk store trajectories as a Dataset in hdf5 instead of standalone
> netcdf files? alternatively, could i link an mmtk trajectory file by
> using an external reference in my master hdf5 file?

MMTK currently uses netCDF for storing trajectory files. If you use netCDF4 (which is not a requirement; MMTK works just fine with netCDF 3), it should indeed be possible to generate trajectories that are HDF5 files following the netCDF conventions. I say "should" because I didn't actually try this yet. But in theory, it should be sufficient to use file mode "w4" for doing what you want, i.e.

	Trajectory(universe, "my_trajectory.h5", "w4")

If that works indeed, then you can of course use links from other HDF5 files.

Note also that in the long run MMTK will transition to HDF5 for trajectory storage in oder to profit from the added performance, in particular on parallel machines. This is something we have just started to work on, but we can't give a time schedule yet.

> Does MMTK contain ready-to-use interaction forces to implement a MD
> simulation of a generic polymer model, with short-range (LJ) repulsion
> and FENE springs between beads on a chain? Or for that matter, maybe
> even fixed bond lengths?
> 
> I did not find anything pre-existing. Would it be relatively easy to
> extend MMTK to do that? If yes, where would I need to start?

LJ is there, either on its own (MMTK.ForceFields.LennardJonesForceField) or as part of the Amber or OPLS force fields. FENE springs are not there, just harmonic bond terms. Fixed bonds are implemented, of course.

If you need FENE springs for your application, you would have to add a FENE potential term to MMTK. From my point of view as an MMTK developer, that is pretty trivial (just another two-particle term), but for a newcomer this is obviously less obvious. MMTK comes with examples for adding force field terms, which are the best starting point.

MMTK can also handle exclusions, such as not having LJ terms for the atom pairs that have springs between them. This requires writing another ForceField class that combines LJ and FENE and specifies their interaction. The provided MMForceField class would be the best starting point for seeing how this works.

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: research AT khinsen DOT fastmail DOT net
---------------------------------------------------------------------






More information about the mmtk mailing list