[PrtSolv]Some errors in a calculation with an electric field

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

Moderator: bguster

Locked
Serge
Posts: 25
Joined: Wed Apr 24, 2013 5:48 am

[PrtSolv]Some errors in a calculation with an electric field

Post by Serge » Wed Apr 24, 2013 1:16 pm

Hello Ladies and Gentlemen.
I’m trying to calculate the wave and probability density functions for pure semimetal Bismuth in an electric field.

At running Abinit with parameters defining the electric filed some errors appear, and I don’t know what to do. I was trying to change ones of the available parameters and adding some of new, necessary ones to it and obtaining the errors whatever. Below I have attached the input file data. The calculation is able to be running without the parameters defining the electric field. Please, give me the cue what to do?

Thanks!
With respect,
Serge.

The next error messages have been issued:
1. Initberry.F90:448:ERROR
In a finite electric field, nband must be equal to the number of valence bands.

2. Inarray.F90:192:ERROR
There is a problem with the input file : maybe a disagreement between the declared dimension of the array, and the number of data actually provided.
Action : correct your input file !


The input data:
# Definition of the unit cell
acell 3*4.746 angstrom
angdeg 3*57.23
chkprim 0

# Definition of the occupation number
occopt 1
tsmear 0.04

# SCF preconditioner
#iprcel 0

# Definition of the k-point grid
kptopt 2
nkpt 3
kpt 0 0 0
0.25 0.25 0.25
0.5 0.5 0.5
0.75 0.75 0.75
ngkpt 1 1 1
nshiftk 4
shiftk
0.0 0.0 0.0
0.25 0.25 0.25
0.5 0.5 0.5
0.75 0.75 0.75

# Definition of the atom types
ntypat 1
znucl 83

# Definition of the atoms
natom 9
typat 9*1
xangst
0 0 0
4.1663 -2.2730 0
4.1663 2.2730 0
8.3326 0 0
2.9263 0 3.7365
7.0926 -2.2730 3.7365
7.0926 2.2730 3.7365
11.2589 0 3.7365
5.6295 0 1.8682
# The relaxation
ionmov 0
tolmxf 5.0d-4
ntime 5

# Exchange-correlation functional
#ixc 9

# Definition of the planewave basis set
ecut 40
ecutsm 0.05

# Definition of the SCF procedure
nstep 1000
toldff 5.0d-5
iscf 7

# Definition of the spin-polarization
nsppol 2
npulayit 20

# Definition of the electric field
berryopt 4
efield 3*3
nband 45
nbdbuf 0

The pseudopotential file:

Code: Select all

Hartwigsen-Goedecker-Hutter psp for Bi,  from PRB58, 3641 (1998) 
   83   5  010605 zatom,zion,pspdat
 3 1   2 0 2001 0  pspcod,pspxc,lmax,lloc,mmax,r2well
  0.605000    6.679437    0.000000    0.000000   0.000000 rloc, c1, c2, c3, c4
  0.678858    1.377634   -0.513697   -0.471028          rs, h11s, h22s, h33s
  0.798673    0.655578   -0.402932    0.000000          rp, h11p, h22p, h33p
              0.305314   -0.023134    0.000000                          k11p, k22p, k33p
  0.934683    0.378476    0.000000    0.000000          rd, h11d, h22d, h33d
              0.029217    0.000000    0.000000                          k11d, k22d, k33d
  0.000000    0.000000    0.000000    0.000000          rf, h11f, h22f, h33f
              0.000000    0.000000    0.000000                          k11f, k22f, k33f
Last edited by Serge on Sat May 11, 2013 4:27 am, edited 6 times in total.

User avatar
sponce
Posts: 60
Joined: Sat Apr 16, 2011 9:44 am

Re: Some errors in a calculation with an electric field

Post by sponce » Wed Apr 24, 2013 3:39 pm

Hello Serge,

Try with this input file:
# Definition of the unit cell
acell 3*4.746 angstrom
angdeg 3*57.23
chkprim 0

# Definition of the occupation number
occopt 1
tsmear 0.04

# SCF preconditioner
#iprcel 0

# Definition of the k-point grid
kptopt 2
nkpt 1
#nkpt 3
kpt 0 0 0
#0.25 0.25 0.25
#0.5 0.5 0.5
#0.75 0.75 0.75
#ngkpt 1 1 1
nshiftk 1
#nshiftk 4
shiftk
0.0 0.0 0.0
#0.25 0.25 0.25
#0.5 0.5 0.5
#0.75 0.75 0.75

