From b9d739ca6152324ffc00d41418ac8d96aa6f08bd Mon Sep 17 00:00:00 2001 From: Miki Bonacci Date: Fri, 22 Nov 2024 20:52:00 +0100 Subject: [PATCH] Bugfix `has_atomistic`. --- src/aiida/orm/nodes/data/array/kpoints.py | 2 +- src/aiida/orm/nodes/data/structure.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aiida/orm/nodes/data/array/kpoints.py b/src/aiida/orm/nodes/data/array/kpoints.py index 86525fde4..b4dadf2a8 100644 --- a/src/aiida/orm/nodes/data/array/kpoints.py +++ b/src/aiida/orm/nodes/data/array/kpoints.py @@ -230,7 +230,7 @@ def set_cell_from_structure(self, structuredata): 'An instance of StructureData or aiida-atomistic StructureData should be passed to ' 'the KpointsData, found instead {}'.format(structuredata.__class__) ) - if has_atomistic: + if has_atomistic(): from aiida_atomistic import StructureData as AtomisticStructureData if not isinstance(structuredata, AtomisticStructureData): diff --git a/src/aiida/orm/nodes/data/structure.py b/src/aiida/orm/nodes/data/structure.py index f06d0c22d..875736f4c 100644 --- a/src/aiida/orm/nodes/data/structure.py +++ b/src/aiida/orm/nodes/data/structure.py @@ -1889,7 +1889,7 @@ def to_atomistic(self): """ Returns the atomistic StructureData version of the orm.StructureData one. """ - if not has_atomistic: + if not has_atomistic(): raise ImportError( 'aiida-atomistic plugin is not installed, \ please install it to have full support for atomistic structures'