Cell shape during relaxation

Is it possible to remove the cell shape as a DOF, in other words, treat angles between lattice vectors as a constraint during relaxation? The closest constraint I’ve only come across is fixing positions and volume.

The main problem that I’m hoping to solve by doing this is to maintain the same crystal structure throughout the entire procedure. I’m relaxing a structure where the final configuration has different angles than the initial configuration so it ends up in a completely different phase.

Thanks :slight_smile:

The ExpCellFilter/UnitCellFilter classes have a kind of mask parameter that can be used to pick cell DOFs. Does that help?

You can also consider looking at the “parametric constraint”.