qcscine / sparrow

https://scine.ethz.ch
BSD 3-Clause "New" or "Revised" License
78 stars 15 forks source link

Strange warnings using DFTBn with spin and UHF #1

Closed ehermes closed 4 years ago

ehermes commented 5 years ago

When running an open-shell (-u) calculation on spin polarized systems (e.g. -s 2) with one of the DFTB methods implemented in Sparrow, two conflicting messages are printed, but the calculation proceeds anyway.

Edit: I modified the source to add more decimals of precision to the printed energy, so don't worry if that looks wrong.

ehermes@<snip>$ /home/ehermes/build/sparrow/install/bin/sparrow -x test_0.xyz -u -s 2 -M DFTB3
0000001 | 2019-06-12, 16:49:45.423855 [error] - Not possible to run unrestricted calculations with this method.
0000002 | 2019-06-12, 16:49:45.513614 [warning] - The chosen spin multiplicity (2) requires an unrestricted calculation. Setting UHF calculation.
SPARROW, command-line program
Host: <snip>
Start: Wed Jun 12 16:49:45 2019

Program call:  /home/ehermes/build/sparrow/install/bin/sparrow -x test_0.xyz -u -s 2 -M DFTB3
Method:                  DFTB3
Calculation Modus:       Spin-unrestricted formalism
Molecular charge:        0
Spin multiplicity:       2
Convergence threshold:   1e-05 hartree
Max Iterations:          100
Convergence accelerator: diis
Parameters:              /home/ehermes/build/sparrow/install/resources/Parameters/Dftb/3ob-2-1/

================================================================================
Calculation:

Energy [hartree]:
-18.33615710242787

================================================================================

Total job duration: 5 milliseconds.

End: Wed Jun 12 16:49:45 2019

I don't actually know whether it's calculating with the correct spin state, but at a glance it seems to be working okay.

weymutht commented 5 years ago

Thank you very much for your bug report. The two conflicting messages are due to a small bug in the initialization of DFTB3. However, the calculation then proceeds as intended by you, i.e., it uses the correct spin state, and the result of the calculation is correct.

We have already fixed this bug in our development version of Sparrow and plan to release a new version soon.

weymutht commented 4 years ago

As promised, we released a new version of Sparrow which does no longer have this bug. Therefore, I'm closing this issue.