Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FrechetCellFilter not compatible with Sella #51

Open
corinwagen opened this issue Oct 31, 2024 · 2 comments
Open

FrechetCellFilter not compatible with Sella #51

corinwagen opened this issue Oct 31, 2024 · 2 comments

Comments

@corinwagen
Copy link

The wiki says:

Sella provides an interface that is compatible with the ASE Optimizer class interface.

Trying to input ase.filters.FrechetCellFilter with Sella, though, gives an error:

  File "/app/src/peregrine/optimization/periodic_optimization.py", line 94, in optimize_periodic_geometry
    optimizer = Sella(FrechetCellFilter(atoms), **sella_kwargs) if opt_settings.optimize_cell else Sella(atoms, **sella_kwargs)  # type: ignore [arg-type]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/default/lib/python3.12/site-packages/sella/optimize/optimize.py", line 83, in __init__
    self.initialize_pes(
  File "/app/.pixi/envs/default/lib/python3.12/site-packages/sella/optimize/optimize.py", line 199, in initialize_pes
    self.pes = PES(
               ^^^^
  File "/app/.pixi/envs/default/lib/python3.12/site-packages/sella/peswrapper.py", line 43, in __init__
    constraints.fix_translation()
  File "/app/.pixi/envs/default/lib/python3.12/site-packages/sella/internal.py", line 957, in fix_translation
    index = np.arange(len(self.all_atoms), dtype=np.int32)
                          ^^^^^^^^^^^^^^
  File "/app/.pixi/envs/default/lib/python3.12/site-packages/sella/internal.py", line 639, in all_atoms
    return self.atoms + self.dummies
           ~~~~~~~~~~~^~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'FrechetCellFilter' and 'Atoms'

Is there any way to optimize the lattice vectors with Sella?

@ehermes
Copy link
Collaborator

ehermes commented Oct 31, 2024

Sella does not currently support optimization of lattice vectors. This was something I thought about at one point, but it's highly nontrivial due to how Sella internally represents the Cartesian atomic positions. It would also be quite complex to ensure that internal coordinates behave correctly in optimizations with variable unit cell size.

@corinwagen
Copy link
Author

makes sense, thanks for explaining!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants