Skip to content

Commit

Permalink
BUGFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricTravelletti committed Feb 21, 2024
1 parent e6be5ac commit 39f59c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/optimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,9 @@ function minimize_energy!(system, calculator; pressure=0.0, procedure="relax",
end
f_opt = OptimizationFunction(system, calculator; pressure)
problem = OptimizationProblem(f_opt, x0, nothing) # Last argument needed in Optimization.jl.
solve(problem, solver; kwargs...)
optimization_data = solve(problem, solver; kwargs...)

# Return final structure.
optimized_system = update_not_clamped_positions(system, optimization_data.u * u"bohr")
(; optimized_system, optimization_data)
end

0 comments on commit 39f59c6

Please # to comment.