pub trait AtomView {
// Required methods
fn atomic_number(&self) -> u8;
fn position(&self) -> [f64; 3];
}Expand description
A trait for viewing atom data without owning it.
This trait provides a common interface for accessing an atom’s atomic number and 3D position,
enabling the charge equilibration solver to work with different atom representations. By decoupling
the solver from specific data structures, users can integrate the cheq library with their own
molecular representations without data conversion overhead.
Required Methods§
Sourcefn atomic_number(&self) -> u8
fn atomic_number(&self) -> u8
Returns the atomic number of the atom.
The atomic number uniquely identifies the chemical element and is used to look up atomic parameters such as electronegativity and hardness.
Sourcefn position(&self) -> [f64; 3]
fn position(&self) -> [f64; 3]
Returns the 3D position of the atom in Cartesian coordinates.
The position is represented as an array of three f64 values corresponding to x, y, and z
coordinates. This information is crucial for calculating interatomic distances and Coulomb
interactions in the charge equilibration method.