ENH: row-major vs. column major array storage and minor enhancement to XYZ writer
This MR addresses two issues:
-
Bug fix to array memory layout when reading from XYZ files. Use of the
np.vstack()
function to assemble columns read from files meant that multi-column properties (such as atomic positions) were in Fortran-contiguous memory layout, rather than the C-contiguous form preferred for efficient operation. In the patch I fix this usingnp.ascontiguousarray()
inAtoms.new_array()
if the array passed in is not C-contiguous. -
Minor enhancement to
xyz_write()
by adding an optional kwargplain
to allow writing in legacy XYZ format, rather than extended XYZ. This has recently been requested on the ASE users mailing list.