File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/aiida/orm/nodes/data/array Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,10 @@ def __init__(
8484 ** kwargs ,
8585 ):
8686 super ().__init__ (** kwargs )
87- self .cell = cell
88- self .pbc = (pbc1 , pbc2 , pbc3 )
87+ if cell is not None :
88+ self .cell = cell
89+ if any (pbc is not None for pbc in (pbc1 , pbc2 , pbc3 )):
90+ self .pbc = (pbc1 or False , pbc2 or False , pbc3 or False )
8991 if labels is not None and label_numbers is not None :
9092 if len (labels ) != len (label_numbers ):
9193 raise ValueError ('Labels and label numbers must have the same length' )
@@ -144,7 +146,6 @@ def pbc(self):
144146 :return: a tuple of three booleans, each one tells if there are periodic
145147 boundary conditions for the i-th real-space direction (i=1,2,3)
146148 """
147- # return copy.deepcopy(self._pbc)
148149 return (self .base .attributes .get ('pbc1' ), self .base .attributes .get ('pbc2' ), self .base .attributes .get ('pbc3' ))
149150
150151 @pbc .setter
You can’t perform that action at this time.
0 commit comments