1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
# fmt: off
from ase.build import bulk
from ase.calculators.emt import EMT
from ase.calculators.loggingcalc import LoggingCalculator
def test_loggingcalc(tmp_path, figure):
atoms = bulk('Au', orthorhombic=True)
calc = LoggingCalculator(EMT())
atoms.calc = calc
for _ in range(4):
atoms.get_forces()
atoms.get_potential_energy()
atoms.positions[0, 0] += 0.1
# This is kind of improper testing.
# Should split plotting away from processing so we can
# test the processing.
calc.tabulate()
calc.plot()
|