From 2912f08c384cf0eb78c2165e4f76377ba0c12f0b Mon Sep 17 00:00:00 2001 From: janbridley Date: Wed, 30 Oct 2024 10:59:29 -0400 Subject: [PATCH] Fix to_hoomd for convex polygons --- coxeter/shapes/polygon.py | 1 + 1 file changed, 1 insertion(+) diff --git a/coxeter/shapes/polygon.py b/coxeter/shapes/polygon.py index a4091f6b..c0c7aae3 100644 --- a/coxeter/shapes/polygon.py +++ b/coxeter/shapes/polygon.py @@ -800,6 +800,7 @@ def to_hoomd(self): self.centroid = np.array([0, 0, 0]) data = self.to_json(["vertices", "centroid", "area", "inertia_tensor"]) hoomd_dict = _map_dict_keys(data, key_mapping=_hoomd_dict_mapping) + hoomd_dict |= {"vertices": self.vertices[:, :2]} hoomd_dict["sweep_radius"] = 0.0 self.centroid = old_centroid