Initial guess of the density matrix

2,233 views
Skip to first unread message

Simone Piccinin

unread,
Feb 11, 2010, 3:12:30 PM2/11/10
to cp2k
Dear CP2K users,

I'm studying a large molecule containing 4 Ru atoms. These are
arranged as to form two pairs. I'd like to study the molecule in a
singlet state, and see if the coupling within each pair is
ferromagnetic (FM) or antiferromagnetic (AF). Is there a way in
quickstep to guide the scf cycle toward the FM or AF solution, for
example through an appropriate initial guess of the density matrix?

Thanks for your help.

Best wishes,

Simone Piccinin
CNR-IOM Democritos (Trieste)

Jörg Saßmannshausen

unread,
Feb 11, 2010, 3:53:14 PM2/11/10
to cp...@googlegroups.com
Dear Simone,

I am currently tackling a similar problem but with a different TM. My approach
to the problem is to run a broken symmetry single point calculation. So I fix
the spin of each TM (say up and down), write out the individual MOs and then
calculate the overall molecule by assembling the individual MOs.
However, I am not using cp2k for that. I too would be interested if that can
be done with cp2k (broken symmetry).

Not a solution, but maybe a direction where to go?

Regards

J�rg

> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group. To post to this group, send email to cp...@googlegroups.com.
> To unsubscribe from this group, send email to
> cp2k+uns...@googlegroups.com. For more options, visit this group at
> http://groups.google.com/group/cp2k?hl=en.

--
*************************************************************
J�rg Sa�mannshausen
Research Fellow
University of Strathclyde
Department of Pure and Applied Chemistry
295 Cathedral St.
Glasgow
G1 1XL

email: jorg.sassm...@strath.ac.uk
web: http://sassy.formativ.net

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

marci

unread,
Feb 11, 2010, 4:59:39 PM2/11/10
to cp2k
Hi

something in the direction of a biased initial guess is already
present in QS.
The ATOMIC guess is normally based on the construction of a first
density matrix
by occupation of atomic orbitals according to the electronic
configuration
of each element.
However, there is the possibility to modify this procedure by
subtracting or adding
valence electrons (NEL) from specific channels (identified by N and
L ) of selected elements.
This can be done independently for spin up (ALPHA) and spin down
(BETA).
Have a look at the reference inputs in cp2k/tests/QS/regtest-bs.
This might provide a better initial guess, also for charged systems.
As a safety check, if the resulting density matrix amounts to the
wrong number of electrons,
it is rescaled by a proper factor, and the calculation proceeds.
This trick is only used for the initial guess, no further constraints
are applied afterwards.
Hence, there is no guarantee that the selected configuration is kept
during the SCF.

Kind regards
Marcella

Simone Piccinin

unread,
Feb 12, 2010, 3:27:06 AM2/12/10
to cp2k
Dear Marcella,

thanks a lot for the answer.
I'm not sure I understand how to use these feature, though.

The relevant section of the cu2cl6_m1_clp6cud9.inp file in the test/QS/
regtest-bs folder is this:

&KIND Cu1
ELEMENT Cu
BASIS_SET DZVP-MOLOPT-SR-GTH
POTENTIAL GTH-BLYP-q11
&BS
&ALPHA
NEL -1 0
L 0 2
N 4 3
&END
&BETA
NEL -1 -2
L 0 2
N 4 3
&END
&END
&END

Does this mean that we are removing, from the alpha channel of Cu1, 1
electron from the 4s and in the beta channel 1 electron from the 4s
and 2 electrons from the 3d?
If so, Cu1 now has 4 electrons less than the neutral atom. A similar
treatment is done for Cu2. For Cl, on the other hand, it seems that we
are adding 2 alpha
electrons and 2 beta electrons in the 3p orbitals. Since we have 6 Cl
and 2 Cu atoms in the molecule, the overall charge should be 2*4-6*4 =
-16, resulting
in a wrong number of electrons. Is this what is done, or did I
misunderstand something?

Thanks a lot.
Best wishes,
Simone

marci

unread,
Feb 12, 2010, 5:13:48 AM2/12/10
to cp2k

Hi

you are almost right. Actually what the keywords say in this case is
that for Cu1 1 el. 4s is taken away in spin up, while 1 4s and 2 3d
are taken in spin down. The misunderstanding comes from the fact that
cp2k is working for each spin independently, always using as a
reference the full electronic configuration, and if LSD is active a
factor 2 is applied afterwards.
Then Cu is 4s-1 3d-10. The change imposed for the bias leads to Cu1
ALPHA 4s-0 3d-10 . After the factor 2 is 4s-0 3d-5.
Cu1 BETA instead becomes 4s-0 3d-4. At the end Cu1 has one unpaired
spin-up.

