Skip to content

Commit

Permalink
Lazy import in StructureData.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikibonacci committed Sep 9, 2024
1 parent 090c740 commit be46122
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/aiida/orm/nodes/data/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

from .data import Data

from aiida_atomistic import StructureDataMutable as AtomisticStructureDataMutable

__all__ = ('StructureData', 'Kind', 'Site')

# Threshold used to check if the mass of two different Site objects is the same.
Expand Down Expand Up @@ -775,6 +773,7 @@ def to_atomistic(self):
"""
Returns the atomistic StructureData version of the orm.StructureData one.
"""
from aiida_atomistic import StructureDataMutable as AtomisticStructureDataMutable
atomistic = AtomisticStructureDataMutable(pbc=self.pbc, cell=self.cell)
for site in self.sites:
atomistic.add_atom(
Expand Down

0 comments on commit be46122

Please sign in to comment.