Skip to content

Commit

Permalink
Correct PBC behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan committed Nov 2, 2023
1 parent 033e349 commit cb160b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion electronicparsers/crystal/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,10 @@ def parse(self, filepath, archive, logger):
labels_positions = out["labels_positions"]
lattice_vectors_restart = out["lattice_vectors_restart"]
dimensionality = out["dimensionality"]
pbc = np.array([True] * dimensionality + [False] * (3 - dimensionality))
if dimensionality == 0:
pbc = np.array([False] * 3)
else:
pbc = np.array([True] * 3)

# By default the system is read from the configuration at the beginning
# of the file: it may come from restart or clean start
Expand Down

0 comments on commit cb160b5

Please sign in to comment.