# Definition of the atom types
ntypat 1
znucl 83

# Definition of the atoms
natom 9
typat 9*1
xangst
0 0 0
4.1663 -2.2730 0
4.1663 2.2730 0
8.3326 0 0
2.9263 0 3.7365
7.0926 -2.2730 3.7365
7.0926 2.2730 3.7365
11.2589 0 3.7365
5.6295 0 1.8682
# The relaxation
ionmov 0
tolmxf 5.0d-4
ntime 5

# Exchange-correlation functional
#ixc 9

# Definition of the planewave basis set
ecut 40
ecutsm 0.05

# Definition of the SCF procedure
nstep 1000
toldff 5.0d-5
iscf 7

# Definition of the spin-polarization
nsppol 2
npulayit 20

# Definition of the electric field
berryopt 4
efield 3*3
#nband 45
nbdbuf 0

occopt 2
occ 23*1.0
22*1.0 0.0
nband *45


It work for me. I just made the calculation on 1kpt for easiness. You can very easily change this to 3 kpt. You just need to define more occ.

Cheers!

Samuel

Serge
Posts: 25
Joined: Wed Apr 24, 2013 5:48 am

Re: Some errors in a calculation with an electric field

Post by Serge » Thu Apr 25, 2013 12:11 pm

Thank you Samuel for your answer!

Runs I've done have entailed following errors:

1. getkgrid.F90:453:BUG
The argument nkpt= 1, does not match
the number of k points generated by kptopt, kptrlatt, shiftk,
and the eventual symmetries, that is, nkpt= 32.
However, note that it might be due to the user,
if nkpt is explicitely defined in the input file.
In this case, please check your input file.
Action : contact ABINIT group.


2. inarray.F90:192:ERROR
There is a problem with the input file : maybe
a disagreement between the declared dimension of the array,
and the number of data actually provided.
Action : correct your input file !


3. There also was an error treating to the parameter 'nband'.


I have tried to change some of those variables but the errors appear as usual.
Last edited by Serge on Tue Apr 30, 2013 5:46 am, edited 3 times in total.

Serge
Posts: 25
Joined: Wed Apr 24, 2013 5:48 am

Re: Some errors in a calculation with an electric field

Post by Serge » Fri Apr 26, 2013 12:45 pm

Samuel, please, say me what version of the program did you use? On running the input file by you corrected I right then obtained the bug that I had pointed above.

Ladies and Gentlemen, who maybe knows what needs to have been done in order to exclude the bug?

Thanks in advance!

User avatar
sponce
Posts: 60
Joined: Sat Apr 16, 2011 9:44 am

Re: Some errors in a calculation with an electric field

Post by sponce » Fri Apr 26, 2013 3:09 pm

Serge,

I'm using version 7.3.2 of Abinit. I had the same Warning as you but this goes away when using a proper k-grid.
I was able to pass those Warning with the following input file:

Code: Select all

# Definition of the unit cell
acell 3*4.746 angstrom
angdeg 3*57.23
chkprim 0

# Definition of the occupation number
#occopt 1
tsmear 0.04

# Definition of the k-point grid
kptopt 1
ngkpt 1 1 1
nshiftk 1
shiftk
0.0 0.0 0.0

# Definition of the atom types
ntypat 1
znucl 83

# Definition of the atoms
natom 9
typat 9*1
xangst
0 0 0
4.1663 -2.2730 0
4.1663 2.2730 0
8.3326 0 0
2.9263 0 3.7365
7.0926 -2.2730 3.7365
7.0926 2.2730 3.7365
11.2589 0 3.7365
5.6295 0 1.8682

# Exchange-correlation functional
#ixc 9

# Definition of the planewave basis set
ecut 20
ecutsm 0.05

# Definition of the SCF procedure
nstep 50
tolvrs 1.0d-5
iscf 7

# Definition of the spin-polarization
nsppol 2
#npulayit 20

# Definition of the electric field
berryopt 4
efield 3*1
#nband 45
nbdbuf 0

occopt 2
occ 23*1.0
    22*1.0
charge 43
nband 45*1


I'm not an expert on Berry phases, thus the calculations are crashing:
linemin : ERROR -
Cannot find theta_min. No minimum exists : the field is too strong !


I guess that by using physically meaningfull input parameter for the Berry phase (which is totally not the case for the moment), the code should run.

Cheers

Samuel

