ParticleList

class ParticleList

Most Mechanica functions that return a list of particle return a ParticleList. This is a special list type that adds a lot of convenience methods for dealing with spatial information.

virial()

Returns the virial, or pressure tensor for all objects in the list.

radius_of_gyration()

Computes the radius of gyration

center_of_mass()

Computes the center of mass.

center_of_geometry()

Computes the center of geometry

centroid()

Computes the centroid

moment_of_inertia()

Computes the moment of inertia tensor

inertia()

Computes the moment of inertia tensor, a synonum for moment_of_intertia()

copy()

Creates a deep copy of this list.

positions()

Returns a numpy 3xN array of all the particle positions.

spherical_positions([origin])

Computes the positions in spherical coordinates relative to an origin, returns a 3xN array.

velocities()

Returns a 3xN array of particle velocities

forces()

Returns a 3xN array of particle forces.