Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
HOOMD-blue 5.2.0 documentation
Logo

Guides

  • Getting started
    • Features
    • Installing binaries
    • Building from source
    • Extending HOOMD-blue
    • Citing HOOMD-blue
  • Tutorials
    • Introducing HOOMD-blue
      • The Simulation Object
      • Performing Hard Particle Monte Carlo Simulations
      • Initializing the System State
      • Randomizing the System
      • Compressing the System
      • Equilibrating the System
      • Analyzing Trajectories
    • Introducing Molecular Dynamics
      • Molecular Dynamics Simulations
      • Initializing a Random System
      • Compressing the System
    • Logging
      • Logging to a file
      • Saving Array Quantities
      • Storing Particle Shape
      • Writing Formatted Output
    • Parallel Simulation With MPI
      • Introduction to MPI
      • Domain Decomposition
      • Accessing System Configurations With MPI
      • Running Multiple Simulations With Partitions
    • Custom Actions in Python
      • What are Actions?
      • An Initial Custom Action
      • Custom Action Features
      • Custom Updater
      • Custom Writer
      • Improving Performance
    • Organizing and Executing Simulations
      • Organizing Data
      • Executing Simulations
      • Continuing Simulations
      • Submitting Cluster Jobs
    • Modelling Rigid Bodies
      • Introduction to Rigid Bodies
      • Running Rigid Body Simulations
      • Preparing a General Body
    • Modelling Patchy Particles
      • The Kern–Frenkel Model
      • Simulating a System of Patchy Particles with HPMC
    • Placing barriers in the simulation box
      • Barriers
      • Fixed particles
      • Wall geometries
      • Wall potential (MD)
      • Wall potential (HPMC)
    • Introducing Multiparticle Collison Dynamics
      • Pressure-Driven Flow Between Parallel Plates
      • Diffusion of a Solution of Nearly-Hard Spheres
    • Modelling Flexible Active Interfaces
      • Describing Membranes as Meshes
      • Simulating a Vesicle with MD
  • How-to
    • How to determine the most efficient device
    • How to choose the neighbor list buffer distance
    • How to model molecular systems
    • How to continuously vary potential parameters
    • How to apply arbitrary forces in MD
    • How to minimize the potential energy of a system
    • How to prevent particles from moving
    • How to compute the free energy of solids
    • How to apply arbitrary pair potentials in HPMC
    • How to tune move sizes in multicomponent HPMC systems

