diff --git a/HISTORY.rst b/HISTORY.rst index 956a09d..9ec17cf 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,12 @@ History ======= +2023.9.6 -- Using fractional coordinates for periodic systems. + * By convention, SEAMM is using fractional coordinates for periodic systems. The + PACKMOL step was creating periodic structures with Cartesian coordinates, which + can be a bit confusing, though it did not affect any reauls. This change fixes the + issue. + 2023.2.15 -- Restructured documentation and moved to new theme. 2022.5.31 -- Substantial enhancements diff --git a/packmol_step/packmol.py b/packmol_step/packmol.py index 3c6ba00..b28f742 100644 --- a/packmol_step/packmol.py +++ b/packmol_step/packmol.py @@ -296,6 +296,10 @@ def run(self): configuration.periodicity = 3 a, b, c = cell configuration.cell.parameters = (a, b, c, 90.0, 90.0, 90.0) + # by convention we keep periodic systems in fractional coordinates + xyz = configuration.atoms.get_coordinates(fractionals=False) + configuration.coordinate_system = "fractional" + configuration.atoms.set_coordinates(xyz, fractionals=False) printer.important(__(output, indent=4 * " ")) printer.important("")