# Particle Vectors¶

A ParticleVector (or PV) is a collection of particles in the simulation with identical properties. PV is the minimal unit of particles that can be addressed by most of the processing utilities, i.e. it is possible to specify interactions between different (or same) PVs, apply integrators, plugins, etc. to the PVs.

Each particle in the PV keeps its coordinate, velocity and force. Additional quantities may also be stored in a form of extra channels. These quantities are usually added and used by specific handlers, and can in principle be written in XDMF format (Average3D), see more details in the Developer documentation.

A common special case of a ParticleVector is an ObjectVector (or OV). The OV is a Particle Vector with the particles separated into groups (objects) of the same size. For example, if a single cell membrane is represented by say 500 particles, an object vector consisting of the membranes will contain all the particles of all the membranes, grouped by membrane. Objects are assumed to be spatially localized, so they always fully reside within a single MPI process. OV can be used in most of the places where a regular PV can be used, and more

## Summary¶

 MembraneMesh() Internally used class for desctibing a triangular mesh that can be used with the Membrane Interactions. MembraneVector() Membrane is an Object Vector representing cell membranes. Mesh() Internally used class for describing a simple triangular mesh ObjectVector() Basic Object Vector ParticleVector() Basic particle vector, consists of identical disconnected particles. RigidEllipsoidVector() Rigid Ellipsoid is the same as the Rigid Object except that it can only represent ellipsoidal shapes. RigidObjectVector() Rigid Object is an Object Vector representing objects that move as rigid bodies, with no relative displacement against each other in an object.

## Details¶

class MembraneMesh

Internally used class for desctibing a triangular mesh that can be used with the Membrane Interactions. In contrast with the simple Mesh, this class precomputes some required quantities on the mesh

__init__(*args, **kwargs)

1. __init__(off_filename: str) -> None

Create a mesh by reading the OFF file

Args:

off_filename: path of the OFF file

2. __init__(vertices: List[List[float[3]]], faces: List[List[int[3]]]) -> None

Create a mesh by giving coordinates and connectivity

Args:

vertices: vertex coordinates faces: connectivity: one triangle per entry, each integer corresponding to the vertex indices

getTriangles(self: ParticleVectors.Mesh) → List[List[int[3]]]

returns the vertex indices for each triangle of the mesh.

getVertices(self: ParticleVectors.Mesh) → List[List[float[3]]]

returns the vertex coordinates of the mesh.

class MembraneVector

Membrane is an Object Vector representing cell membranes. It must have a triangular mesh associated with it such that each particle is mapped directly onto single mesh vertex.

