Skip to content

Commit ed9dff3

Browse files
Docfix: Comment on spin index on density ρ (#962)
1 parent 653cfc5 commit ed9dff3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/guide/tutorial.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ stack(scfres.eigenvalues)
8989
# We can check the occupations ...
9090
stack(scfres.occupation)
9191
# ... and density, where we use that the density objects in DFTK are
92-
# indexed as ρ[iσ, ix, iy, iz], i.e. first in the spin component and then
93-
# in the 3-dimensional real-space grid.
92+
# indexed as ρ[ix, iy, iz, iσ], i.e. first in the 3-dimensional real-space grid
93+
# and then in the spin component.
9494
rvecs = collect(r_vectors(basis))[:, 1, 1] # slice along the x axis
9595
x = [r[1] for r in rvecs] # only keep the x coordinate
9696
plot(x, scfres.ρ[1, :, 1, 1], label="", xlabel="x", ylabel="ρ", marker=2)

0 commit comments

Comments
 (0)