Skip to main content
← OpenMECP Documentation

validate_constraints_against_geometry

Function validate_constraints_against_geometry 

Source
fn validate_constraints_against_geometry(
    constraints: &[Constraint],
    geometry: &Geometry,
) -> Result<(), ParseError>
Expand description

Validates parsed constraints against the molecular geometry.

This function performs comprehensive validation of constraints including:

  • Atom index bounds checking
  • Duplicate constraint detection
  • Geometric feasibility checks
  • Target value reasonableness

§Arguments

  • constraints - List of parsed constraints to validate
  • geometry - Molecular geometry to validate against

§Returns

Ok(()) if all constraints are valid, Err(ParseError) with detailed error information otherwise.