baggianalysis
0.0.2a1.dev24+gb8d84ed.d20210208
  • The core module
    • Particle-related classes
    • Topology-related classes and utility functions
    • Configuration parsers
    • Configuration exporters
    • Filters
    • Trajectory classes
    • Observables
    • Neighbour finders
  • Writing a parser
  • Writing a function to parse custom topologies
baggianalysis
  • »
  • The core module »
  • Particle-related classes
  • View page source

Particle-related classes¶

Particle

A simulation particle.

ParticleSet

System

Store a configuration.

class baggianalysis.core.Particle(*args, **kwargs)¶

Bases: pybind11_builtins.pybind11_object

A simulation particle.

Overloaded function.

  1. __init__(self: baggianalysis.core.Particle, index: int) -> None

This constructor takes the particle index as its only parameter.

Parameters

index (int) – The index of the particle. Note that this value cannot be changed later on.

  1. __init__(self: baggianalysis.core.Particle, arg0: int, arg1: str) -> None

  2. __init__(self: baggianalysis.core.Particle, arg0: int, arg1: str, arg2: glm::tvec3<scalar, P>) -> None

  3. __init__(self: baggianalysis.core.Particle, arg0: int, arg1: str, arg2: glm::tvec3<scalar, P>, arg3: glm::tvec3<scalar, P>) -> None

add_bonded_neighbour(self: baggianalysis.core.Particle, q: baggianalysis.core.Particle) → None¶

Add particle q to the list of the current particle’s bonded neighbours and the current particle to the list of q’s bonded neighbours.

Parameters

q (Particle) – The new bonded neighbour.

add_neighbour(self: baggianalysis.core.Particle, q: baggianalysis.core.Particle) → None¶

Add particle q to the list of this particle’s neighbours. Contrary to add_bonded_neighbour(), the current particle is not added to the list of q’s neighbours.

Parameters

q (Particle) – The new neighbour.

property bonded_neighbours¶

A list of this particle’s bonded neighbours.

Type

Set(Particle)

property index¶

The particle’s index.

Type

int

property molecule¶

The molecule to which this particle belongs.

Type

ParticleSet

property neighbours¶

A list of this particle’s neighbours.

Type

Set(Particle)

property orientation_vectors¶

A list of vectors related to the particle’s orientation. Depending on the specific model it may contain the list of interaction centres or the components of the orientation matrix.

type

List(numpy.ndarray)

property position¶

The particle’s position.

Type

numpy.ndarray

property type¶

The particle’s type.

Type

string

property velocity¶

The particle’s velocity.

Type

numpy.ndarray

class baggianalysis.core.ParticleSet(self: baggianalysis.core.ParticleSet) → None¶

Bases: pybind11_builtins.pybind11_object

N(self: baggianalysis.core.ParticleSet) → int¶
add_particle(self: baggianalysis.core.ParticleSet, arg0: baggianalysis.core.Particle) → None¶
average_velocity(self: baggianalysis.core.ParticleSet) → glm::tvec3<scalar, P>¶
com(self: baggianalysis.core.ParticleSet) → glm::tvec3<scalar, P>¶
indexes(self: baggianalysis.core.ParticleSet) → List[int]¶
property name¶
particle_by_id(self: baggianalysis.core.ParticleSet, arg0: int) → baggianalysis.core.Particle¶
particles(self: baggianalysis.core.ParticleSet) → List[baggianalysis.core.Particle]¶
positions(self: baggianalysis.core.ParticleSet) → List[glm::tvec3<scalar, P>]¶
remove_particle(self: baggianalysis.core.ParticleSet, arg0: baggianalysis.core.Particle) → None¶
remove_particle_by_id(self: baggianalysis.core.ParticleSet, arg0: int) → None¶
sort_particles_by_id(self: baggianalysis.core.ParticleSet) → None¶
types(self: baggianalysis.core.ParticleSet) → List[str]¶
velocities(self: baggianalysis.core.ParticleSet) → List[glm::tvec3<scalar, P>]¶
class baggianalysis.core.System(self: baggianalysis.core.System) → None¶

Bases: baggianalysis.core.ParticleSet

Store a configuration.

The constructor takes no arguments.

available_index(self: baggianalysis.core.System) → int¶

Return a particle index that can be used in the context of this system (that is, that is not used by any of the particles already present in the system).

Returns

A number that can be used as a valid index for a new particle.

Return type

int

property box¶
bring_particles_in_box(self: baggianalysis.core.System, shift_by_half_box: bool = False) → None¶

Bring the particles back into the box.

Parameters

shift_by_half_box (bool) – If False (the default value) particles will have coordinates ranging from 0 to the length of the box side. If True, the coordinates will range between -box/2 and +box/2.

empty_copy(self: baggianalysis.core.System) → baggianalysis.core.System¶

Return a copy of this system (same time and box, no particles).

Returns

A new system with the same time and box of this one.

Return type

System

molecules(self: baggianalysis.core.System) → List[baggianalysis.core.ParticleSet]¶

Return all the molecules contained in the system in the form of a list of ParticleSet.

Returns

The list of molecules contained in the system.

Return type

list(ParticleSet)

property time¶
Next Previous

© Copyright 2020, Lorenzo Rovigatti

Built with Sphinx using a theme provided by Read the Docs.