[CP2K-user] [CP2K:11446] LIST method in SMEAR section

Xiaoming Wang wxia... at gmail.com
Wed Oct 9 13:34:05 UTC 2019


Hi Viktoria,

I managed to fix the occupation using the MOM method. You can try that for 
your system. You may need first converge your orbitals (both occupied and 
virtual) in the ground state. Note that once you restart a MOM calculation, 
you need to change the occupation to the ground state, which can be done by 
the following fortran code.

PROGRAM changeocc
IMPLICIT NONE
INTEGER, PARAMETER :: restart_unit=17,ounit=18
INTEGER :: natom_read,nspin_read,nao_read,nset_max,nshell_max, &
nmo,homo,lfomo,nelectron,i,ispin
INTEGER, POINTER :: nso_info(:,:,:),nshell_info(:,:), &
nset_info(:),offset_info(:,:,:)
REAL*8, POINTER :: vecbuffer_read(:,:),evals(:),occups(:)
OPEN(UNIT=restart_unit,FILE="RESTART",FORM="UNFORMATTED")
OPEN(UNIT=ounit,FILE="RESTART.occ",FORM="UNFORMATTED")
READ (restart_unit) natom_read,nspin_read,nao_read,nset_max,nshell_max
WRITE(ounit) natom_read,nspin_read,nao_read,nset_max,nshell_max
ALLOCATE (nso_info(nshell_max,nset_max,natom_read))
ALLOCATE (nshell_info(nset_max,natom_read))
ALLOCATE (nset_info(natom_read))
ALLOCATE (offset_info(nshell_max,nset_max,natom_read))
READ (restart_unit) nset_info
READ (restart_unit) nshell_info
READ (restart_unit) nso_info
WRITE (ounit) nset_info
WRITE (ounit) nshell_info
WRITE (ounit) nso_info
DEALLOCATE(nso_info,nshell_info,nset_info,offset_info)
ALLOCATE(vecbuffer_read(1,nao_read))
DO ispin=1,nspin_read
READ (restart_unit) nmo,homo,lfomo,nelectron
WRITE(ounit) nmo,homo,lfomo,nelectron
ALLOCATE(evals(nmo),occups(nmo))
READ (restart_unit) evals,occups
IF (lfomo < homo) THEN
occups(homo)=0.0
occups(lfomo)=1.0
ENDIF
WRITE(ounit) evals,occups
DEALLOCATE(evals,occups)
DO i=1,nmo
READ(restart_unit) vecbuffer_read
WRITE(ounit) vecbuffer_read
ENDDO
ENDDO
DEALLOCATE(vecbuffer_read)
END
Best,
Xiaoming

