[ase-users] CaF2 Bandstructure Plot

Christoph Bernkopf christoph.bernkopf at cern.ch
Wed Aug 1 12:54:43 CEST 2018


Hi Ask,

I have an update for you. After updating ASE (3.16.2) and GPAW (1.4.0) I ran the CaF2 files again. I’m getting the following special points:

"G": [0, 0, 0],
"K": [0.375, 0.375, 0.75],
"L": [0.5, 0.5, 0.5],
"U": [0.625, 0.25, 0.625],
"W": [0.5, 0.25, 0.75],
"X": [0.5, 0, 0.5],

The bs plot looks worse than before but the line: special_points = kpoints.get_special_points(atoms.cell) works now. Do you know how I can fix the bandstructure plot?

Attached is the plot and the code.

Cheers,
Chris


[cid:214700d2-86c6-42bb-89da-56fc96ffb71f at cern.ch]



> On 26.07.2018, at 16:22, Ask Hjorth Larsen <asklarsen at gmail.com> wrote:
>
> 2018-07-26 16:17 GMT+02:00 Christoph Bernkopf <christoph.bernkopf at cern.ch>:
>> Hi Ask,
>>
>> Thank you for your help. I’m looking to what you find out!
>>
>> Just as a quick note: Using fcc produces an error as well: (AttributeError:
>> 'NoneType' object has no attribute ‘kd’)
>
> This probably works better with newer versions (both ASE and GPAW).
> Also remember atoms.get_potential_energy() before getting the band
> structure.
>
> Best regards
> Ask
>
>>
>> Cheers,
>> Chris
>>
>>
>> On 26.07.2018, at 14:29, Ask Hjorth Larsen <asklarsen at gmail.com> wrote:
>>
>> Hi,
>>
>> 2018-07-25 18:55 GMT+02:00 Christoph Bernkopf <christoph.bernkopf at cern.ch>:
>>
>> Hi Ask,
>>
>> Thank you for your reply!
>>
>> I looked up CaF2 on the materials project
>> (https://materialsproject.org/materials/mp-2741/#). I converted the cif file
>> provided by the materials project using the ase-gui (command: “ase-gui
>> CaF2.cif -o CaF2.py”). I ran the code using the converted cif file but I’m
>> still getting errors.
>>
>> When I’m omitting ‘cubic’ I get the following error:
>> special_points = kpoints.get_special_points(atoms.cell)
>> TypeError: get_special_points() takes at least 2 arguments (1 given)
>>
>> When I use 'cubic’ I get the following error:
>>   assert abc.ptp() < eps and abs(angles - pi / 2).max() < eps
>> AssertionError
>> Traceback (most recent call last):
>> File "bandstructure_caf2.py", line 58, in <module>
>>   special_points = kpoints.get_special_points('cubic', atoms.cell)
>>
>>
>> 'cubic' will only work on a cell which is literally cubic.  The
>> reduced cell is not, which is the problem here.
>>
>> The reduced cell is considered an 'fcc' type in ASE but obviously the
>> structure is not strictly fcc because only the Ca atoms fall on the
>> actual fcc sites.
>>
>> The question now is how to solve this, in the sense of getting an
>> appropriate BZ path.  Though one can always specify a path manually.
>>
>> I think the current determination of default BZ paths is probably
>> deficient in that it assumes that it's working with simple structures.
>> I will try to have a look at this.
>>
>> Best regards
>> Ask
>>
>>
>> My file is attached.
>>
>> Cheers,
>> Chris
>>
>>
>>
>>
>> On 24.07.2018, at 15:24, Ask Hjorth Larsen <asklarsen at gmail.com> wrote:
>>
>> Hi Christoph, (please reply to list)
>>
>> 2018-07-24 15:03 GMT+02:00 Christoph Bernkopf <christoph.bernkopf at cern.ch>:
>>
>> Hi Ask,
>>
>> Thank you for your quick answer! I tried out your suggestion:
>>
>> (CaF2 is a cubic crystal system, cF12)
>>
>> special_points = kpoints.get_special_points('cubic', atoms.cell)
>> print("\nSpecial Points: ", special_points)  # decide some nice points
>> bandpath = 'GWUXL'
>> kpts, xcoords, labels = kpoints.bandpath(bandpath, atoms.cell, 100)
>>
>> I get the following error in the first line:
>>  assert abc.ptp() < eps and abs(angles - pi / 2).max() < eps
>> AssertionError
>>
>> Do you know what I’m doing wrong? The whole file is attached.
>>
>>
>> Are you quite sure the structure is correct?  Try visualizing it and
>> repeating it e.g. in the GUI.
>>
>> It should not be necessary to specify that you want special points for
>> a cubic cell.  It should automatically figure out which cell it is.
>>
>> Best regards
>> Ask
>>
>>
>> Cheers,
>> Christoph
>>
>>
>>
>>
>> On 24.07.2018, at 14:14, Ask Hjorth Larsen <asklarsen at gmail.com> wrote:
>>
>> Hi,
>>
>> 2018-07-24 12:24 GMT+02:00 Christoph Bernkopf via ase-users
>> <ase-users at listserv.fysik.dtu.dk>:
>>
>>
>> Hi All,
>>
>> I’m currently using a CaF2 model to calculate the band structure (python
>> code attached). My output is attached also (caf2_bandstructure.png). It
>> looks wrong to me as the output usually has 4-5 entries on the X axis
>> (attached example: bandstructure_si.png). Also the labels are missing in my
>> graphic. Does anybody know what I’m doing wrong here?
>>
>>
>> You should specify a good path for the band structure.  Right now it
>> only has a Monkhorst-Pack sampling.
>>
>> import ase.dft.kpoints as kpoints
>> special_points = kpoints.get_special_points(atoms.cell)
>> print(special_points)  # decide some nice points
>> banpath = 'GWUXL'
>> kpts, xcoords, labels = kpoints.bandpath(path, atoms.cell, 100)
>>
>> calc.set(kpts=kpts, ...)
>>
>> Best regards
>> Ask
>>
>> Cheers and thanks for the help,
>> Chris
>>
>>
>>
>>
>> _______________________________________________
>> ase-users mailing list
>> ase-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180801/0b1253f3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: caf2_bandstructure.png
Type: image/png
Size: 19974 bytes
Desc: caf2_bandstructure.png
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180801/0b1253f3/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bandstructure_caf2.py
Type: text/x-python-script
Size: 2414 bytes
Desc: bandstructure_caf2.py
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180801/0b1253f3/attachment-0001.bin>


More information about the ase-users mailing list