Serge
Posts: 25
Joined: Wed Apr 24, 2013 5:48 am

Re: Some errors in a calculation with an electric field

Post by Serge » Sat Apr 27, 2013 1:09 pm

It works, thanks a lot Samuel!

Here is presented the working composition of parameters:

Code: Select all

# Definition of the unit cell
acell 3*4.746 angstrom
angdeg 3*57.23
chkprim 0

# Definition of the occupation number
#occopt 1
tsmear 0.04

# Definition of the k-point grid
kptopt 1
ngkpt 1 1 1
nshiftk 1
shiftk
0.0 0.0 0.0

# Definition of the atom types
ntypat 1
znucl 83

# Definition of the atoms
natom 9
typat 9*1
xangst
0 0 0
4.1663 -2.2730 0
4.1663 2.2730 0
8.3326 0 0
2.9263 0 3.7365
7.0926 -2.2730 3.7365
7.0926 2.2730 3.7365
11.2589 0 3.7365
5.6295 0 1.8682

# Exchange-correlation functional
#ixc 9

# Definition of the planewave basis set
ecut 20
ecutsm 0.05

# Definition of the SCF procedure
nstep 50
tolvrs 1.0d-5
iscf 7

# Definition of the spin-polarization
nsppol 2
#npulayit 20

# Definition of the electric field
berryopt 4
efield 3*0.0001
#nband 45
nbdbuf 0

occopt 2
occ 23*1.0
    22*1.0
charge 43
nband 45*1
Last edited by Serge on Wed May 01, 2013 3:59 pm, edited 1 time in total.

User avatar
sponce
Posts: 60
Joined: Sat Apr 16, 2011 9:44 am

Re: Some errors in a calculation with an electric field

Post by sponce » Sun Apr 28, 2013 12:02 pm

Perfect!

Could you update your topic name to "[Solved] Some errors in a calculation with an electric field"

Maybe you can also post the input file with good physicall relevant berry phase paramter for other that may be interested?

Cheers !

Samuel

User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Re: Some errors in a calculation with an electric field

Post by jzwanzig » Sun Apr 28, 2013 1:27 pm

Hi, from the posted input files, I'm puzzled by a few things--

1) An efield of 1 is HUGE for a berrys phase calculation, I've never used more than 0.0004 and that's for a largish gap. Also, it is necessary with berry's phase first to do a zero field calcualtion, thus for example:
ndtset 2
berryopt1 -1
rfdir1 1 1 1

berryopt2 4
efield2 0.0001 0.0001 0.0001
getwfk2 1

2) Why are you using "charge 43"? That means that your system has 43 excess electrons. Is that really what you want?

3) Why are you using nsppol 2? Wouldn't spinors be a better choice here?
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Re: Some errors in a calculation with an electric field

Post by jzwanzig » Sun Apr 28, 2013 2:29 pm

Also, your structure for Bi seems odd, there are only two atoms in the primitive unit cell, here is the abinit input as generated by cif2cell:

#*******************************************************************************************
#* Generated by cif2cell 1.0.8 2013-04-28 9:25 *
#* Data obtained from ICSD. Reference number : 64703 *
#* Bi (Bismuth) *
#* Cucka, P. and Barrett, C.S., Acta Crystallographica (1,1948-23,1967) 15, 865-872 (1962) *
#*******************************************************************************************
# Structural parameters
acell 3*8.5906948506

rprim 0.577350269189626 0.000000000000000 0.869775626924769
-0.288675134594813 0.500000000000000 0.869775626924769
-0.288675134594813 -0.500000000000000 0.869775626924769

natom 2
ntypat 1
typat 1 1
znucl 83
xred 0.233890000000000 0.233890000000000 0.233890000000000
0.766110000000000 0.766110000000000 0.766110000000000


Using the berrys phase formalism you can't have empty bands so with 5 electrons in the valence space of the pseudopotentials you will have 5 bands, I would run this as
berryopt -1
rfdir 1 1 1
nband 5
occopt 1
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

Serge
Posts: 25
Joined: Wed Apr 24, 2013 5:48 am

Re: Some errors in a calculation with an electric field

Post by Serge » Mon Apr 29, 2013 12:38 pm

Samuel, good idea! I think I'll do that soon!

