From 93cf6dd943250d05305b51584c3d1beedc4c4174 Mon Sep 17 00:00:00 2001 From: Genevieve Date: Fri, 5 Jul 2019 14:46:48 +0100 Subject: [PATCH] Monebody bug. --- src/onebody.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/onebody.jl b/src/onebody.jl index f0343d6..f617e1b 100644 --- a/src/onebody.jl +++ b/src/onebody.jl @@ -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 @@ -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"]))