apax-hub / apax

A flexible and performant framework for training machine learning potentials.
MIT License
12 stars 1 forks source link

[BUG] Non-orthogonal cells do not evaluate correctly using the `batch_eval()` method #279

Open Chronum94 opened 1 month ago

Chronum94 commented 1 month ago

Non-orthogonal cells almost certainly have a bug in their force and energy evaluations.

In the figure below, I'm plotting E/atom as a function of a given generalized coordinate. The MACE-MP-0 large model (with L2 message passing) was used for the target data. Every energy curve except the one for the hex cell is in some reasonable degree of agreement.

image

Tetracarbonylnickel commented 1 month ago

After analysing your problem I could boil it down to the batch_eval() method of our calculator. If you loop over the atoms this schould not occur.

for atoms in atoms_list:
    atoms.calc = calc

 energies = [atoms.get_potential_energy() for atoms in atoms_list]

Does this occur in MD simulations with apax or are these trajectories that were labeled with the apax but generated with an other method?