Skip to content

Commit

Permalink
Update show for SpglibCell
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Aug 16, 2023
1 parent 0a69c41 commit 39413bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ function Base.show(io::IO, ::MIME"text/plain", cell::SpglibCell)
println(io)
println(io, " lattice:")
for row in eachrow(cell.lattice)
println(io, " ", join(row, " "))
println(io, " ", join(row, " "))
end
num_atom = natoms(cell)
println(io, " $num_atom atomic positions:")
for position in cell.positions
println(io, " ", join(position, " "))
println(io, " ", join(position, " "))
end
println(io, " $num_atom atoms:")
println(io, " ", join(cell.atoms, " "))
println(io, " ", join(cell.atoms, " "))
if !isempty(cell.magmoms)
println(io, " $num_atom magmoms:")
if eltype(cell.magmoms) <: AbstractArray
for magmom in cell.magmoms
println(io, " ", magmom)
println(io, " ", magmom)
end
else
println(io, " ", join(cell.magmoms, " "))
println(io, " ", join(cell.magmoms, " "))
end
end
return nothing
Expand Down

0 comments on commit 39413bc

Please sign in to comment.