It should become clearer by reading the extended output that appears
with print level MEDIUM.
Example
##########
Spin 1

Guess for atomic kind: Cu1

Electronic structure
Total number of core
electrons 18.00
Total number of valence
electrons 10.00
Total number of
electrons 28.00
Multiplicity not
specified
S [ 2.00 2.00 2.00]
P [ 6.00 6.00]
D 10.00
#########

Indeed, for this system the counting of electrons after the bias must
be readjusted, because each spin channel turns out to have one
electron too much. In the output you can read:
#######
Re-scaling the density matrix to get the right number of electrons for
spin 1
# Electrons Trace(P)
Scaling factor
33
33.999 0.971
######

and later on

######
Re-scaling the density matrix to get the right number of electrons for
spin 2
# Electrons Trace(P)
Scaling factor
33
33.999 0.971
#####

Hope this helps,
Marcella

flo

unread,
Feb 12, 2010, 6:11:06 AM2/12/10
to cp2k
Hi,

actually there is a second way, which could solve your problem, in
case the intial guess is not sufficient.
CP2K provides a section WFN_MIX in QS%PRINT. This keyword can be used
to reorder the MOs in the restart file.

It has to be used as follows:
You need to run a complete wavefunction optimization, and specify:

RESULT_MO_INDEX as the index of the MO to be modified (you can specify
the spin of this MO as well) and
ORIG_MO_INDEX to be the MO from which the WFN to be pasted originates
from.

If you want for example to swap the alpha and beta spins of two states
(1 and 2) you will have to specify

&WFN_MIX
&UPDATE
RESULT_MO_INDEX 1
RESULT_SPIN_INDEX ALPHA
RESULT_SCALE 0.000000000

ORIG_MO_INDEX 2
ORIG_SPIN_INDEX BETA
ORIG_SCALE 1.0000000000

ORIG_IS_VIRTUAL .FALSE.
&END
&UPDATE
RESULT_MO_INDEX 2
RESULT_SPIN_INDEX BETA
RESULT_SCALE 0.0000000

ORIG_MO_INDEX 1
ORIG_SPIN_INDEX ALPHA
ORIG_SCALE 1.0000000

ORIG_IS_VIRTUAL .FALSE.
&END
&END

like this the beta WFN of MO 2 is moved to alpha MO 1 and alpha MO1 is
moved to beta MO 2.
If you now do a restart using the RESTART_WFN (the modified WFN simply
replaces the original RESTART_WFN, therefore, the restart file won't
have a special name), the inital guess will have the state specified
above.

I don't know if this really fits your problem, but as far as I could
see, it should work.

regards
Flo

Don't know if this solution

Simone Piccinin

unread,
Feb 12, 2010, 6:44:14 AM2/12/10
to cp2k
Hi,

thanks a lot, now I think I understand how to use this option.
If this doesn't solve my problem I'll try Flo's suggestion.

Best wishes,
Simone

marci

unread,
Feb 11, 2010, 4:41:10 PM2/11/10
to cp2k

On Feb 11, 9:12 pm, Simone Piccinin <piccinin.sim...@gmail.com> wrote:

tao liu

unread,
Feb 9, 2016, 2:49:54 AM2/9/16
to cp2k
Dear All,

I can understand the &BS setting for Cu1, but still confused on Cl and Cl1.

    &KIND  Cl
      BASIS_SET  DZVP-MOLOPT-GTH
      POTENTIAL  GTH-BLYP-q7
      &BS
        &ALPHA
          NEL 2
          L   1
          N   3
        &END
        &BETA
          NEL 2
          L   1
          N   3
        &END
      &END
    &END
    &KIND  Cl1
      ELEMENT Cl
      BASIS_SET  DZVP-MOLOPT-GTH
      POTENTIAL  GTH-BLYP-q7
      &BS
        &ALPHA
          NEL 2
          L   1
          N   3
        &END
        &BETA
          NEL 0
          L   1
          N   3
        &END
      &END
    &END

As suggested by Marcella,
for 'Cl' in the input file, Alpha is (5+2)/2=3.5, and same for Beta, in the end 'Cl' should have 3s-2 3p-7
for 'Cl1' in the input file, Alpha is (5+2)/2=3.5, and (5+0)/2 =2.5 for Beta, in the end 'Cl1' should have 3s-2 3p-6
 
