Fix constraints in read_espresso_out

The read_espresso_out function did not set FixAtoms or FixCartesian constraints. This MR adds that (and a corresponding test), using the same approach as !3147 (merged).

Note that there is one limitation: the pw output format only prints constraints in the ATOMIC_POSITIONS blocks after each relaxation step, but not in the header lines from which the first image is extracted, so the first image currently will not get any constraints applied. The test explicitly tests this (undesired) behavior as well. If someone has a suggestion for how to extract the constraints from a subsequent image, that would be welcome.

Checklist: x (done) or ~ (irrelevant)

Edited by Luuk Kempen

Merge request reports

Loading
Loading