Closed jagot closed 5 years ago
julia> c"1s2 60s2" ERROR: LoadError: MethodError: no method matching getindex(::Nothing, ::Int64) Stacktrace: [1] parse_orbital(::Type{Orbital}, ::SubString{String}) at /Users/jagot/.julia/dev/AtomicLevels/src/configurations.jl:173 [2] _broadcast_getindex_evalf at ./broadcast.jl:582 [inlined] [3] _broadcast_getindex at ./broadcast.jl:555 [inlined] [4] getindex at ./broadcast.jl:515 [inlined] [5] copyto_nonleaf!(::Array{Tuple{Orbital{Int64},Int64,Symbol},1}, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(AtomicLevels.parse_orbital),Tuple{Base.RefValue{UnionAll},Base.Broadcast.Extruded{Array{SubString{String},1},Tuple{Bool},Tuple{Int64}}}}, ::Base.OneTo{Int64}, ::Int64, ::Int64) at ./broadcast.jl:931 [6] copy at ./broadcast.jl:794 [inlined] [7] materialize at ./broadcast.jl:756 [inlined] [8] parse(::Type{Configuration{Orbital}}, ::String) at /Users/jagot/.julia/dev/AtomicLevels/src/configurations.jl:191 [9] @c_str(::LineNumberNode, ::Module, ::Any) at /Users/jagot/.julia/dev/AtomicLevels/src/configurations.jl:196 in expression starting at REPL[31]:1
It is however possible to create a single orbital with n=60:
n=60
julia> o"60s" 60s
Hmm, it didn't automatically close. Fixed by #20.
It is however possible to create a single orbital with
n=60
: