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:
@@ -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)
|
||||
}
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user