[CP2K-user] [CP2K:22278] Spin polarized calculation with xTB

Thomas Kühne tkuehne at gmail.com
Tue Jun 9 11:52:18 UTC 2026


Thanks for the info! I was already wondering how we could have messed up so badly ;)

Greetings, 
Thomas

> Am 09.06.2026 um 05:47 schrieb Dmitry Ryndyk <dmitry.ryndyk at tu-dresden.de>:
> 
> I made new tests, sorry for any misunderstanding. I used smearing incorrectly. 
> As I see now, tblite works with UKS and gives some results that look reasonable.
> 
> Thank you for your comments,
> Dmitry
> 
> Dmitry Ryndyk schrieb am Dienstag, 9. Juni 2026 um 11:36:30 UTC+2:
>> Oh!
>> Thank you!
>> I forgot to use FIXED_MAGNETIC_MOMENT with SMEAR.
>> 
>> Best wishes,
>> Dmitry
>> Jürg Hutter schrieb am Dienstag, 9. Juni 2026 um 11:21:58 UTC+2:
>>> Hi
>>> 1) The implemented xTB Hamiltonians don't have a spin dependence.
>>> You will always get the same orbital energies for alpha and beta electrons.
>>> 2) Occupation of the orbital levels depends on a combination of input parameters.
>>> a) No smearing: Number of alpha and beta electrons is determined from the Multiplicity keyword.
>>> b) With smearing: default is a single Fermi energy and electrons are allowed to move from alpha
>>> to beta. This is default because this is what most people want for DFT Mermin functional calculations.
>>> If you want to keep the number of electrons to be fixed, you need to specify
>>> FIXED_MAGNETIC_MOMENT 2
>>> This together with a FD temperature of 300 is the default in tblite (if I'm correct).
>>> 
>>> regards
>>> JH
>>> 
>>> ________________________________________
>>> From: cp... at googlegroups.com <> <cp... at googlegroups.com <>> on behalf of Dmitry Ryndyk <dmitry... at tu-dresden.de <>>
>>> Sent: Tuesday, June 9, 2026 7:23 AM
>>> To: cp2k
>>> Subject: Re: [CP2K:22273] Spin polarized calculation with xTB
>>> 
>>> Dear Jürg, Michael, Thomas,
>>> Thank you for the answers. I use the master git branch, and the UKS tblite simply doesn't work as UKS. I hope to get a reply from someone who cares about tblite integration into CP2K just now.
>>> 
>>> But meanwhile, I do not understand the internal spin-dependent now. Please have a look at the attachment. I tried
>>> Multiplicity=3 and got a strange result. There is no spin difference at the end!
>>> And it has nothing to do with xTB; the same is for DFT PBE.
>>> Only with OT do I get the expected result.
>>> What do I not understand?
>>> 
>>> Thank you in advance,
>>> Dmitry
>>> 
>>> Thomas Kühne schrieb am Dienstag, 9. Juni 2026 um 00:30:36 UTC+2:
>>> Hi everybody,
>>> 
>>> there have been some recent new developments. In conjunction with tblite 0.6.0
>>> CP2K now supports GFN2 for periodic systems incl. k-points and via analytic
>>> gradients and stress tensor for RKS and UKS. Have a look at the recent preprint,
>>> as well as the recent regtests and https://github.com/DCM-Uni-Paderborn/Periodic-GFN2-Benchmarks
>>> for representative sample inputs.
>>> 
>>> Greetings,
>>> Thomas
>>> 
>>> <https://chemrxiv.org/doi/abs/10.26434/chemrxiv.15003939/v1>
>>> chemrxiv.org <http://chemrxiv.org/><https://chemrxiv.org/doi/abs/10.26434/chemrxiv.15003939/v1>
>>> [X]<https://chemrxiv.org/doi/abs/10.26434/chemrxiv.15003939/v1>
>>> 
>>> 
>>> Am 08.06.2026 um 11:51 schrieb Michael LaCount <lacou... at gmail.com <>>:
>>> 
>>> I looked into this earlier this year.
>>> 
>>> Tblite does seem to support the spin polarized version (spGFNn) see https://onlinelibrary.wiley.com/doi/pdfdirect/10.1002/jcc.27185 "All (sp)GFNn-xTB calculations were performed with the tblite v. 0.3.0 development version either as a standalone or in the xtb v. 6.5.1 development version." A bit ambiguous but it seems to me to read like tblite supported spGFN-xTB.
>>> 
>>> But I'll note that I found using LSD with TBLITE GFN1 doesn't work properly (at least in v2026.1) (see https://github.com/cp2k/cp2k/issues/4818 and https://github.com/cp2k/cp2k/pull/4804). Also TBLITE with GFN2 has (or at least had) some odd behavior assigning electrons for nitrogen.
>>> 
>>> In short, at least as of CP2K 2026.1 there is no way (to my knowledge) to get a proper spGFNn calculation done with CP2K. The best you can do is triplet GFN0/1 using the internal CP2K implementation of XTB.
>>> 
>>> Best,
>>> Michael
>>> 
>>> On Monday, June 8, 2026 at 7:12:08 AM UTC-7 Jürg Hutter wrote:
>>> Hi
>>> 
>>> This extension is not included in the CP2K native gfn0/1 xTB Hamiltonians.
>>> 
>>> I don't know if it is available through tblite, but most likely it has to be triggered by a
>>> keyword and defaults to the original spinless Hamiltonian.
>>> Probably this keyword is not yet accessible through the CP2K input?
>>> 
>>> best regards
>>> JH
>>> 
>>> ________________________________________
>>> From: cp... at googlegroups.com <> <cp... at googlegroups.com <>> on behalf of Dmitry Ryndyk <dmitry... at tu-dresden.de <>>
>>> Sent: Monday, June 8, 2026 3:36 PM
>>> To: cp2k
>>> Subject: Re: [CP2K:22267] Spin polarized calculation with xTB
>>> 
>>> Dear all,
>>> 
>>> What is going on at present?
>>> 
>>> The xTB site<https://xtb-docs.readthedocs.io/en/latest/spgfn.html#spgfnn-xtb> states that spin-polarized calculations with tblite are possible, and spin-dependent Hamiltonians are described in the 2023 paper<https://onlinelibrary.wiley.com/doi/10.1002/jcc.27185>.
>>> 
>>> Moreover, at the CP2K site<https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/QS/XTB/TBLITE.html>, it is written:
>>> Spin-polarized CP2K/tblite calculations are selected with the regular DFT/UKS keyword or its LSD/SPIN_POLARIZED aliases; DFT/MULTIPLICITY sets the number of unpaired electrons. UKS uses tblite’s spin-polarized Hamiltonian.
>>> 
>>> At the moment, however, it seems to be blocked. One always gets restricted orbitals.
>>> Any ideas?
>>> 
>>> Best wishes,
>>> Dmitry
>>> 
>>> hut... at chem.uzh.ch <> schrieb am Freitag, 5. März 2021 um 19:09:23 UTC+1:
>>> Hi
>>> 
>>> you can calculate a triplet using UKS. For xTB the results should
>>> show equal orbital energies for alpha and beta spin, even though
>>> the occupations will be different.
>>> 
>>> regards
>>> 
>>> Juerg
>>> --------------------------------------------------------------
>>> Juerg Hutter Phone : ++41 44 635 4491 <tel:+41%2044%20635%2044%2091><tel:+41%2044%20635%2044%2091><tel:+41%2044%20635%2044%2091>
>>> Institut für Chemie C FAX : ++41 44 635 6838 <tel:+41%2044%20635%2068%2038><tel:+41%2044%20635%2068%2038><tel:+41%2044%20635%2068%2038>
>>> Universität Zürich E-mail: hut... at chem.uzh.ch <>
>>> Winterthurerstrasse 190
>>> CH-8057 Zürich, Switzerland
>>> ---------------------------------------------------------------
>>> 
>>> -----cp... at googlegroups.com <> wrote: -----
>>> To: cp... at googlegroups.com <>
>>> From: "Pierre-André Cazade"
>>> Sent by: cp... at googlegroups.com <>
>>> Date: 03/05/2021 05:16PM
>>> Subject: Re: [CP2K:14885] Spin polarized calculation with xTB
>>> 
>>> Dear Juerg,
>>> 
>>> It's a very interesting topic. Provided what you described in your reply, is it possible to use xTB for a triplet state? If yes, is it necessary to use UKS, since the Hamiltonian doesn't have spin-dependence?
>>> 
>>> Regards,
>>> Pierre
>>> On Fri, Mar 5, 2021 at 3:42 PM <hut... at chem.uzh.ch <>> wrote:
>>> Hi
>>> 
>>> you can use unrestricted calculations also with xTB. However,
>>> the xTB Hamiltonian doesn't have a spin dependence. So what you
>>> get is the same as using a restricted open shell calculation.
>>> Unrestricted is double the work, but can use OT methods.
>>> Restricted open shell (ROKS will not work btw) will need
>>> diagonalization and smearing. What is more efficient in the end
>>> might depend on your system.
>>> 
>>> best regards
>>> 
>>> Juerg Hutter
>>> --------------------------------------------------------------
>>> Juerg Hutter Phone : ++41 44 635 4491 <tel:+41%2044%20635%2044%2091><tel:+41%2044%20635%2044%2091><tel:+41%2044%20635%2044%2091>
>>> Institut für Chemie C FAX : ++41 44 635 6838 <tel:+41%2044%20635%2068%2038><tel:+41%2044%20635%2068%2038><tel:+41%2044%20635%2068%2038>
>>> Universität Zürich E-mail: hut... at chem.uzh.ch <>
>>> Winterthurerstrasse 190
>>> CH-8057 Zürich, Switzerland
>>> ---------------------------------------------------------------
>>> 
>>> -----cp... at googlegroups.com <> wrote: -----
>>> To: "cp2k" <cp... at googlegroups.com <>>
>>> From: "Mauro Sgroi"
>>> Sent by: cp... at googlegroups.com <>
>>> Date: 03/05/2021 09:33AM
>>> Subject: [CP2K:14881] Spin polarized calculation with xTB
>>> 
>>> Dear all,
>>> I'm trying to understand if it is possible to use xTB to perform spin polarized calculations.
>>> If yes, which is the right way to proceed?
>>> Is there an howto to follow?
>>> 
>>> Thannks a lot and best regards,
>>> Mauro Sgroi
>>> Centro Ricerche FIAT
>>> Italy
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups "cp2k" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com <>.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/f6049f47-2a0d-4d21-bdd7-8a1fa320dfb3n%40googlegroups.com.
>>> 
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups "cp2k" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com <>.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/OFDF4C8D2B.FF7BE2D3-ONC125868F.0056498D-C125868F.0056498E%40lotus.uzh.ch.
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups "cp2k" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com <>.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/CAFnf9gqvD3jnN_wRAgbYZGaN%2BC1%2BGANJHs8-Nqf-ruYMGjKHHQ%40mail.gmail.com.
>>> 
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups "cp2k" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com <><mailto:cp2k+uns... at googlegroups.com <>>.
>>> To view this discussion visit https://groups.google.com/d/msgid/cp2k/05c0af2b-f6cb-4bdb-817c-521bcf5acfb9n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/05c0af2b-f6cb-4bdb-817c-521bcf5acfb9n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups "cp2k" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com <>.
>>> To view this discussion visit https://groups.google.com/d/msgid/cp2k/25710ec6-ea83-4356-80e3-69a6dfae4d27n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/25710ec6-ea83-4356-80e3-69a6dfae4d27n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> 
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups "cp2k" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns... at googlegroups.com <><mailto:cp2k+uns... at googlegroups.com <>>.
>>> To view this discussion visit https://groups.google.com/d/msgid/cp2k/bb989d03-22dd-4a73-9264-1a24d83d98a3n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/bb989d03-22dd-4a73-9264-1a24d83d98a3n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com <mailto:cp2k+unsubscribe at googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/cp2k/2a551623-4c24-403f-9a4f-ec2886e8e8a2n%40googlegroups.com <https://groups.google.com/d/msgid/cp2k/2a551623-4c24-403f-9a4f-ec2886e8e8a2n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/81523C4B-3FDC-4EA1-B919-F5CB5A048201%40gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20260609/b12d5fdc/attachment-0001.htm>


More information about the CP2K-user mailing list