Skip to content

Commit a68700b

Browse files
committed
fixed remaining old calls
1 parent be27d1e commit a68700b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/sisl/geom/bilayer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def bilayer(
132132
top.tile(rep, axis=0)
133133
.tile(rep, axis=1)
134134
.move(align_vec)
135-
.rotate(theta, "z", rad=True, what="abc+xyz")
135+
.rotate([theta, "z"], rad=True, what="abc+xyz")
136136
)
137137

138138
inside_idx = cell_box.within_index(top.xyz)
@@ -166,7 +166,7 @@ def bilayer(
166166
vec = bilayer.cell[0] + bilayer.cell[1]
167167
vec_costh = vec[0] / vec.dot(vec) ** 0.5
168168
vec_th = -acos(vec_costh)
169-
bilayer = bilayer.move(-offset).rotate(vec_th, "z", rad=True, what="xyz+abc")
169+
bilayer = bilayer.move(-offset).rotate([vec_th, "z"], rad=True, what="xyz+abc")
170170

171171
# Sanity check
172172
assert len(bilayer) == natoms

src/sisl/geom/nanoribbon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def nanoribbon(
125125
x.dot([1, 0, 0]) / x.dot(x) ** 0.5
126126
) # angle of vectors, x and b=[1, 0, 0]
127127
ribbon = ribbon.rotate(
128-
-angle, "z", origin=ribbon.xyz[0], rad=True, what="abc+xyz"
128+
(-angle, "z"), origin=ribbon.xyz[0], rad=True, what="abc+xyz"
129129
)
130130
# first lattice vector strictly along x
131131
ribbon.cell[0, 1] = 0

src/sisl/io/siesta/tests/test_grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_si_pdos_kgrid_grid_fdf(sisl_files):
3838

3939
def test_grid_read_write(sisl_tmp):
4040
path = sisl_tmp("grid.bin")
41-
lat = sisl.Lattice(1).rotate(45, "z").rotate(45, "x")
41+
lat = sisl.Lattice(1).rotate((45, "z")).rotate((45, "x"))
4242
grid = sisl.Grid([4, 5, 6], lattice=lat)
4343
grid.grid = np.random.rand(*grid.shape)
4444
gridSile = sisl.io.siesta.gridSileSiesta

src/sisl/io/tests/test_object.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def test_write(self, sisl_tmp, sisl_system, sile):
264264
if issubclass(sile, SileCDF):
265265
pytest.importorskip("netCDF4")
266266

267-
G = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc")
267+
G = sisl_system.g.rotate([-30, sisl_system.g.cell[2]], what="xyz+abc")
268268
G.set_nsc([1, 1, 1])
269269
f = sisl_tmp("test_write")
270270

@@ -275,7 +275,7 @@ def test_read_write_lattice(self, sisl_tmp, sisl_system, sile):
275275
if issubclass(sile, SileCDF):
276276
pytest.importorskip("netCDF4")
277277

278-
L = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc").lattice
278+
L = sisl_system.g.rotate([-30, sisl_system.g.cell[2]], what="xyz+abc").lattice
279279
L.set_nsc([1, 1, 1])
280280
f = sisl_tmp("test_read_write_geom.win")
281281

@@ -307,7 +307,7 @@ def test_read_write_lattice(self, sisl_tmp, sisl_system, sile):
307307
if issubclass(sile, SileCDF):
308308
pytest.importorskip("netCDF4")
309309

310-
L = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc").lattice
310+
L = sisl_system.g.rotate((-30, sisl_system.g.cell[2]), what="xyz+abc").lattice
311311
L.set_nsc([1, 1, 1])
312312
f = sisl_tmp("test_read_write_geom.win")
313313

@@ -333,7 +333,7 @@ def test_read_write_geometry(self, sisl_tmp, sisl_system, sile):
333333
if issubclass(sile, SileCDF):
334334
pytest.importorskip("netCDF4")
335335

336-
G = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc")
336+
G = sisl_system.g.rotate((-30, sisl_system.g.cell[2]), what="xyz+abc")
337337
G.set_nsc([1, 1, 1])
338338
f = sisl_tmp("test_read_write_geom.win")
339339

@@ -380,7 +380,7 @@ def test_read_write_hamiltonian(self, sisl_tmp, sisl_system, sile):
380380
if issubclass(sile, _gfSileSiesta):
381381
pytest.skip("gfSileSiesta handles writing Hamiltonians in a special way")
382382

383-
G = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc")
383+
G = sisl_system.g.rotate([-30, sisl_system.g.cell[2]], what="xyz+abc")
384384
H = Hamiltonian(G)
385385
H.construct([[0.1, 1.45], [0.1, -2.7]])
386386
f = sisl_tmp("test_read_write_hamiltonian.win")
@@ -409,7 +409,7 @@ def test_read_write_density_matrix(self, sisl_tmp, sisl_system, sile):
409409
if issubclass(sile, SileCDF):
410410
pytest.importorskip("netCDF4")
411411

412-
G = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc")
412+
G = sisl_system.g.rotate((-30, sisl_system.g.cell[2]), what="xyz+abc")
413413
DM = DensityMatrix(G, orthogonal=True)
414414
DM.construct([[0.1, 1.45], [0.1, -2.7]])
415415

@@ -440,7 +440,7 @@ def test_read_write_energy_density_matrix(self, sisl_tmp, sisl_system, sile):
440440
if issubclass(sile, SileCDF):
441441
pytest.importorskip("netCDF4")
442442

443-
G = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc")
443+
G = sisl_system.g.rotate((-30, sisl_system.g.cell[2]), what="xyz+abc")
444444
EDM = EnergyDensityMatrix(G, orthogonal=True)
445445
EDM.construct([[0.1, 1.45], [0.1, -2.7]])
446446

@@ -473,7 +473,7 @@ def test_read_write_hamiltonian_overlap(self, sisl_tmp, sisl_system, sile):
473473
if issubclass(sile, _gfSileSiesta):
474474
pytest.skip("gfSileSiesta handles writing Hamiltonians in a special way")
475475

476-
G = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc")
476+
G = sisl_system.g.rotate((-30, sisl_system.g.cell[2]), what="xyz+abc")
477477
H = Hamiltonian(G, orthogonal=False)
478478
H.construct([[0.1, 1.45], [(0.1, 1), (-2.7, 0.1)]])
479479

@@ -504,7 +504,7 @@ def test_read_write_grid(self, sisl_tmp, sisl_system, sile):
504504
if issubclass(sile, SileCDF):
505505
pytest.importorskip("netCDF4")
506506

507-
g = sisl_system.g.rotate(-30, sisl_system.g.cell[2, :], what="xyz+abc")
507+
g = sisl_system.g.rotate((-30, sisl_system.g.cell[2]), what="xyz+abc")
508508
G = Grid([10, 11, 12])
509509
G[:, :, :] = np.random.rand(10, 11, 12)
510510

0 commit comments

Comments
 (0)