Fix constraints in `write_espresso_in` and `read_espresso_in`
Checklist
-
I have read the contribution guidelines. -
Unit tests have been added for any new or changed code, and the test suite passes. Note: Your request will likely not be merged without the appropriate tests. -
"closes #XXXX" is in the body of the MR description to link the related issue, if applicable.
Closes #1274 (closed)
This is for preparation of solving #1370 (closed)
Constraints for read_espresso_in
and write_espresso_in
were not well tested, which is fixed in this MR.
Ping @pietrodelugas as you are also working on a similar place.
Note0: As far as I survey by actually running calculations, constraint flags in the ATOMIC_POSITIONS
block are applied always to the Cartesian coordinates, regardless of whether we write ATOMIC_POSITIONS
in Cartesian or fractional coordinates (although it is not clearly documents in the official document).
Note1: As far as I read the document and the source code of pwscf, the linear constraint flags are expected to be integer, so I modified the corresponding part.