Python API

  • hoomd
    • box
      • BoxInterface
    • communicator
      • Communicator
    • custom
      • Action
      • CustomOperation
    • data
      • AngleLocalAccessBase
      • BondLocalAccessBase
      • ConstraintLocalAccessBase
      • DihedralLocalAccessBase
      • HOOMDArray
      • HOOMDGPUArray
      • ImproperLocalAccessBase
      • LocalSnapshot
      • LocalSnapshotGPU
      • PairLocalAccessBase
      • ParticleLocalAccessBase
      • TypeParameter
    • device
      • CPU
      • Device
      • GPU
      • NoticeFile
      • auto_select
    • error
      • DataAccessError
      • GPUNotAvailableError
      • IncompleteSpecificationError
      • IsolationWarning
      • MPINotAvailableError
      • MutabilityError
      • SimulationDefinitionError
      • TypeConversionError
    • filter
      • All
      • CustomFilter
      • Intersection
      • Null
      • ParticleFilter
      • Rigid
      • SetDifference
      • Tags
      • Type
      • Union
    • logging
      • Logger
      • LoggerCategories
      • log
      • modify_namespace
    • mesh
      • Mesh
    • operation
      • AutotunedObject
      • Compute
      • Integrator
      • Operation
      • TriggeredOperation
      • Tuner
      • Updater
      • Writer
    • trigger
      • After
      • And
      • Before
      • Not
      • On
      • Or
      • Periodic
      • Trigger
    • tune
      • CustomTuner
      • GradientDescent
      • GridOptimizer
      • LoadBalancer
      • ManualTuneDefinition
      • Optimizer
      • ParticleSorter
      • RootSolver
      • ScaleSolver
      • SecantSolver
      • SolverStep
    • update
      • BoxResize
      • CustomUpdater
      • FilterUpdater
      • RemoveDrift
    • util
      • make_example_simulation
    • variant
      • box
        • BoxVariant
        • Constant
        • Interpolate
        • InverseVolumeRamp
      • Constant
      • Cycle
      • Power
      • Ramp
      • Variant
    • version
    • wall
      • Cylinder
      • Plane
      • Sphere
      • WallGeometry
    • write
      • Burst
      • CustomWriter
      • DCD
      • GSD
      • HDF5Log
      • Table
    • Box
    • Operations
    • Simulation
    • Snapshot
    • State
  • hpmc
    • compute
      • FreeVolume
      • SDF
    • external
      • External
      • Harmonic
      • Linear
      • WallPotential
    • integrate
      • ConvexPolygon
      • ConvexPolyhedron
      • ConvexSpheropolygon
      • ConvexSpheropolyhedron
      • ConvexSpheropolyhedronUnion
      • Ellipsoid
      • FacetedEllipsoid
      • FacetedEllipsoidUnion
      • HPMCIntegrator
      • Polyhedron
      • SimplePolygon
      • Sphere
      • SphereUnion
      • Sphinx
    • nec
      • integrate
        • ConvexPolyhedron
        • HPMCNECIntegrator
        • Sphere
      • tune
        • ChainTime
    • pair
      • AngularStep
      • ExpandedGaussian
      • LJGauss
      • LennardJones
      • OPP
      • Pair
      • Step
      • Union
    • shape_move
      • Elastic
      • ShapeMove
      • ShapeSpace
      • Vertex
    • tune
      • BoxMCMoveSize
      • MoveSize
    • update
      • BoxMC
      • GCA
      • MuVT
      • QuickCompress
      • Shape
  • md
    • alchemy
      • methods
        • Alchemostat
        • NVT
      • pair
        • AlchemicalDOF
        • AlchemicalDOFStore
        • LJGauss
    • angle
      • Angle
      • CosineSquared
      • Harmonic
      • Table
    • bond
      • Bond
      • FENEWCA
      • Harmonic
      • Table
      • Tether
    • compute
      • HarmonicAveragedThermodynamicQuantities
      • ThermodynamicQuantities
    • constrain
      • Constraint
      • Distance
      • Rigid
    • data
      • ForceLocalAccess
      • ForceLocalAccessGPU
      • NeighborListLocalAccess
      • NeighborListLocalAccessGPU
    • dihedral
      • Dihedral
      • OPLS
      • Periodic
      • Table
    • external
      • field
        • Electric
        • Field
        • Magnetic
        • Periodic
      • wall
        • ForceShiftedLJ
        • Gaussian
        • LJ
        • Mie
        • Morse
        • WallPotential
        • Yukawa
    • force
      • Active
      • ActiveOnManifold
      • Constant
      • Custom
      • Force
    • improper
      • Harmonic
      • Improper
      • Periodic
    • long_range
      • pppm
        • Coulomb
        • make_pppm_coulomb_forces
    • manifold
      • Cylinder
      • Diamond
      • Ellipsoid
      • Gyroid
      • Manifold
      • Plane
      • Primitive
      • Sphere
    • many_body
      • RevCross
      • SquareDensity
      • Tersoff
      • Triplet
    • mesh
      • bending
        • BendingRigidity
        • Helfrich
      • bond
        • FENEWCA
        • Harmonic
        • Tether
      • conservation
        • Area
        • MeshConservationPotential
        • TriangleArea
        • Volume
      • MeshPotential
    • methods
      • rattle
        • Brownian
        • DisplacementCapped
        • Langevin
        • MethodRATTLE
        • NVE
        • OverdampedViscous
      • thermostats
        • Berendsen
        • Bussi
        • MTTK
        • Thermostat
      • Brownian
      • ConstantPressure
      • ConstantVolume
      • DisplacementCapped
      • Langevin
      • Method
      • OverdampedViscous
      • Thermostatted
    • minimize
      • FIRE
    • nlist
      • Cell
      • NeighborList
      • Stencil
      • Tree
    • pair
      • aniso
        • ALJ
        • AnisotropicPair
        • Dipole
        • GayBerne
        • Patchy
        • PatchyExpandedGaussian
        • PatchyExpandedLJ
        • PatchyExpandedMie
        • PatchyGaussian
        • PatchyLJ
        • PatchyMie
        • PatchyYukawa
      • Buckingham
      • DLVO
      • DPD
      • DPDConservative
      • DPDLJ
      • Ewald
      • ExpandedGaussian
      • ExpandedLJ
      • ExpandedMie
      • ForceShiftedLJ
      • Fourier
      • Gaussian
      • LJ
      • LJ0804
      • LJ1208
      • LJGauss
      • Mie
      • Moliere
      • Morse
      • OPP
      • Pair
      • ReactionField
      • TWF
      • Table
      • WangFrenkel
      • Yukawa
      • ZBL
    • special_pair
      • Coulomb
      • LJ
      • SpecialPair
    • tune
      • NeighborListBuffer
    • update
      • ActiveRotationalDiffusion
      • ReversePerturbationFlow
      • ZeroMomentum
    • HalfStepHook
    • Integrator
  • mpcd
    • collide
      • AndersenThermostat
      • CellList
      • CollisionMethod
      • StochasticRotationDynamics
    • fill
      • GeometryFiller
      • VirtualParticleFiller
    • force
      • BlockForce
      • BodyForce
      • ConstantForce
      • SineForce
    • geometry
      • ConcentricCylinders
      • CosineChannel
      • CosineExpansionContraction
      • Geometry
      • ParallelPlates
      • PlanarPore
      • Sphere
    • methods
      • BounceBack
    • stream
      • BounceBack
      • Bulk
      • StreamingMethod
    • tune
      • ParticleSorter
    • update
      • ReverseNonequilibriumShearFlow
    • Integrator

Reference

  • Documentation
    • Notation
    • Units
    • Logo
  • Changes
    • Change Log
    • Migrating to the latest version
    • Deprecated
  • For developers
    • Contributing
    • Code style
    • Testing
  • Open source
    • License
    • Credits
  • Index
Back to top

custom¶

CustomOperation provides a mechanism for users to insert Python code via an Action subclass that executes during the simulation’s run loop. Use this to prototype new simulation methods in Python, analyze the system state while the simulation progresses, or write output to custom file formats.

See also

hoomd.tune.CustomTuner

hoomd.update.CustomUpdater

hoomd.write.CustomWriter

hoomd.md.force.Custom

Classes

  • Action
  • CustomOperation
Next
Action
Previous
Communicator

Development of HOOMD-blue is led by the Glotzer Group at the University of Michigan (supported by NSF DMR 1808342) with many external contributions.

Copyright © 2009-2025 The Regents of the University of Michigan
Made with Sphinx and @pradyunsg's Furo
University of Michigan logo