On Wednesday, October 9, 2019 at 6:06:21 AM UTC-4, Victoria Morad wrote:
>
> Hi Xiaoming, 
>
> Could you please guide me more in details on how to do something like that 
> in cp2k? I am having a large system with 1309 orbitals and I need to 
> calculate a triplet geometry but the problem is that I need to fix 
> occupation at LUMO+38, not LUMO 0. In VASP it's quite straightforward, but 
> in cp2k I couldn't figure out how to do it. I'm using UKS for triplet state.
>
> Best,
> Viktoria
>
> середа, 20 березня 2019 р. 20:26:32 UTC+1 користувач Xiaoming Wang написав:
>>
>> Hi Matt,
>>
>> Yes, you are right. I figured out how to fix the occupations, but the 
>> convergence is indeed very difficult. Why is like that?
>> This kind of setup (I mean LIST in SMEAR section) is quite common in 
>> plane wave codes like VASP and Quantum Espresso.
>> However, the same setup for vasp can achieve convergence very easily. Can 
>> you give me any hints on that?
>>
>> Best,
>> Xiaoming
>>
>> On Wednesday, March 20, 2019 at 2:18:24 PM UTC-4, Matt W wrote:
>>>
>>> Good luck. But if you run SCF just fixing occupations makes convergence 
>>> very difficult...this was exactly what MOM was meant to do.
>>>
>>> Matt
>>>
>>> On Wednesday, March 20, 2019 at 3:20:25 PM UTC, Xiaoming Wang wrote:
>>>>
>>>> Hi Matt,
>>>>
>>>> Thanks for your information. I have tried MOM for several solid systems 
>>>> but never success either. 
>>>> I think the LIST in SMEAR section (if LSD is possible) should do all 
>>>> the work MOM does and should
>>>> also have no convergence issues.
>>>>
>>>> Best,
>>>> Xiaoming
>>>>
>>>> On Wednesday, March 20, 2019 at 10:47:22 AM UTC-4, Matt W wrote:
>>>>>
>>>>> This is more or less what the Maximum Overlap Method does ( MOM 
>>>>> <https://manual.cp2k.org/cp2k-6_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/SCF/MOM.html> 
>>>>> ). The code there might be worth a look.
>>>>>
>>>>> However, we have had very little success with it for solid state 
>>>>> systems (or anything more complex than a simple peptide).
>>>>>
>>>>> Matt
>>>>>
>>>>> On Wednesday, March 20, 2019 at 2:21:07 PM UTC, Xiaoming Wang wrote:
>>>>>>
>>>>>> Hi Matthias,
>>>>>>
>>>>>> Thanks for your confirmation.
>>>>>>
>>>>>> Best,
>>>>>> XIaoming
>>>>>>
>>>>>> On Wednesday, March 20, 2019 at 10:18:42 AM UTC-4, Matthias Krack 
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Xiaoming
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Technically, it should be possible like for RKS to impose fixed 
>>>>>>> occupation patterns both for alpha and beta spin orbitals in the case of 
>>>>>>> UKS.
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Matthias
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> *From:* c... at googlegroups.com <c... at googlegroups.com> *On Behalf 
>>>>>>> Of *Xiaoming Wang
>>>>>>> *Sent:* Mittwoch, 20. März 2019 14:45
>>>>>>> *To:* cp2k <c... at googlegroups.com>
>>>>>>> *Subject:* Re: [CP2K:11446] LIST method in SMEAR section
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Hi Matthias,
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Thanks for your reply. I'm dealing with condensed systems but with 
>>>>>>> very localized states. I'd like to use the fixed occupation to simulated 
>>>>>>> approximate excited states. Although the excited triplet state can be 
>>>>>>> obtained by using MULTIPLICITY 3, i cannot calculated the transition dipole 
>>>>>>> moment directly from the unoccupied beta to occupied alpha. ROKS is what I 
>>>>>>> need, but in ROKS the orbitals are not well defined. So I will need the 
>>>>>>> LIST method in SMEAR section. Could you please confirm that the LIST should 
>>>>>>> also work for LSD? In that case, I can modify the code and add a second 
>>>>>>> list for beta spin. I guess for that purpose in set_mo_occupation_2 the 
>>>>>>> aufbau part should be neglected, right?
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Xiaoming
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, March 20, 2019 at 6:29:03 AM UTC-4, Matthias Krack 
>>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Xiaoming
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> The method LIST for SMEAR is not working/implemented with LSD, since 
>>>>>>> only one LIST of occupations can be specified in the input. You can only 
>>>>>>> merge the lists from your LSD case using RKS, which results in
>>>>>>>
>>>>>>> LIST 2 2 2 1 1
>>>>>>>
>>>>>>> Though this smearing method might be useful for specific 
>>>>>>> applications like atomic calculations, I doubt that it is well suited for 
>>>>>>> applications in general.
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Matthias
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> *From:* c... at googlegroups.com <c... at googlegroups.com> *On Behalf 
>>>>>>> Of *Xiaoming Wang
>>>>>>> *Sent:* Dienstag, 19. März 2019 21:57
>>>>>>> *To:* cp2k <c... at googlegroups.com>
>>>>>>> *Subject:* [CP2K:11434] LIST method in SMEAR section
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Could anyone please tell me how to properly set the list for LSD 
>>>>>>> calculations? 
>>>>>>>
>>>>>>> For example, if I have 8 electrons, I want to push one electron up, 
>>>>>>> then for 
>>>>>>>
>>>>>>> spin-restricted calculations, the following works.
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> ADDED_MOS 1
>>>>>>>
>>>>>>> &SMEAR
>>>>>>>
>>>>>>>  SMEAR_METHOD LIST
>>>>>>>
>>>>>>>  LIST 2 2 2 0 2
>>>>>>>
>>>>>>> &END SMEAR
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> For LSD case, I changed the setup to :
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> LSD
>>>>>>>
>>>>>>> ADDED_MOS 1
>>>>>>>
>>>>>>> &SMEAR
>>>>>>>
>>>>>>>  SMEAR_METHOD LIST
>>>>>>>
>>>>>>>  LIST 1 1 1 0 1 1 1 1 1 0
>>>>>>>
>>>>>>> &END SMEAR
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> However, the above setup didn't work.
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Another question is how to handle thousands of  states with 
>>>>>>> occupations of 1?
>>>>>>>
>>>>>>> Since it is a very lengthy list, is there a handy way for that?
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Xiaoming
>>>>>>>
>>>>>>> -- 
>>>>>>> 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 cp... at googlegroups.com.
>>>>>>> To post to this group, send email to c... at googlegroups.com.
>>>>>>> Visit this group at https://groups.google.com/group/cp2k.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>> -- 
>>>>>>> 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 cp... at googlegroups.com.
>>>>>>> To post to this group, send email to c... at googlegroups.com.
>>>>>>> Visit this group at https://groups.google.com/group/cp2k.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20191009/c95231c6/attachment.htm>


More information about the CP2K-user mailing list