Backend validation
Python is the reference implementation. Given the same XYZ, total charge, spin multiplicity, and configuration, C++ should select the same candidate. Build the current extension before comparing the two.
| What to check | What the test compares |
|---|---|
| Final molecular graph | The reconstruction regression tests compare atoms, bonds, and coordinates with dative-bond processing both enabled and disabled. |
| Candidate generation and ranking | The candidate parity tests compare candidates, scores, and the final selection so that a difference can be traced to a search stage. |
| C++ acceleration options | In the same file, test_cpp_all_accelerations_preserve_python_final_smiles compares accelerated output with the Python result. |
Run both suites from the repository root. Pytest reports the failing case IDs. The -rs flag also shows why a test was skipped.
uv run --no-sync python -m pytest -rs tests/test_backend_reconstruction_regression.py tests/test_cpp_python_metal_candidate_parity.py
Agreement between backends checks implementation consistency. To assess reconstruction against an independent reference structure, use the benchmark scoring protocol.