test(qchem): don't require an unconverged structure to leave no geometry

TestARealConformerSetIsOptimised asked that the two atoms put in one
place come back unconverged, with an error, and with no geometry. But
QchemResult.Geometry is documented as the optimised geometry or the last
one reached where the optimisation did not converge, and whether xtb
leaves one depends on where it gave up. #637's coverage runs failed on
exactly that. The test now asks only that the structure failed and says
why.
This commit is contained in:
rvnminers-A-and-N committed 2026-10-22 20:11:46 +00:00
1 parent b6acc24d9a
commit 02c0b8d8c8
1 file changed
+4 -1
+4 -1
View File
@@ -589,7 +589,10 @@ func TestARealConformerSetIsOptimised(t *testing.T) {
t.Errorf("structure %d from SDF and from XYZ:\n%s\n%s", i, rawSDF, rawXYZ) t.Errorf("structure %d from SDF and from XYZ:\n%s\n%s", i, rawSDF, rawXYZ)
} }
} }
if clash := fromXYZ.Results[3]; clash.Converged || clash.Error == "" || clash.Geometry != "" || fromXYZ.Converged != 3 || fromXYZ.Structures != 4 || *fromXYZ.Lowest != 0 { // Whether xtb got far enough to leave a last geometry depends on where
// it gave up, and a result may name one when it did not converge, so
// the test asks only that it failed and says why.
if clash := fromXYZ.Results[3]; clash.Converged || clash.Error == "" || fromXYZ.Converged != 3 || fromXYZ.Structures != 4 || *fromXYZ.Lowest != 0 {
t.Errorf("two atoms in one place: %s", rawXYZ) t.Errorf("two atoms in one place: %s", rawXYZ)
} }