Skip to content

Fix constraints in `write_castep_cell` and `read_castep_cell`

Yuji Ikeda requested to merge yuzie007/ase:test-castep-cell-constraints into master

Checklist

Summary

Closes #1236 (closed)

This is for preparation of solving #1370 (closed)

Constraints for read_castep_cell and write_castep_cell were not well tested, which is fixed in this MR.

The first commit is to simplify the header in write_castep_cell, particularly to not write fd.name. This is useful particularly for testing using io.StringIO(). (This is as done for write_lammps_data in e3c78a49 according to the comment !2891 (comment 1383095030))

The second commit is adding write-and-read tests for "castep-cell" with constraints. Minor refactoring is also done.

The third commit is to fix issues in #1370 (closed) and some refactoring.

Edited by Yuji Ikeda

Merge request reports