How to perform Delta SCF calculations using ABINIT?  [SOLVED]

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
bp432
Posts: 6
Joined: Wed Oct 07, 2020 6:59 pm

How to perform Delta SCF calculations using ABINIT?  [SOLVED]

Post by bp432 » Wed Oct 07, 2020 7:08 pm

Dear colleagues,

I tried to use Delta SCF method to simulate photoexcitation. However, I got an error message:

--- !ERROR
src_file: m_dtset.F90
src_line: 1229
mpi_rank: 0
message: |
Action: check input file for occ,wtk, and charge.
Note that wtk is NOT automatically normalized when occopt=2,
but IS automatically normalized otherwise.

Or sometimes the message can be:

--- !ERROR
src_file: m_parser.F90
src_line: 611
mpi_rank: 0
message: |
It is observed in the input file: mytest.in line number 39,
that more than 264 columns are used.
This is not allowed. Change this line of your input file.

Could anyone please share an example of the input files for Delta SCF? In the ABINIT homepage there is no etra example on this. Thank you in advances!


Best regards,
Bo

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: How to perform Delta SCF calculations using ABINIT?

Post by ebousquet » Tue Oct 13, 2020 3:31 pm

Dear Bo,
By photoexcitation, do you mean what has been used by C. Paillard and co-workers, e.g.
- Phys. Rev. B 96, 045205, 2017 https://journals.aps.org/prb/abstract/1 ... .96.045205
- Phys. Rev. Lett. 123, 087601, 2019 https://journals.aps.org/prl/abstract/1 ... 123.087601
?
Best wishes,
Eric

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: How to perform Delta SCF calculations using ABINIT?

Post by ebousquet » Tue Oct 13, 2020 4:03 pm

Dear Bo,
could you also deliver the input file since it sounds a problem when reading it?
Best wishes,
Eric

bp432
Posts: 6
Joined: Wed Oct 07, 2020 6:59 pm

Re: How to perform Delta SCF calculations using ABINIT?

Post by bp432 » Wed Oct 14, 2020 11:12 am

Hi Eric,

Yes exactly. I actually tried this in VASP, but as Delta SCF is not properly defined in VASP. I think ABINIT is a better approach. Please find my input below! Thank you very much!


Best regards,
Bo


#ndtset 2

#Optimization of the lattice parameters
optcell 2
ionmov 2
ntime 200
dilatmx 1.05
ecutsm 0.5
pawmixdg 1
iscf 12

#Definition of the k-point grids
kptopt 1 # Option for the automatic generation of k points, taking
# into account the symmetry

nshiftk 1
shiftk 0 0 0
# 0.5 0.5 0.5 # These shifts will be the same for all grids
# 0.5 0.0 0.0
# 0.0 0.5 0.0
# 0.0 0.0 0.5

ngkpt 6 6 6
#ngkpt2 4 4 4
#ngkpt3 6 6 6 Not used !
#ngkpt4 8 8 8

getwfk -1 # This is to speed up the calculation, by restarting
# from previous wavefunctions, transferred from the old
# to the new k-points.

#Occupation
occopt 2
occu 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2

#Definition of the unit cell
acell 3*11.360030647 # This is equivalent to 10.18 10.18 10.18
#rprim 0.0 0.5 0.5 # FCC primitive vectors (to be scaled by acell)
# 0.5 0.0 0.5
# 0.5 0.5 0.0

#Definition of the atom types
ntypat 3 # There is only one type of atom
znucl 55 82 35 # The keyword "znucl" refers to the atomic number of the
# possible type(s) of atom. The pseudopotential(s)
# mentioned in the "files" file must correspond
# to the type(s) of atom. Here, the only type is Silicon.


#Definition of the atoms
natom 5 # There are two atoms
typat 1 2 3 3 3 # They both are of type 1, that is, Silicon.
xred # This keyword indicate that the location of the atoms
0.5 0.5 0.5 # will follow, one triplet of number for each atom
0.0 0.0 0.0 # Triplet giving the REDUCED coordinate of atom 1.
0.5 0.0 0.0
0.0 0.5 0.0
0.0 0.0 0.5 # Triplet giving the REDUCED coordinate of atom 2.

#Definition of the planewave basis set
ecut 10.0 # Maximal kinetic energy cut-off, in Hartree
pawecutdg 50

#Definition of the SCF procedure
nstep 100 # Maximal number of SCF cycles
toldfe 1.0d-6 # Will stop when, twice in a row, the difference
# between two consecutive evaluations of total energy
# differ by less than toldfe (in Hartree)
# This value is way too large for most realistic studies of materials
#diemac 12.0 # Although this is not mandatory, it is worth to
# precondition the SCF cycle. The model dielectric
# function used as the standard preconditioner
# is described in the "dielng" input variable section.
# Here, we follow the prescription for bulk silicon.


