[gpaw-users] FW: FW: GLLB-SC in LCAO mode
Korina Kuhar
Kokuha at fysik.dtu.dk
Wed Apr 13 13:16:47 CEST 2016
Hi!
When calling the get_eigenvalues function the values you get are without Dxc, so when plotting your band structure you should manually add Dxc to the unoccupied bands.
Best,
Korina.
Korina Kuhar
PhD student
DTU Physics
Technical University of Denmark
Department of Physics
Fysikvej
Building 307
2800 Kgs. Lyngby
Denmark
Direct +45 45253293
kokuha at fysik.dtu.dk
www.fysik.dtu.dk
________________________________________
From: gpaw-users-bounces at listserv.fysik.dtu.dk [gpaw-users-bounces at listserv.fysik.dtu.dk] on behalf of Xiaoming Wang via gpaw-users [gpaw-users at listserv.fysik.dtu.dk]
Sent: Wednesday, April 13, 2016 1:11 AM
To: gpaw-users at listserv.fysik.dtu.dk
Subject: [gpaw-users] FW: FW: GLLB-SC in LCAO mode
Hi,
Luckily, I see the examples of diamond in the test directory. For my case, I
try to calculate the band structure of WSe2 by GLLBSC. Following is my
script. However, the obtained band structure is the one without adding the
discontinuity potential. What's the problem? Does anyone have experiences
with bands calculation by GLLBSC functional?
----------------------------------------------------------------------------
-----
from gpaw import *
from ase import *
from ase.io import read
from ase.dft.kpoints import ibz_points, get_bandpath
import numpy as np
atoms = read('wse2.cif')
atoms.set_pbc([1,1,1])
calc = GPAW(mode='lcao',
nbands=18,
kpts={'size':(12,12,1),'gamma':True},
xc='GLLBSC',
h=0.18,
occupations=FermiDirac(width=0.01),
convergence={'density':1.0e-4},
maxiter=200,
txt='gs_scf.txt',
setups={'W':'6'},
basis='dzp',
verbose=0
)
atoms.set_calculator(calc)
atoms.get_potential_energy()
calc.write('wse2_gs.gpw')
homolumo = calc.occupations.get_homo_lumo(calc.wfs)
response = calc.hamiltonian.xc.xcs['RESPONSE']
response.calculate_delta_xc(homolumo=homolumo)
#EKs, Dxc = response.calculate_delta_xc_perturbation()
#Gap = EKs + Dxc
calc.write('wse2_gllbsc.gpw')
nbands=16
calc = GPAW('wse2_gllbsc.gpw',
nbands=18,
fixdensity=True,
symmetry='off',
txt='nscf_bands.txt',
convergence={'bands': nbands})
G = [0., 0., 0.]
K = [1/3., 1/3., 0.]
M = [0.5, 0., 0.]
kpts, x, X = get_bandpath([G, M, K, G], calc.atoms.cell, npoints=100)
calc.set(kpts=kpts)
calc.get_potential_energy()
ef = calc.get_fermi_level()
e_kn = np.array([calc.get_eigenvalues(k) for k in range(len(kpts))])
e_kn -= ef
f = open('bands.dat','w')
for n in range(nbands):
for k in range(len(kpts)):
print >> f, x[k], e_kn[k,n]
print >> f
-------------------------------------------------------------------------
Best,
Xiaoming
Postdoc
Rutgers U
-----Original Message-----
From: gpaw-users-bounces at listserv.fysik.dtu.dk
[mailto:gpaw-users-bounces at listserv.fysik.dtu.dk] On Behalf Of Xiaoming Wang
via gpaw-users
Sent: Tuesday, April 12, 2016 4:24 PM
To: gpaw-users at listserv.fysik.dtu.dk
Subject: Re: [gpaw-users] FW: GLLB-SC in LCAO mode
Hi,
The gpaw-1.0.0 works for GLLBSC in LCAO mode now, I used the wrong version.
So is it possible to get the band structure with GLLBSC, not only the band
gap?
Best,
Xiaoming
-----Original Message-----
From: gpaw-users-bounces at listserv.fysik.dtu.dk
[mailto:gpaw-users-bounces at listserv.fysik.dtu.dk] On Behalf Of Xiaoming Wang
via gpaw-users
Sent: Tuesday, April 12, 2016 4:10 PM
To: gpaw-users at listserv.fysik.dtu.dk
Subject: [gpaw-users] FW: GLLB-SC in LCAO mode
Hi,
With gpaw-1.0.0, I got the same error with LCAO mode. Is it fixed?
By the way, is it possible to get the band structure with GLLBSC, not only
the band gap?
Best,
Xiaoming Wang
Postdoc
Rutgers U
-----Original Message-----
From: gpaw-users-bounces at listserv.fysik.dtu.dk
[mailto:gpaw-users-bounces at listserv.fysik.dtu.dk] On Behalf Of Ask Hjorth
Larsen
Sent: Wednesday, September 2, 2015 12:18 PM
To: Christopher Patrick
Cc: gpaw-users at listserv.fysik.dtu.dk
Subject: Re: [gpaw-users] GLLB-SC in LCAO mode
Fixed in r13143.
Please verify it carefully, comparing to a similar real-space calculation.
Best regards
Ask
2015-09-02 17:12 GMT+02:00 Christopher Patrick <chripa at fysik.dtu.dk>:
> Dear all,
>
> I would be interested to know whether one can perform calculations
> with the GLLB-SC functional in LCAO mode.
>
> Based on the attached simple script and the latest GPAW version from
> the svn, it would seem that one cannot; the calculation fails when
> calculating the derivative discontinuity with the error,
>
> File "si.py", line 19, in <module>
> EKs, Dxc = response.calculate_delta_xc_perturbation()
> File
"/home/niflheim/chripa/gpaw_latest/gpaw/gpaw/xc/gllb/c_response.py", line
367, in calculate_delta_xc_perturbation
> gaps.append(self.calculate_delta_xc_perturbation_spin(s))
> File
"/home/niflheim/chripa/gpaw_latest/gpaw/gpaw/xc/gllb/c_response.py", line
328, in calculate_delta_xc_perturbation_spin
> self.wfs.add_orbital_density(nt_G, kpt, lumo_n)
> AttributeError: LCAOWaveFunctions instance has no attribute
'add_orbital_density'
>
> which I guess means that the LCAOWaveFunctions instance has no
> attribute 'add_orbital_density' :(
>
> Thanks for any help,
>
> Christopher Patrick
>
> Postdoc, DTU Physics
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
_______________________________________________
gpaw-users mailing list
gpaw-users at listserv.fysik.dtu.dk
https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
_______________________________________________
gpaw-users mailing list
gpaw-users at listserv.fysik.dtu.dk
https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
_______________________________________________
gpaw-users mailing list
gpaw-users at listserv.fysik.dtu.dk
https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
_______________________________________________
gpaw-users mailing list
gpaw-users at listserv.fysik.dtu.dk
https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
More information about the gpaw-users
mailing list