Skip to content

Commit 785168b

Browse files
committed
fix the lattice issue
1 parent 8b26ee4 commit 785168b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyxtal/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,10 @@ def make_transitions(self, disps, lattice=None, translation=None, N_images=3, bo
22292229
struc.atom_sites[j].update(coord)
22302230
struc.source = 'Transition {:d} {:6.3f}'.format(i, max_disp*i)
22312231
struc.disp = max_disp*i
2232-
struc.lattice.set_matrix(cell + i*l_disps)
2232+
if i >= N_images:
2233+
struc.lattice.set_matrix(cell + (i-2*(N_images-1))*l_disps)
2234+
else:
2235+
struc.lattice.set_matrix(cell + i*l_disps)
22332236
strucs.append(struc)
22342237
return strucs
22352238

0 commit comments

Comments
 (0)