ParticleLocalAccessBase

class hoomd.data.ParticleLocalAccessBase(state)

Directly access particle data in the simulation state.

Note

Changing some attributes (such as velocity and acceleration) may not alter the trajectory of the system as you would expect. The md.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 or HOOMDGPUArray of float

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 or HOOMDGPUArray of int

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 or HOOMDGPUArray of int

position

Particle positions \([\mathrm{length}]\).

Type:

(N_particles, 3) HOOMDArray or HOOMDGPUArray of float

image

A count of how many times each particle crosses the periodic box boundaries.

Type:

(N_particles, 3) HOOMDArray or HOOMDGPUArray of int

velocity

Particle velocities \([\mathrm{velocity}]\).

Type:

(N_particles, 3) HOOMDArray or HOOMDGPUArray of float

acceleration

Particle accelerations \([\mathrm{velocity} \cdot \mathrm{time}^{-1}]\).

Type:

(N_particles, 3) HOOMDArray or HOOMDGPUArray of float

mass

Particle masses \([\mathrm{mass}]\).

Type:

(N_particles) HOOMDArray or HOOMDGPUArray of float

orientation

Particle orientations expressed as quaternions.

Type:

(N_particles, 4) HOOMDArray or HOOMDGPUArray of float

angmom

Particle angular momenta expressed as quaternions \([\mathrm{mass} \cdot \mathrm{velocity} \cdot \mathrm{length}]\).

Type:

(N_particles, 4) HOOMDArray or HOOMDGPUArray of float

moment_inertia

Particle principal moments of inertia \([\mathrm{mass} \cdot \mathrm{length}^2]\).

Type:

(N_particles, 3) HOOMDArray or HOOMDGPUArray of float

charge

Particle electrical charges \([\mathrm{charge}]\).

Type:

(N_particles) HOOMDArray or HOOMDGPUArray of float

diameter

Particle diameters \([\mathrm{length}]\).

Type:

(N_particles) HOOMDArray or HOOMDGPUArray of float

body

The id of the rigid body the particle is in.

Type:

(N_particles) HOOMDArray or HOOMDGPUArray of int

net_force

Net force on particle \([\mathrm{force}]\).

Type:

(N_particles, 3) HOOMDArray or HOOMDGPUArray of float

net_torque

Net torque on particle \([\mathrm{force} \cdot \mathrm{length}]\).

Type:

(N_particles, 3) HOOMDArray or HOOMDGPUArray of float

net_virial

Net virial on particle \([\mathrm{energy}]\).

Type:

(N_particles, 6) HOOMDArray or HOOMDGPUArray of float

net_energy

Net energy of a particle \([\mathrm{energy}]\).

Type:

(N_particles,) HOOMDArray or HOOMDGPUArray of float