Skip to content

WIP: Nocell

username-removed-71312 requested to merge nocell into master

atoms.cell defaults to None.

I would like a bit of feedback.

Some notable behaviours:

  • atoms.center(vacuum=3.) creates a cell when necessary
  • atoms.center() when cell is None does not create a cell, but centers around (0,0,0)
  • atoms.center(vacuum=3., axis=2) causes an error when there is no cell (this caused one test failure in GPAW, because it called that function on all three axes. But that cannot be the cause of many headaches)

A lot of functions raise AttributeError when people do stuff with cells while there is no cell. This error is duplicated all over the place at the moment.

The new ase.cell module right now only contains a 2-line function. We can remove it if we don't add more functions. While fixing this, there were a few cases of implementing the same 'trope' several times, including applying neighborlist cell offset, equals-with-tolerance, etc., but it was not as much as expected.

Making IO modules and calculators behave consistently will still be work.

Merge request reports