[CP2K-user] Kohn Sham Hamiltonian

fa...@gmail.com fabia... at gmail.com
Thu Dec 3 14:43:40 UTC 2020


Dear Elaheh,

Printing these matrices for k-points is only available from version 8.0. 
Unfortunately previous versions silently ignore the keyword in the case of 
k-point simulations. 

But be aware that to compute the band structure you will need the overlap 
matrix as well, not only the Hamiltonian.

Cheers,
Fabian

On Thursday, 3 December 2020 at 15:01:49 UTC+1 akho... at gmail.com wrote:

> Dear Fabian,
>
> thank you for your explanation. I tried to get KS matrix using the method 
> you suggested as well, but I wasn't able to do that. I used the following 
> input, but KS matrix files don't get printed. Is there any obvious mishabs 
> in the file? 
>
> I am using cp2k 7.1 and cp2k.popt.
>
> &GLOBAL
>
>    PROJECT WS2
>
>    RUN_TYPE ENERGY
>
>    PRINT_LEVEL HIGH
>
> &END GLOBAL
>
>  
>
> &FORCE_EVAL
>
>    METHOD Quickstep
>
>    &DFT
>
>       BASIS_SET_FILE_NAME  BASIS_MOLOPT
>
>       POTENTIAL_FILE_NAME  POTENTIAL
>
>  
>
>       &POISSON
>
>          PERIODIC XYZ
>
>       &END POISSON
>
>       &QS
>
>          EXTRAPOLATION USE_GUESS ! required for K-Point sampling
>
>       &END QS
>
>       &SCF
>
>          SCF_GUESS ATOMIC
>
>          EPS_SCF 1.0E-6
>
>          MAX_SCF 10
>
>  
>
>          ADDED_MOS 2
>
>          &DIAGONALIZATION
>
>             ALGORITHM STANDARD
>
>             EPS_ADAPT 0.01
>
>          &END DIAGONALIZATION
>
>          &SMEAR  ON
>
>             METHOD FERMI_DIRAC
>
>             ELECTRONIC_TEMPERATURE [K] 300
>
>          &END SMEAR
>
>  
>
>          &MIXING
>
>             METHOD BROYDEN_MIXING
>
>             ALPHA 0.2
>
>             BETA 1.5
>
>             NBROYDEN 8
>
>          &END MIXING
>
>  
>
>       &END SCF
>
>       &XC
>
>          &XC_FUNCTIONAL PBE
>
>          &END XC_FUNCTIONAL
>
>       &END XC
>
>       &KPOINTS
>
>          SCHEME MONKHORST-PACK 6 6 1
>
>          SYMMETRY OFF
>
>          WAVEFUNCTIONS REAL
>
>          FULL_GRID .TRUE.
>
>          PARALLEL_GROUP_SIZE  0
>
>              VERBOSE .TRUE.
>
>       &END KPOINTS
>
>       &PRINT
>
>          &BAND_STRUCTURE
>
>             ADDED_MOS 2
>
>             FILE_NAME WS2.bs
>
>             &KPOINT_SET
>
>                UNITS B_VECTOR
>
>                SPECIAL_POINT 0 0 0   #GAMA
>
>                SPECIAL_POINT 0.5 0 0   #M
>
>                NPOINTS 20
>
>             &END
>
>          &END BAND_STRUCTURE
>
>              &KS_CSR_WRITE HIGH
>
>                 FILENAME ./KS.dat
>
>              &END KS_CSR_WRITE
>
>       &END PRINT
>
>    &END DFT
>
>  
>
>    &SUBSYS
>
>       &CELL
>
>          A [angstrom] 2.727930196922421  -1.574726113675518                   
> 0
>
>          B [angstrom] 2.727923196921916   1.574726113675518                   
> 0
>
>          C [angstrom] 0                   0                                  
> 15
>
>          PERIODIC XY
>
>          MULTIPLE_UNIT_CELL 1 1 1
>
>       &END CELL
>
>       &TOPOLOGY
>
>          MULTIPLE_UNIT_CELL 1 1 1
>
>       &END TOPOLOGY
>
>       &COORD
>
>              S  1.818565911277700                  0   0 
>
>              W                 0                   0   1.5693444632870293 
>
>              S 1.818565911277700                   0   3.138691180574223 
>
>       &END
>
>       &KIND W
>
>          ELEMENT W
>
>          BASIS_SET SZV-MOLOPT-SR-GTH
>
>          POTENTIAL GTH-PBE
>
>       &END KIND
>
>       &KIND S
>
>          ELEMENT S
>
>          BASIS_SET SZV-MOLOPT-SR-GTH
>
>          POTENTIAL GTH-PBE
>
>       &END KIND
>
>    &END SUBSYS
>
>  
>
> &END FORCE_EVAL
>
> Many thanks,
>
> Elaheh
>
>  
> On Thursday, December 3, 2020 at 1:57:18 PM UTC+1 fa... at gmail.com 
> wrote:
>
>> Dear Elaheh,
>>
>> I don't know how to print the indices easily. But you can use 
>> DFT%PRINT%KS_CSR_WRITE and DFT%PRINT%S_CSR_WRITE to write the Hamiltonain 
>> and overlap matrices to the disk. If you use k-points a file for each 
>> k-point is created in the ordering given in the output file.
>>
>> Cheers,
>> Fabian
>>
>> On Wednesday, 2 December 2020 at 12:07:10 UTC+1 akho... at gmail.com 
>> wrote:
>>
>>> Hello,
>>> I have extracted the Kohn Sham Hamiltonian using   &AO_MATRICES HIGH 
>>> ----> KOHN_SHAM_MATRIX .TRUE. , in order to plot the band structure myself 
>>> using the Hamiltonian matrix. However, the format of the output is not 
>>> clear to me. I believe each block of Hamiltonian corresponds to the 
>>> interaction of the primary cell with a specific neigboring cell. but it is 
>>> not specified in the output file which block is related to which 
>>> neighboring cell, i.e. what are the cell indices corresponding to each 
>>> block. Is there any way that I can access the cell indices related to each 
>>> Hamiltonian block?
>>> I would greatly appreciate your help.
>>> kind regards,
>>> Elaheh Akhoundi
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20201203/62775c32/attachment.htm>


More information about the CP2K-user mailing list