From 6125b701f7c74a3686f379b73801b6a2f4d5abe0 Mon Sep 17 00:00:00 2001 From: Matthew Carbone Date: Sun, 5 Nov 2023 10:50:30 -0500 Subject: [PATCH] Fix mutable default argument --- lightshow/database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lightshow/database.py b/lightshow/database.py index 12b156a9..9d3315d4 100644 --- a/lightshow/database.py +++ b/lightshow/database.py @@ -34,7 +34,7 @@ def from_files_molecule( cls, root, filename="*.xyz", - lattice=[20.0, 20.0, 20.0], + lattice=None, pbar=True, ): """Searches for files matching the provided ``filename``, and assumes @@ -58,6 +58,9 @@ def from_files_molecule( Database """ + if lattice is None: + lattice = [20.0, 20.0, 20.0] + structures = {} metadata = {} for key, path in enumerate(