kups.application.utils.particles
¶
Shared particle data structures and ASE loading utilities.
Particles
¶
Particle state shared across simulation types.
Attributes:
| Name | Type | Description |
|---|---|---|
positions |
Array
|
Cartesian coordinates in the lower-triangular frame, shape (n_atoms, 3). |
masses |
Array
|
Atomic masses (amu), shape (n_atoms,). |
atomic_numbers |
Array
|
Atomic numbers, shape (n_atoms,). |
charges |
Array
|
Partial charges, shape (n_atoms,). |
labels |
Index[Label]
|
Per-atom string labels. |
system |
Index[SystemId]
|
Index mapping each particle to a system. |
Source code in src/kups/application/utils/particles.py
inclusion
property
¶
System index re-labeled as InclusionId.
default_exclusion(n)
¶
Build a default per-particle exclusion index (each atom excludes itself).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int
|
Number of particles. |
required |
Returns:
| Type | Description |
|---|---|
Index[ExclusionId]
|
Index mapping each particle to a unique ExclusionId. |
Source code in src/kups/application/utils/particles.py
particles_from_ase(atoms)
¶
Build particle data and unit cell from an ASE Atoms object or file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
atoms
|
Atoms | str | Path
|
ASE Atoms object, or a file path (str/Path) readable by
|
required |
Returns:
| Type | Description |
|---|---|
Table[ParticleId, Particles]
|
Tuple of (particles, unitcell, uc_transform) where uc_transform |
UnitCell
|
rotates Cartesian positions into the lower-triangular frame. |