AtomicSystem.orthogonalize#
- AtomicSystem.orthogonalize(tolerance=0.1, max_replica=10)#
Attempt to transform a triclinic (skewed) box into an orthogonal one.
This method searches for new lattice vectors that align with the Cartesian axes (X, Y, Z) by exploring linear combinations of the current basis vectors. It then re-populates the new box by shifting and wrapping existing atom coordinates.
- Parameters:
- tolerance
The maximum deviation allowed from the Cartesian axes (in Å) for a candidate vector to be considered orthogonal.
- max_replica
The search range for linear combinations (m, n, o) of the original lattice vectors. Higher values increase the chance of finding an orthogonal cell but significantly increase computation time.
- Raises:
- ValueError
If no orthogonal representation could be found within
max_replicareplications.
Notes
This operation will change the total number of atoms in the system.
Velocities and interactions (bonds, etc.) are typically lost or invalidated during this specific geometric transformation.
The resulting box will have tilt factors (xy, xz, yz) set to zero.