__init__(name: str, mass: float, mesh: ParticleVectors.MembraneMesh) → None
Parameters: name – name of the created PV mass – mass of a single particle mesh – MembraneMesh object
getCoordinates(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of coordinate for every of the N particles A list of $$N \times 3$$ floats
getForces(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of force for every of the N particles A list of $$N \times 3$$ floats
getVelocities(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of velocity for every of the N particles A list of $$N \times 3$$ floats
get_indices(self: ParticleVectors.ParticleVector) → List[int]
Returns: A list of unique integer particle identifiers
setCoordinates(coordinates: List[List[float[3]]]) → None
Parameters: coordinates – A list of $$N \times 3$$ floats: 3 components of coordinate for every of the N particles
setForces(forces: List[List[float[3]]]) → None
Parameters: forces – A list of $$N \times 3$$ floats: 3 components of force for every of the N particles
setVelocities(velocities: List[List[float[3]]]) → None
Parameters: velocities – A list of $$N \times 3$$ floats: 3 components of velocity for every of the N particles
class Mesh

Bases: object

Internally used class for describing a simple triangular mesh

__init__(*args, **kwargs)

1. __init__(off_filename: str) -> None

Create a mesh by reading the OFF file

Args:

off_filename: path of the OFF file

2. __init__(vertices: List[List[float[3]]], faces: List[List[int[3]]]) -> None

Create a mesh by giving coordinates and connectivity

Args:

vertices: vertex coordinates faces: connectivity: one triangle per entry, each integer corresponding to the vertex indices

getTriangles(self: ParticleVectors.Mesh) → List[List[int[3]]]

returns the vertex indices for each triangle of the mesh.

getVertices(self: ParticleVectors.Mesh) → List[List[float[3]]]

returns the vertex coordinates of the mesh.

class ObjectVector

Basic Object Vector

getCoordinates(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of coordinate for every of the N particles A list of $$N \times 3$$ floats
getForces(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of force for every of the N particles A list of $$N \times 3$$ floats
getVelocities(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of velocity for every of the N particles A list of $$N \times 3$$ floats
get_indices(self: ParticleVectors.ParticleVector) → List[int]
Returns: A list of unique integer particle identifiers
setCoordinates(coordinates: List[List[float[3]]]) → None
Parameters: coordinates – A list of $$N \times 3$$ floats: 3 components of coordinate for every of the N particles
setForces(forces: List[List[float[3]]]) → None
Parameters: forces – A list of $$N \times 3$$ floats: 3 components of force for every of the N particles
setVelocities(velocities: List[List[float[3]]]) → None
Parameters: velocities – A list of $$N \times 3$$ floats: 3 components of velocity for every of the N particles
class ParticleVector

Bases: object

Basic particle vector, consists of identical disconnected particles.

__init__(name: str, mass: float) → None
Parameters: name – name of the created PV mass – mass of a single particle
getCoordinates(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of coordinate for every of the N particles A list of $$N \times 3$$ floats
getForces(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of force for every of the N particles A list of $$N \times 3$$ floats
getVelocities(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of velocity for every of the N particles A list of $$N \times 3$$ floats
get_indices(self: ParticleVectors.ParticleVector) → List[int]
Returns: A list of unique integer particle identifiers
setCoordinates(coordinates: List[List[float[3]]]) → None
Parameters: coordinates – A list of $$N \times 3$$ floats: 3 components of coordinate for every of the N particles
setForces(forces: List[List[float[3]]]) → None
Parameters: forces – A list of $$N \times 3$$ floats: 3 components of force for every of the N particles
setVelocities(velocities: List[List[float[3]]]) → None
Parameters: velocities – A list of $$N \times 3$$ floats: 3 components of velocity for every of the N particles
class RigidEllipsoidVector

Rigid Ellipsoid is the same as the Rigid Object except that it can only represent ellipsoidal shapes. The advantage is that it doesn’t need mesh and moment of inertia define, as those can be computed analytically.

__init__(*args, **kwargs)

1. __init__(name: str, mass: float, object_size: int, semi_axes: Tuple[float, float, float]) -> None

Args:

name: name of the created PV mass: mass of a single particle object_size: number of particles per membrane, must be the same as the number of vertices of the mesh semi_axes: ellipsoid principal semi-axes

2. __init__(name: str, mass: float, object_size: int, semi_axes: Tuple[float, float, float], mesh: ParticleVectors.Mesh) -> None

Args:

name: name of the created PV mass: mass of a single particle object_size: number of particles per membrane, must be the same as the number of vertices of the mesh semi_axes: ellipsoid principal semi-axes mesh: mesh representing the shape of the ellipsoid. This is used for dump only.

getCoordinates(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of coordinate for every of the N particles A list of $$N \times 3$$ floats
getForces(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of force for every of the N particles A list of $$N \times 3$$ floats
getVelocities(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of velocity for every of the N particles A list of $$N \times 3$$ floats
get_indices(self: ParticleVectors.ParticleVector) → List[int]
Returns: A list of unique integer particle identifiers
setCoordinates(coordinates: List[List[float[3]]]) → None
Parameters: coordinates – A list of $$N \times 3$$ floats: 3 components of coordinate for every of the N particles
setForces(forces: List[List[float[3]]]) → None
Parameters: forces – A list of $$N \times 3$$ floats: 3 components of force for every of the N particles
setVelocities(velocities: List[List[float[3]]]) → None
Parameters: velocities – A list of $$N \times 3$$ floats: 3 components of velocity for every of the N particles
class RigidObjectVector

Rigid Object is an Object Vector representing objects that move as rigid bodies, with no relative displacement against each other in an object. It must have a triangular mesh associated with it that defines the shape of the object.

__init__(name: str, mass: float, inertia: Tuple[float, float, float], object_size: int, mesh: ParticleVectors.Mesh) → None
Parameters: name – name of the created PV mass – mass of a single particle inertia – moment of inertia of the body in its principal axes. The principal axes of the mesh are assumed to be aligned with the default global OXYZ axes object_size – number of particles per membrane, must be the same as the number of vertices of the mesh mesh – MembraneMesh object
getCoordinates(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of coordinate for every of the N particles A list of $$N \times 3$$ floats
getForces(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of force for every of the N particles A list of $$N \times 3$$ floats
getVelocities(self: ParticleVectors.ParticleVector) → List[List[float[3]]]
Returns: 3 components of velocity for every of the N particles A list of $$N \times 3$$ floats
get_indices(self: ParticleVectors.ParticleVector) → List[int]
Returns: A list of unique integer particle identifiers
setCoordinates(coordinates: List[List[float[3]]]) → None
Parameters: coordinates – A list of $$N \times 3$$ floats: 3 components of coordinate for every of the N particles
setForces(forces: List[List[float[3]]]) → None
Parameters: forces – A list of $$N \times 3$$ floats: 3 components of force for every of the N particles
setVelocities(velocities: List[List[float[3]]]) → None
Parameters: velocities – A list of $$N \times 3$$ floats: 3 components of velocity for every of the N particles