Skip to content

Commit

Permalink
some format and show function updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Jun 4, 2023
1 parent 0f75fd2 commit ef18738
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/PeriodicSystems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ abstract type AbstractPeriodicSystem{OutputName} end
import Base: getproperty, propertynames
getproperty(sys::AbstractPeriodicSystem, s::Symbol) = getproperty(sys, Val(s))
getproperty(sys::AbstractPeriodicSystem, s::Val{S}) where {S} = getfield(sys, S)
# publi properties
# public properties
getproperty(sys::AbstractPeriodicSystem, ::Val{:unitcell}) = getfield(getfield(getfield(sys, :_box), :input_unit_cell), :matrix)
getproperty(sys::AbstractPeriodicSystem, ::Val{:cutoff}) = getfield(getfield(sys, :_box), :cutoff)
getproperty(sys::AbstractPeriodicSystem{OutputName}, ::Val{OutputName}) where {OutputName} = getfield(sys, :output)
Expand Down Expand Up @@ -341,11 +341,11 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::PeriodicSystem1{OutputNa
N = size(sys.unitcell, 1)
println(io, "PeriodicSystem1{$OutputName} of dimension $N, composed of:")
show(IOContext(io, :indent => indent + 4), mime, sys._box)
println()
println(io)
show(io_sub, mime, sys._cell_list)
println("\n Parallelization auxiliary data set for: ")
println(io, "\n Parallelization auxiliary data set for: ")
show(io_sub, mime, sys._cell_list.nbatches)
print("\n Type of output variable ($OutputName): $(typeof(sys.output))")
print(io, "\n Type of output variable ($OutputName): $(typeof(sys.output))")
end

function Base.show(io::IO, mime::MIME"text/plain", sys::PeriodicSystem2{OutputName}) where {OutputName}
Expand All @@ -354,11 +354,11 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::PeriodicSystem2{OutputNa
N = size(sys.unitcell, 1)
println(io, "PeriodicSystem2{$OutputName} of dimension $N, composed of:")
show(IOContext(io, :indent => indent + 4), mime, sys._box)
println()
println(io)
show(io_sub, mime, sys._cell_list)
println("\n Parallelization auxiliary data set for: ")
println(io,"\n Parallelization auxiliary data set for: ")
show(io_sub, mime, sys._cell_list.target.nbatches)
print("\n Type of output variable ($OutputName): $(typeof(sys.output))")
print(io,"\n Type of output variable ($OutputName): $(typeof(sys.output))")
end

#
Expand Down

0 comments on commit ef18738

Please sign in to comment.