diff --git a/export_static_onnx.py b/export_static_onnx.py index f29c010..c3eb289 100644 --- a/export_static_onnx.py +++ b/export_static_onnx.py @@ -138,7 +138,7 @@ def prepare_data(args): energy_orig = float(atoms.get_potential_energy()) print("energy = ", energy, "eV") print("energy_orig = ", energy_orig, "eV") - assert abs(energy - energy_orig) < 1e-7 * energy_orig + assert abs(energy - energy_orig) < 1e-7 * abs(energy_orig) print("out_dir = ", out_dir, file=sys.stderr) ppe_onnx.export_testcase(exporter, tuple(args.values()), out_dir, verbose=True,