#%%<BEGIN TEST_INFO>
#%% [setup]
#%% executable = abinit
#%% [files]
#%% files_to_test =
#%% tbase3_4.out, tolnlines= 0, tolabs= 6.200e-07, tolrel= 1.100e-03, fld_options=-medium
#%% psp_files = 14si.pspnc
#%% [paral_info]
#%% max_nprocs = 4
#%% [extra_info]
#%% authors = Unknown
#%% keywords =
#%% description =
#%% Crystalline silicon : computation of the optimal lattice parameter
#%% Convergence with respect to the number of k points.
#%%<END TEST_INFO>

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: How to perform Delta SCF calculations using ABINIT?

Post by ebousquet » Wed Oct 14, 2020 3:17 pm

Dear Bo,
I think the 2nd error message tells you one of the problem:
It is observed in the input file: mytest.in line number 39,
that more than 264 columns are used.
This is not allowed. Change this line of your input file.
I think you need to split the lonnng occu line into several lines.
Best wishes,
Eric

bp432
Posts: 6
Joined: Wed Oct 07, 2020 6:59 pm

Re: How to perform Delta SCF calculations using ABINIT?

Post by bp432 » Fri Oct 16, 2020 4:00 pm

Dear Eric,

Thank you for this! I tried to replace the input as:

occu 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2

But now the error message is:

--- !ERROR
src_file: m_dtset.F90
src_line: 1229
mpi_rank: 0
message: |
Action: check input file for occ,wtk, and charge.
Note that wtk is NOT automatically normalized when occopt=2,
but IS automatically normalized otherwise.

...

I am really confused now. Thanks in advances for your kind help!


Best regards,
Bo

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: How to perform Delta SCF calculations using ABINIT?

Post by ebousquet » Tue Oct 20, 2020 3:28 pm

Dear Bo,
The combination of occopt=2 and weight of the k-points (wtk) that are not equal for all k-points gives non-neutral cell if you transfer electrons between two k-points that have different weight.
If you put an electron (in the conduction) in a k-point k2 that has a weight of, e.g. 1/4 while taking it from a k-point k1 (from the valence) that has a different weight of, lets say, 1/2, then you have to put an occupation of 1 in the conduction of k2 and remove 0.5e from the conduction of k1.
I think it is your problem.
Best wishes,
Eric

gonze
Posts: 412
Joined: Fri Aug 14, 2009 8:29 pm

Re: How to perform Delta SCF calculations using ABINIT?

Post by gonze » Sun Oct 25, 2020 7:06 am

Dear Bo, I think that there is a typo in your input file: "occu" should be replaced be "occ" .

dbennett1994
Posts: 7
Joined: Sat Mar 21, 2020 10:21 am

Re: How to perform Delta SCF calculations using ABINIT?

Post by dbennett1994 » Thu Oct 29, 2020 9:23 pm

Hi, is it possible to optimize the cell geometry using the Delta SCF method? Building on Bo's input, I tried to do a calculation using the images method. I have two images:

occ 22*2.0 0.0

occ_2img 21*2.0 0.0 2.0

And I want to do a set of calculations at points between the two images, i.e. (1-x)*img1 + x*img2 where x goes from 0 to 1:

mixesimgf1 1.0 0.0
mixesimgf2 0.9 0.1
mixesimgf3 0.8 0.2
mixesimgf4 0.7 0.3
mixesimgf5 0.6 0.4
mixesimgf6 0.5 0.5
mixesimgf7 0.4 0.6
mixesimgf8 0.3 0.7
mixesimgf9 0.2 0.8
mixesimgf10 0.1 0.9
mixesimgf11 0.0 1.0

and added other options related to the image method similarly to the file v8/Input/t20.in:

#Parameters for the image dynamics
imgmov 6
ntimimage 200
tolimg 1.0d-8
mixesimgf 1.0
imgwfstor 1

and commented out ntime. When I run with ionmov 2 and optcell 1, I get the error:

chkint_prt: ERROR -
Context: the value of the variable optcell is 1.
The value of the input variable ionmov is 2, while it must be
equal to 0
Action: you should change the input variables ionmov or optcell.

is it not possible to optimize the cell volume here?

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: How to perform Delta SCF calculations using ABINIT?

Post by ebousquet » Mon Nov 02, 2020 8:57 am

Dear dbenett1994,
You are not doing a simple relaxation of the cell, right?
It looks like that with imgmov only optcell=0? I'll ask the dev to see if he confirms...
Best wishes,
Eric

dbennett1994
Posts: 7
Joined: Sat Mar 21, 2020 10:21 am

Re: How to perform Delta SCF calculations using ABINIT?

Post by dbennett1994 » Fri Nov 20, 2020 11:32 am

Yes, I wanted to relax the unit cell with optcell 1 for each image. I found that it worked if I modified the occupation numbers manually. Is there much of a difference between doing that and using images?

Thanks,

Danny

Locked