Summary
A bug exists in the set_strain_rate() method of the ASE NPT class, where it calls a non-existent method internally. This bug occurs in ASE 3.25 and later, and it is forcibly triggered when attempting to perform a simulation that applies strain with the NPT class, resulting in an AttributeError: 'NPT' object has no attribute '_triangular' error.
Solution
It is safe to use ASE <= 3.24.
If you absolutely need to use a newer version, you can enable calculations by executing the following commands in your notebook.
For python3.11 environment:
!sed -i '267s/_triangular/_istriangular/' ~/.py311/lib/python3.11/site-packages/ase/md/npt.pyFor python3.9 environment:
!sed -i '267s/_triangular/_istriangular/' ~/.py39/lib/python3.9/site-packages/ase/md/npt.pyAfter executing this command, please restart your notebook.
Notes
The command replaces a non-existent method with one that determines whether a matrix is triangular. If you update ASE, the result of the command will be overwritten, so you will need to execute it again.