From 2cbafda94bd4c3b10d155a972e0db3ec9cc7e192 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 30 Oct 2019 10:44:02 +0100 Subject: [PATCH] printing for projections and append! --- src/atom.jl | 4 +++- src/jobAPI.jl | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/atom.jl b/src/atom.jl index 9e0e38b5..f649a1d0 100644 --- a/src/atom.jl +++ b/src/atom.jl @@ -150,8 +150,10 @@ function setpseudo!(at::AbstractAtom, pseudo::Pseudo; print=true) atom(at).pseudo = pseudo end -setprojections!(at::AbstractAtom, projections::Vector{Projection}) = +function setprojections!(at::AbstractAtom, projections::Vector{Projection}; print=true) + print && @info "Setting projections for atom $(name(at)) to $projections" atom(at).projections = projections +end bondlength(at1::AbstractAtom{T}, at2::AbstractAtom{T}, R=T(0.0)) where T<:AbstractFloat = norm(position_cart(at1) - position_cart(at2) - R) diff --git a/src/jobAPI.jl b/src/jobAPI.jl index 5f033a2a..5732c17b 100644 --- a/src/jobAPI.jl +++ b/src/jobAPI.jl @@ -132,6 +132,8 @@ Base.insert!(job::DFJob, index::Int, input::DFInput) = insert!(job.inputs, index Base.push!(job::DFJob, input::DFInput) = push!(job.inputs, input) Base.pop!(job::DFJob) = pop!(job.inputs) +Base.append!(job::DFJob, args...) = append!(job.inputs, args...) + """Access an input inside the job using it's name. E.g `job["scf"]`""" function Base.getindex(job::DFJob, id::String) tmp = getfirst(x -> name(x)==id, inputs(job))