AKEngels / CAST

Conformational Analysis and Search Tool
GNU Lesser General Public License v3.0
1 stars 5 forks source link

Total energy and TOTAL / SUM are not always the same when performing an optimization #4

Closed S0S-90 closed 6 years ago

S0S-90 commented 6 years ago

If running an optimization the total energy given in the table with the partial energies is not the same as the one in the line beneath that starts with "Total energy: " The energy in this line is the energy of the last step of the optimization; the one in the table is the correct sum of the partial energies. However the difference is very small (usually only in decimal places). Why is it like this and what is the correct energy?

Example what the end of the output file looks like:

Optimization: Energy of step 1012 is -36523.12109375 integrity 1
Optimization done (status 0). Evaluations:1012
Energy after optimization: 
Energies
                    E_bs                  E_coul                   E_rep                   SUM

                       0                       0                       0         -36523.11934507

Total energy: -36523.12109375

Post-Opt: 1(406.55975515 s)
                       0                       0                       0         -36523.11934507

Total energy: -36523.12109375

Task LOCOPT took 406.56016254 s (406560162543 ticks) to complete.
Execution of CAST (3.2.0.2dev) ended after 406.56288121 s (406562881206 ticks)

[issue copied from old CAST repository, issue #82]

S0S-90 commented 6 years ago

This only happens when using the internal CAST optimizer not the one of an external program. Maybe it is related to issue #3 ?

S0S-90 commented 6 years ago

The difference came from the LBFGS-optimizer. Obviously the energy that LBFGS calculated was not exactly the same that the one calculated by the energy interface. Now CAST should only show the energy from the energy interface.