mpcd.tune¶
Overview
MPCD particle sorter. |
Details
MPCD tuning operations.
These operations will affect the performance of MPCD simulations but not their correctness.
- class hoomd.mpcd.tune.ParticleSorter(trigger)¶
Bases:
TriggeredOperationMPCD particle sorter.
- Parameters:
trigger (hoomd.trigger.trigger_like) – Select the time steps on which to sort.
This tuner sorts the MPCD particles into cell order. To perform the sort, the cell list is first computed with the current particle order. Particles are then reordered in memory as they are stored in the cell list, which can significantly improve performance of all subsequent cell-based steps of the MPCD algorithm due to improved cache coherency.
The optimal frequency for sorting depends on the number of particles, so the
triggeritself should be tuned to give the maximum performance. The trigger’s period should be a multiple ofhoomd.mpcd.collide.CollisionMethod.periodto avoid unnecessary cell list builds. Typically, using a small multiple (tens) of the collision period works best.To achieve the best performance, the
ParticleSorteris not added tohoomd.Operations.tuners. Instead, set it inhoomd.mpcd.Integrator.mpcd_particle_sorter.Essentially all MPCD systems benefit from sorting, so it is recommended to use one for all simulations!
Example:
sorter = hoomd.mpcd.tune.ParticleSorter(trigger=20) simulation.operations.integrator.mpcd_particle_sorter = sorter
- trigger¶
Number of integration steps between sorting.
Example:
sorter.trigger = 20
- Type: