pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

Support for ASE-style "extended XYZ" with Lattice parameters

Open ghutchis opened this issue 4 years ago • 3 comments

As far as I can tell, the current versions of pymatgen support the traditional non-lattice XYZ from Open Babel.

I just implemented initial support for "extended XYZ" in Avogadro2 - the first layer is pretty easy. The second line (for comments / title) now have the lattice vectors and optionally additional properties.

e.g. Lattice="H11 H21 H31 H12 H22 H32 H13 H23 H33" https://atomsk.univ-lille.fr/doc/en/format_xyz.html https://gitlab.com/ase/ase/-/merge_requests/62

It seems like a useful interchange format, and wondered if pymatgen would support it too, either transparently in the .xyz reader or in an "extxyz" format.

ghutchis avatar Jun 02 '21 16:06 ghutchis

I think the would be a welcome inclusion, I know this format (or a similar one) is used in AtomEye too. Would you be interested in preparing a PR?

mkhorton avatar Jun 02 '21 19:06 mkhorton

I can't promise I can support everything - since it seems "Properties" can include a lot. But the Lattice extension IMHO is easy and IMHO the big first piece.

Let me get Avogadro 1.94 tagged today and I'll send a PR soon.

ghutchis avatar Jun 02 '21 19:06 ghutchis

Thanks, I think the Lattice support is sufficient, as far as I know it's an informal spec anyway, we would definitely encourage people to prefer CIF for archival purposes.

mkhorton avatar Jun 02 '21 19:06 mkhorton