Project

General

Profile

Feature #198261

Feature #109731: Milestone release 1.0

support arbitrary number of particle instances

Added by Felix Höfling almost 5 years ago. Updated over 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Target version:
Start date:
2013-07-23
Due date:
% Done:

80%

Estimated time:

Description

For true modularity, HALMD shall support multiple instances of the particle module.

For example, it shall be possible to simulate a binary mixture either with a single particle instance of two different species or two particle instance each holding a single species. Here, the latter solution would be (slightly?) less efficient, of course, and one may give a more reasonable example. The example is just a test whether the implementation allows for such kind of modularity and flexibility.

A prerequisite is that each particle may receive force contributions from different particle instances, see #198243.


Checklist

  • add integration test for mixture with several particle instances
  • pair_full: support 2 particle instances
  • host/pair_trunc: fix two particle instances (only one force array is used)
  • gpu/neighbour/from_binning: support for two particle instances
  • make potential independent of particle instance
  • add manipulation functions for particle, e.g., split, merge, copy subset

Related issues

Related to HAL's MD package - Feature #198243: external potentials that act globally on all particlesNew2013-07-23

Related to HAL's MD package - Bug #265536: Potential energy calculated incorrecty if one particle instance is assumed to be fixedClosed2014-02-05

Associated revisions

Revision 5791 (diff)
Added by felix.h.fling over 4 years ago

add test modularity/two_particles

The purpose of the test is to check the usability of several particle
instances. The scripts setup, equilibrate, and simulate a binary mixture
where each species is kept in a separate particle instance.

Creating particle instances from subsets of particle is not yet
possible. Even a workaround in Lua via observables.phase_space is
prohibited since the data slot returned by acquire() can not be called
from Lua. Another possible workaround would use {set,get}_{position,…}
and extract the data (nested tables!) by hand. (Which I'm not going to
implement in Lua.)

Actual checks of the final result are missing though.

This commit refs #198261.

Revision 6163 (diff)
Added by nicolas.h.ft about 3 years ago

particle_group: add function to copy particle group into particle

This function will copy only position, image, velocity, mass, species.
Others do not make much sense in a new particle instance (e.g. id, force
or auxiliary variables).

In order to make this available for the group, a binding to
to_particle() in each particle_group is required. This can only happen
in the particle group itself, because knowledge about the particle
instance is required and this is not available in the base class.

Refs #198261

Revision 6255 (diff)
Added by nicolas.h.ft about 3 years ago

particle_group: add function to copy particle group into particle

This function will copy only position, image, velocity, mass, species.
Others do not make much sense in a new particle instance (e.g. id, force
or auxiliary variables).

In order to make this available for the group, a binding to
to_particle() in each particle_group is required. This can only happen
in the particle group itself, because knowledge about the particle
instance is required and this is not available in the base class.

Refs #198261

History

#1 Updated by Felix Höfling over 4 years ago

  • Target version changed from 0.3 to 5120

#2 Updated by Nicolas Höft over 4 years ago

  • Checklist changed from [ ] add integration test for mixture with several particle instances to [ ] add integration test for mixture with several particle instances, [ ] pair_full: support 2 particle instances, [ ] host/pair_trunc: fix two particle instances (only one force array is used), [ ] gpu/neighbour/from_binning: support for two particle instances

#3 Updated by Felix Höfling over 4 years ago

  • Checklist changed from [ ] add integration test for mixture with several particle instances, [ ] pair_full: support 2 particle instances, [ ] host/pair_trunc: fix two particle instances (only one force array is used), [ ] gpu/neighbour/from_binning: support for two particle instances to [ ] add integration test for mixture with several particle instances, [ ] pair_full: support 2 particle instances, [ ] host/pair_trunc: fix two particle instances (only one force array is used), [ ] gpu/neighbour/from_binning: support for two particle instances, [ ] make potential independent of particle instance, [ ] add manipulation functions for particle, e.g., split, merge, copy subset

The support of several particle instances crucially needs ways to manipulate the data in particles. For example, the assignment of initial positions should occur on a single particle instance to avoid overlaps. This instance may be split up later on.

As a workaround, one may extract a phase space sample for a subset of the particles which is then used to create a new particle instance. Such a basic functionality, however, should not be left to the user.

#4 Updated by Nicolas Höft over 4 years ago

Felix Höfling wrote:

The support of several particle instances crucially needs ways to manipulate the data in particles. For example, the assignment of initial positions should occur on a single particle instance to avoid overlaps. This instance may be split up later on.

What about creating particle instances from particle groups?

#5 Updated by Felix Höfling over 4 years ago

This is precisely what is needed, see commit:a44471d, e.g.,

particle:copy({group = groups["A"], label = "A"})

Actually, there are so many things missing for the smooth coexistence of several particle instances that I tend to postpone it after release 0.3. For many applications, a single particle instance seems sufficient.

#6 Updated by Felix Höfling over 4 years ago

  • Checklist set to [x] make potential independent of particle instance

#7 Updated by Felix Höfling over 4 years ago

  • Checklist set to [x] add integration test for mixture with several particle instances

#8 Updated by Felix Höfling about 4 years ago

  • Target version changed from 5120 to 1.0

#9 Updated by Felix Höfling about 4 years ago

  • Checklist set to [x] pair_full: support 2 particle instances

#10 Updated by Nicolas Höft about 4 years ago

  • Checklist set to [x] host/pair_trunc: fix two particle instances (only one force array is used)

#11 Updated by Nicolas Höft about 4 years ago

  • Checklist set to [x] gpu/neighbour/from_binning: support for two particle instances

#12 Updated by Felix Höfling over 1 year ago

  • Status changed from New to In Progress

Also available in: Atom PDF