A particle group represents a subset of particles, which is defined by an instance of particle together with a sequence of indices.
Example:
-- construct particle instance for given simulation domain
local system = halmd.mdsim.particle({box = box, particles = 10000, species = 2})
-- select each species, assuming particles of a species have contiguous tags
local group_A = halmd.mdsim.particle_groups.from_range({particle = system, range = {1, 5000}, label = "A"})
local group_B = halmd.mdsim.particle_groups.from_range({particle = system, range = {5001, 10000}, label = "B"})
Construct particle group from tag range.
Parameters: |
|
---|
Note
Particle tags are 1-based, i.e. the first particle has tag 1.
Instance of halmd.mdsim.particle
Number of particles in group.