Prof. Zwanziger, thanks for having decided to discuss these problems!
I'll be once more thanking you if you'll have provided your entire input file you was talking about in order to look at for sake of the interest.
How much I understand, taking into account the spin-polarization allows doing calculation more precisely. Processing binary files with cut3d allows choosing a way you need (with spin-polarization or without as well) so I don't see any problems in using it here. If you see in it something strange, please, inform.

Samuel, Prof. Zwanziger, and Ladies and Gentlemen seeing this topic, I want to present you some questions appearing at modification some parameters:
1. How to set the shown below parameters at ‘ngkpt 3 3 3’ right that the modification have not created any errors in the following code earlier corrected by Samuel?

Parameters which may likely be changed, except ‘ngkpt 3 3 3’:

Code: Select all

# Definition of the k-point grid
kptopt 1
ngkpt 3 3 3
nshiftk 4
shiftk
0.0  0.0  0.0
0.25 0.25 0.25
0.5  0.5  0.5
0.75 0.75 0.75

# Definition of the electric field
berryopt 4
efield 3*0.0001
#nband 45
nbdbuf 0

occopt 2
occ 23*1.0
    22*1.0
charge 43
nband 45*1

All code:

Code: Select all

# Definition of the unit cell
acell 3*4.746 angstrom
angdeg 3*57.23
chkprim 0

# Definition of the occupation number
#occopt 1
tsmear 0.04

# Definition of the k-point grid
kptopt 1
ngkpt 3 3 3
nshiftk 4
shiftk
0.0  0.0  0.0
0.25 0.25 0.25
0.5  0.5  0.5
0.75 0.75 0.75

# Definition of the atom types
ntypat 1
znucl 83

# Definition of the atoms
natom 9
typat 9*1
xangst
0 0 0
4.1663 -2.2730 0
4.1663 2.2730 0
8.3326 0 0
2.9263 0 3.7365
7.0926 -2.2730 3.7365
7.0926 2.2730 3.7365
11.2589 0 3.7365
5.6295 0 1.8682

# Exchange-correlation functional
#ixc 9

# Definition of the planewave basis set
ecut 20
ecutsm 0.05

# Definition of the SCF procedure
nstep 50
tolvrs 1.0d-5
iscf 7

# Definition of the spin-polarization
nsppol 2
#npulayit 20

# Definition of the electric field
berryopt 4
efield 3*0.0001
#nband 45
nbdbuf 0

occopt 2
occ 23*1.0
    22*1.0
charge 43
nband 45*1

Pseudopotential file:

Code: Select all

Hartwigsen-Goedecker-Hutter psp for Bi,  from PRB58, 3641 (1998) 
   83   5  010605 zatom,zion,pspdat
 3 1   2 0 2001 0  pspcod,pspxc,lmax,lloc,mmax,r2well
  0.605000    6.679437    0.000000    0.000000   0.000000 rloc, c1, c2, c3, c4
  0.678858    1.377634   -0.513697   -0.471028          rs, h11s, h22s, h33s
  0.798673    0.655578   -0.402932    0.000000          rp, h11p, h22p, h33p
              0.305314   -0.023134    0.000000                          k11p, k22p, k33p
  0.934683    0.378476    0.000000    0.000000          rd, h11d, h22d, h33d
              0.029217    0.000000    0.000000                          k11d, k22d, k33d
  0.000000    0.000000    0.000000    0.000000          rf, h11f, h22f, h33f
              0.000000    0.000000    0.000000                          k11f, k22f, k33f


2. How to set the same parameters right, let 'ngkpt' be '1 1 1', when adding or taking away, for instance, one atom?
3. How has the code to be changed when changing the parameter 'charge 43' to any other value?
Thank you so much in advance!
Last edited by Serge on Wed May 01, 2013 3:43 pm, edited 2 times in total.

Serge
Posts: 25
Joined: Wed Apr 24, 2013 5:48 am

Re: Some errors in a calculation with an electric field

Post by Serge » Tue Apr 30, 2013 5:34 am

NB:
The following error flies out at 'ngkpt 3 3 3':
symkpt.F90:134:BUG
Did not find the identity operation
Action : contact ABINIT group.


In case of 'ngkpt 3 2 2' 'ngkpt 2 3 2', 'ngkpt 2 2 3':
ERROR - These must obey zval-nelect_occ=charge to better than 0.10E-07
This is not the case.

chkneu.F90:316:ERROR
Action : check input file for occ,wtk, and charge.
Note that wtk is NOT automatically normalized when occopt=2,
but IS automatically normalized otherwise.


It's alright at 'ngkpt 2 2 2'.

Locked