How glotzerlab/hoomd-blue works
HOOMD-blue is a Python interface and native CPU/GPU engine for particle simulations. Users create a simulation, provide or initialize particle state, attach an integrator and its model, then run timesteps and write trajectory or logged data. Its major simulation domains are molecular dynamics (MD), hard-particle Monte Carlo (HPMC), and multiparticle collision dynamics (MPCD), with shared state, device, operation, and communication infrastructure. The graph reflects the README workflows and repository layout; sampled excerpts do not expose every runtime call, so uncertain wiring is omitted.
Main entry points: operations.py Operations · state.py System state · integrate.py MPCD integrator · simulation.py Simulation
Components 27
Simulation setup
- Simulation
hoomd/simulation.py - Operations
hoomd/operations.py - System state
hoomd/state.py - Snapshot data
hoomd/snapshot.py - CPU or GPU
hoomd/device.py
Molecular dynamics
- MD integrator
hoomd/md/integrate.py - MD forces
hoomd/md/force.py - Neighbor lists
hoomd/md/nlist.py - Pair potentials
hoomd/md/pair/pair.py - Integration methods
hoomd/md/methods/methods.py
Hard-particle MC
- HPMC integrator
hoomd/hpmc/integrate.py - HPMC pair potentials
hoomd/hpmc/pair/pair.py - HPMC updates
hoomd/hpmc/update.py
Multiparticle dynamics
- MPCD integrator
hoomd/mpcd/integrate.py - Collision methods
hoomd/mpcd/collide.py - Streaming methods
hoomd/mpcd/stream.py - Virtual particles
hoomd/mpcd/fill.py
Runtime and output
- Analysis operations
hoomd/operation.py - State updates
hoomd/update/__init__.py - Parameter tuning
hoomd/tune/__init__.py - GSD reader
hoomd/GSDReader.cc - GSD writer
hoomd/write/gsd.py - Native simulation core
hoomd/SystemDefinition.h - Particle data
hoomd/ParticleData.h - Domain communication
hoomd/Communicator.h
Other components
- Simulation user
- Trajectory file
Connections 26
- Simulation user → Simulation: configures
- Simulation → CPU or GPU: selects device
- Simulation → Operations: runs operations
- Simulation user → System state: initializes
- Snapshot data → System state: provides data
- GSD reader → System state: loads frames
- Operations → MD integrator: dispatches
- Operations → HPMC integrator: dispatches
- Operations → MPCD integrator: dispatches
- MD integrator → MD forces: evaluates forces
- MD integrator → Integration methods: applies methods
- MD forces → Neighbor lists: uses neighbors
- Pair potentials → MD forces: provides interactions
- HPMC integrator → HPMC pair potentials: evaluates overlaps
- HPMC integrator → HPMC updates: applies moves
- MPCD integrator → Streaming methods: streams particles
- MPCD integrator → Collision methods: collides particles
- MPCD integrator → Virtual particles: fills particles
- Analysis operations → System state: reads state
- State updates → System state: modifies state
- Parameter tuning → Operations: adjusts parameters
- Operations → Native simulation core: executes simulation
- Native simulation core → Particle data: accesses particles
- Native simulation core → Domain communication: exchanges domains
- GSD writer → System state: reads state
- GSD writer → Trajectory file: writes frames