Particle-related classes¶
A simulation particle. |
|
Store a configuration. |
-
class
baggianalysis.core.
Particle
(*args, **kwargs)¶ Bases:
pybind11_builtins.pybind11_object
A simulation particle.
Overloaded function.
__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.
__init__(self: baggianalysis.core.Particle, arg0: int, arg1: str) -> None
__init__(self: baggianalysis.core.Particle, arg0: int, arg1: str, arg2: glm::tvec3<scalar, P>) -> None
__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 ofq
’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 toadd_bonded_neighbour()
, the current particle is not added to the list ofq
’s neighbours.- Parameters
q (
Particle
) – The new neighbour.
-
property
molecule
¶ The molecule to which this particle belongs.
- Type
-
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
-
property
type
¶ The particle’s type.
- Type
string
-
property
velocity
¶ The particle’s velocity.
- Type
-
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
-
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).
-
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
¶
-