Could anyone tell me if I understand correctly or not ?

Thanks,
Tao

S Ling

unread,
Feb 10, 2016, 5:53:26 AM2/10/16
to cp...@googlegroups.com
You cannot have half an electron on a p orbital?

In your case of Cl1, you have one extra electron in the alpha spin channel, and by doing that, you break the symmetry of alpha and beta spin channels, i.e. you MAY end up with different occupations in the alpha and beta spin channels after the calculation. Of course, this also depends on your specific system, that a symmetry-broken solution is energetically more stable.

SL


--
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...@googlegroups.com.

To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/d/optout.

katarína stančiaková

unread,
Nov 8, 2018, 5:12:59 AM11/8/18
to cp2k
Dear all,
I am trying to set up calculation for my Cu+ system, however, even after reading this thread I cannot understand how the electrons are assigned to channels in CP2K. I wanna test two possible spin states (just for testing purposes) of Cu+:

Cu+ with electron configuration 3d9 4s1 (Cu1) and 3d10 4s0 (Cu2). I tried to build my input sections:

&KIND  Cu1
      ELEMENT Cu
      BASIS_SET  DZVP-MOLOPT-GTH
      POTENTIAL  GTH-BLYP-q11
      &BS
        &ALPHA
           &ALPHA
          NEL 0   0

          L    0   2
          N    4   3
        &END
        &BETA
          NEL -1  -2
          L    0   2
          N    4   3
      &END
    &END

and

&KIND  Cu2
      ELEMENT Cu
      BASIS_SET  DZVP-MOLOPT-GTH
      POTENTIAL  GTH-BLYP-q11
      &BS
        &ALPHA

           &ALPHA
          NEL -1   0
          L    0   2
          N    4   3
        &END
        &BETA
          NEL -1  0

          L    0   2
          N    4   3
      &END
    &END

Is this correct?

Also,regarding previous example on Cl1 - what is the meaning of half-electrons in alpha/beta channel?

Thank you very much for the help
Katarina


Dňa streda, 10. februára 2016 11:53:26 UTC+1 S Ling napísal(-a):

Krack Matthias (PSI)

unread,
Nov 8, 2018, 5:49:26 AM11/8/18
to cp2k

Dear Katarina

 

You may try for Cu1 alpha

 

NEL 1   0

L   0   2

N   4   3

 

instead of

 

NEL 0   0

L   0   2

N   4   3

 

Hope that works.

 

Matthias

katarína stančiaková

unread,
Nov 8, 2018, 8:36:15 AM11/8/18
to cp2k
Dear Matthias,
thank you for the suggestion. Could you, please, explain why NEL in alpha channel is 1?
Is it becasue neutral Cu has 4s1, so we add one electron and then divide by 2? What if the result would be even number?

Thanks!
Dňa štvrtok, 8. novembra 2018 11:49:26 UTC+1 Matthias Krack napísal(-a):

Krack Matthias (PSI)

unread,
Nov 8, 2018, 10:37:18 AM11/8/18
to cp2k

Dear Katarina

 

you have indeed to approach each spin channel in the BS section from a “closed shell” point of view. The slides 22 and 23 from the last CP2K tutorial in Paderborn show an example for a BS section for UO2. The BS section is not perfectly intuitive.

 

HTH

jiaj...@gmail.com

unread,
Mar 21, 2019, 3:07:16 AM3/21/19
to cp2k
Hi Matthias

TIM截图20190320230817.png     



I am having some trouble when using the BS section: non-compatible end of section BETA , File: 'Ni_surface.inp', Line: 128, Column: 1, Chunk: <BEAT> . I don't know how to solve it.

In example of UO2 (https://pc2.uni-paderborn.de/teaching/trainings/cp2k-tutorial/), there are two U of spin up and two U of spin down in UO2 cell, but we only use KIND Ua and KIND Ub to distinguish spin-up and spin-down U atoms. My question is how to let CP2K know which two U belong to KIND Ua, which two U belong to KIND Ub?

Thinks!




在 2018年11月8日星期四 UTC+8下午11:37:18,Matthias Krack写道:
Ni_surface.inp

Martin Brehm

unread,
Mar 21, 2019, 2:19:15 PM3/21/19
to cp2k
Hi,

as the error message already suggested, you just have a typo in your input file:

"&END BEAT"

:-)

Best regards,
Martin

Reply all
Reply to author
Forward
0 new messages