forked from lijiext/lammps
calculate energy in the beginning only once
This commit is contained in:
parent
ee8d3ced31
commit
fd5bc857b2
|
@ -133,7 +133,7 @@ int MinSpin::iterate(int maxiter)
|
|||
// optimize timestep accross processes / replicas
|
||||
// need a force calculation for timestep optimization
|
||||
|
||||
energy_force(0);
|
||||
if (iter == 0) energy_force(0);
|
||||
dts = evaluate_dt();
|
||||
|
||||
// apply damped precessional dynamics to the spins
|
||||
|
|
|
@ -181,7 +181,7 @@ int MinSpinOSO_CG::iterate(int maxiter)
|
|||
// optimize timestep accross processes / replicas
|
||||
// need a force calculation for timestep optimization
|
||||
|
||||
energy_force(0);
|
||||
if (iter == 0) energy_force(0);
|
||||
dts = evaluate_dt();
|
||||
|
||||
calc_gradient(dts);
|
||||
|
|
|
@ -190,7 +190,7 @@ int MinSpinOSO_LBFGS::iterate(int maxiter)
|
|||
// optimize timestep accross processes / replicas
|
||||
// need a force calculation for timestep optimization
|
||||
|
||||
energy_force(0);
|
||||
if (iter == 0) energy_force(0);
|
||||
// dts = evaluate_dt();
|
||||
// dts = 1.0;
|
||||
calc_gradient(1.0);
|
||||
|
|
Loading…
Reference in New Issue