Skip to content

Commit 0278105

Browse files
committed
Fix descriptors for lists
1 parent 12b2d8a commit 0278105

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

janus_core/calculations/descriptors.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ def __init__(
166166
):
167167
raise ValueError("Please attach a calculator to `struct`.")
168168

169-
self._check_calculator(self.struct.calc)
169+
if isinstance(self.struct, Atoms):
170+
self._check_calculator(self.struct.calc)
171+
if isinstance(self.struct, Sequence):
172+
for image in self.struct:
173+
self._check_calculator(image.calc)
170174

171175
# Set output file
172176
self.write_kwargs.setdefault("filename", None)

0 commit comments

Comments
 (0)