mod validator¶
- module validator¶
Validation boundary for candidate records entering or leaving a catalog.
Functions
- fn euclidean_gradient_norm(gradient: &[f64]) -> f64¶
Euclidean norm used by producer and receiver convergence contracts.
Enums
- enum GradientSource¶
Origin of gradient evidence checked by candidate validation.
- Producer¶
Norm reported by the candidate producer.
- Fresh¶
Norm computed from receiving-side fresh forces.
- enum NumericField¶
Numeric field inspected by candidate validation.
- Coordinates¶
Candidate Cartesian coordinates.
- Forces¶
Candidate producer forces.
- Descriptor¶
Candidate descriptor vector.
- Cell¶
Candidate cell matrix.
- Energy¶
Candidate producer energy.
- GradientNorm¶
Candidate producer gradient norm.
- FreshEnergy¶
Receiving-side energy.
- FreshForces¶
Receiving-side forces.
- enum QuenchStatus¶
Outcome reported by the quench that produced a candidate.
- Converged¶
The quench met its convergence contract.
- Unconverged¶
The quench stopped without satisfying its convergence contract.
- enum ValidationFailure¶
Structured reason a candidate cannot cross the catalog boundary.
- SignatureMismatch¶
Candidate and catalog signatures differ.
- CoordinateDimension¶
Cartesian coordinate length differs from the signature.
- expected: u64¶
Dimension declared by the signature.
- actual: u64¶
Dimension carried by the candidate.
- ForceDimension¶
Producer force length differs from the signature.
- expected: u64¶
Dimension declared by the signature.
- actual: u64¶
Dimension carried by the candidate.
- FreshForceDimension¶
Fresh force length differs from the signature.
- expected: u64¶
Dimension declared by the signature.
- actual: u64¶
Dimension returned by the fresh evaluation.
- DescriptorDimension¶
Descriptor length differs from the validator contract.
- expected: usize¶
Dimension required by the validator.
- actual: usize¶
Dimension carried by the candidate.
- DescriptorSchemaVersion¶
Candidate descriptor version differs from the signature.
- expected: u32¶
Version declared by the signature.
- actual: u32¶
Version carried by the candidate.
- NonFinite¶
A candidate or receiving-side numeric field contains NaN or infinity.
- field: NumericField¶
Field containing the invalid value.
- index: Option<usize>¶
Element index for arrays, or no index for a scalar.
- MinimumSeparation¶
Two atoms are closer than the configured physical floor.
- first_atom: usize¶
Lower atom index in the first violating pair.
- second_atom: usize¶
Higher atom index in the first violating pair.
- FrozenCoordinate¶
A frozen atom differs from its reference coordinate.
- atom: usize¶
Atom whose frozen coordinate differs.
- axis: usize¶
Cartesian axis whose frozen coordinate differs.
- RigidGroupDistance¶
A rigid-group pair differs from its reference distance.
- first_atom: usize¶
Lower atom index in the first violating pair.
- second_atom: usize¶
Higher atom index in the first violating pair.
- CellMismatch¶
The candidate cell is absent, unexpected, or differs from the signature.
- UnconvergedQuench¶
The producer quench did not satisfy its convergence contract.
- GradientThreshold¶
Producer or receiving-side gradient evidence exceeds the threshold.
- source: GradientSource¶
Side of the validation boundary that supplied the gradient.
- actual: f64¶
Euclidean gradient norm presented by that side.
- maximum: f64¶
Largest Euclidean gradient norm admitted by the validator.
- EnergyMismatch¶
Producer and receiving-side energies disagree outside tolerance.
- EngineEvaluation(String)¶
The fresh potential evaluation failed.
Structs and Unions
- struct CandidateRecord¶
Immutable candidate offered to a descriptor-basin catalog.
- signature: SystemSignature¶
Complete system and descriptor identity.
- producer_replica: u32¶
Replica that produced the record within its ensemble.
- coordinates: Vec<f64>¶
Cartesian coordinates in signature order.
- cell: Option<[f64; 9]>¶
Row-major cell recorded with the candidate.
- energy: f64¶
Quenched energy reported by the producer.
- forces: Vec<f64>¶
Forces reported by the producer.
- gradient_norm: f64¶
Euclidean gradient norm reported by the producer.
- descriptor: Vec<f64>¶
Descriptor vector under the declared schema.
- descriptor_schema_version: u32¶
Descriptor schema version used for this vector.
- quench_status: QuenchStatus¶
Producer-side quench outcome.
- charged_work: u64¶
Local charged-work counter at production.
- event_sequence: u64¶
Monotone producer event sequence.
- seed: u64¶
Random-seed identity for provenance.
- struct CandidateValidator¶
Receiving-side candidate validator for one system signature.
Implementations
- impl CandidateValidator¶
Functions
- fn new(expected: SystemSignature, config: ValidatorConfig) -> Self¶
Bind a validator to one system signature and threshold set.
-
fn validate<F>(&self, candidate: &CandidateRecord, evaluate: F) -> Result<ValidatedCandidate, ValidationFailure>¶
where
F: FnOnce(&[f64]) -> Result<FreshEvaluation, String>
¶ Validate a candidate and attach a fresh engine evaluation.
- struct FreshEvaluation¶
Fresh potential result evaluated at candidate coordinates.
- energy: f64¶
Fresh energy.
- forces: Vec<f64>¶
Fresh forces in coordinate order.
- struct ValidatedCandidate¶
Candidate paired with receiving-side potential evidence.
- candidate: CandidateRecord¶
Candidate record that passed validation.
- fresh: FreshEvaluation¶
Fresh potential evidence obtained by the receiver.
- struct ValidatorConfig¶
Numeric and geometric thresholds for candidate validation.
- reference_coordinates: Vec<f64>¶
Reference coordinates for frozen and grouped atoms.
- descriptor_dim: usize¶
Required descriptor-vector length.
- min_separation: f64¶
Smallest allowed interatomic distance.
- coordinate_tolerance: f64¶
Absolute tolerance for frozen, grouped, and cell coordinates.
- max_gradient_norm: f64¶
Largest accepted producer and fresh gradient norm.
- energy_abs_tolerance: f64¶
Absolute term in the producer/fresh energy comparison.
- energy_rel_tolerance: f64¶
Relative term in the producer/fresh energy comparison.