Skip to content

Commit

Permalink
Monebody bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Genevieve committed Jul 5, 2019
1 parent 5521eac commit 93cf6dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/onebody.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ end
evaluate(V::MOneBody,sp) = V.E0[sp]

function site_energies(V::MOneBody{T}, at::Atoms) where {T}
E = zeros(T, 1, length(at))
E = zeros(T, length(at))
for i in 1:length(at)
E[i] = V(chemical_symbols(at)[i])
end
Expand All @@ -82,6 +82,8 @@ function convert_str_2_symb(D::Dict{String,T}) where {T}
return Dout
end

convert_str_2_symb(D::Dict{Symbol,T}) where {T} = D #already in the correct form

MOneBody(D::Dict{String, T}) where {T} = MOneBody(convert_str_2_symb(D["E0"]))

convert(::Val{:MOneBody}, D::Dict) = MOneBody(convert_str_2_symb(D["E0"]))
Expand Down

0 comments on commit 93cf6dd

Please sign in to comment.