ParticleLocalAccessBase¶
- class hoomd.data.ParticleLocalAccessBase(state)¶
Directly access particle data in the simulation state.
Note
Changing some attributes (such as
velocity
andacceleration
) may not alter the trajectory of the system as you would expect. Themd.Integrator
is responsible for integrating the equations of motion and manages the values in these arrays.- typeid¶
The integer type of a particle.
- Type:
(N_particles)
HOOMDArray
orHOOMDGPUArray
offloat
- tag¶
The particle tags. Spatial sorting and MPI domain migration reorders particles in memory. The particle tag identifies each particle in the order it existed in the initial configuration.
- Type:
(N_particles)
HOOMDArray
orHOOMDGPUArray
ofint
- rtag¶
The particle reverse tags. For a given particle tag
tag
,i = particles.rtag[tag]
is the array index holding that particle.- Type:
(N_particles_global)
HOOMDArray
orHOOMDGPUArray
ofint
- position¶
Particle positions \([\mathrm{length}]\).
- Type:
(N_particles, 3)
HOOMDArray
orHOOMDGPUArray
offloat
- image¶
A count of how many times each particle crosses the periodic box boundaries.
- Type:
(N_particles, 3)
HOOMDArray
orHOOMDGPUArray
ofint
- velocity¶
Particle velocities \([\mathrm{velocity}]\).
- Type:
(N_particles, 3)
HOOMDArray
orHOOMDGPUArray
offloat
- acceleration¶
Particle accelerations \([\mathrm{velocity} \cdot \mathrm{time}^{-1}]\).
- Type:
(N_particles, 3)
HOOMDArray
orHOOMDGPUArray
offloat
- mass¶
Particle masses \([\mathrm{mass}]\).
- Type:
(N_particles)
HOOMDArray
orHOOMDGPUArray
offloat
- orientation¶
Particle orientations expressed as quaternions.
- Type:
(N_particles, 4)
HOOMDArray
orHOOMDGPUArray
offloat
- angmom¶
Particle angular momenta expressed as quaternions \([\mathrm{mass} \cdot \mathrm{velocity} \cdot \mathrm{length}]\).
- Type:
(N_particles, 4)
HOOMDArray
orHOOMDGPUArray
offloat
- moment_inertia¶
Particle principal moments of inertia \([\mathrm{mass} \cdot \mathrm{length}^2]\).
- Type:
(N_particles, 3)
HOOMDArray
orHOOMDGPUArray
offloat
- charge¶
Particle electrical charges \([\mathrm{charge}]\).
- Type:
(N_particles)
HOOMDArray
orHOOMDGPUArray
offloat
- diameter¶
Particle diameters \([\mathrm{length}]\).
- Type:
(N_particles)
HOOMDArray
orHOOMDGPUArray
offloat
- body¶
The id of the rigid body the particle is in.
- Type:
(N_particles)
HOOMDArray
orHOOMDGPUArray
ofint
- net_force¶
Net force on particle \([\mathrm{force}]\).
- Type:
(N_particles, 3)
HOOMDArray
orHOOMDGPUArray
offloat
- net_torque¶
Net torque on particle \([\mathrm{force} \cdot \mathrm{length}]\).
- Type:
(N_particles, 3)
HOOMDArray
orHOOMDGPUArray
offloat
- net_virial¶
Net virial on particle \([\mathrm{energy}]\).
- Type:
(N_particles, 6)
HOOMDArray
orHOOMDGPUArray
offloat
- net_energy¶
Net energy of a particle \([\mathrm{energy}]\).
- Type:
(N_particles,)
HOOMDArray
orHOOMDGPUArray
offloat