[CP2K-user] [CP2K:18276] Re: Ways to find Special K-points for Band Structure

DMT dobromirak at gmail.com
Mon Jan 2 10:46:57 UTC 2023


I also found a python library which actually works - 
ASE. https://wiki.fysik.dtu.dk/ase/. It is easy to install. Unfortunately, 
the documentation is no where near complete, but with some reading of the 
source and examples on internet I was able to use it to determine the 
High-symmetry K-points. It works for any given system. No errors so far. 
Here is an example of how to use it:

run the python interpreter with:
python

then type:
from ase.io import read
atoms = read("opt_x771.pdb")
bandpath = atoms.cell.bandpath()
print(bandpath)
bandpath.special_points

it will give you both generated PATHs and the B_VECTOR coordinates of every 
Hygh-symmetry K-point.

Another way is to put it in a simply script. I also made a perl script to 
parse the results and organize them into directly usable cp2k input - the 
two files attached. For the perl script simply copy and paste (in " ") the 
python script results from STDOUT from:
print(bandpath)

and:
bandpath.special_points

directly into the perl sctipt. For example:

./kpoints.py input_geom.pdb

./parse_pykpts_paste.pl "BandPath(path='GMKGALHA,LM,KH', cell=[3x3], 
special_points={AGHKLM}, kpts=[12x3])
{'G': array([0., 0., 0.]), 'A': array([ 0. ,  0. , -0.5]), 'H': array([ 
0.33333333, -0.33333333, -0.5       ]), 'K': array([ 0.33333333, 
-0.33333333,  0.        ]), 'L': array([ 0.5,  0. , -0.5]), 'M': 
array([0.5, 0. , 0. ])}"

and it will give you the following result:

&KPOINT_SET ! GMKGALHA
 UNITS B_VECTOR
 SPECIAL_POINT G 0. 0. 0.
 SPECIAL_POINT M 0.5 0. 0.
 SPECIAL_POINT K 0.33333333 -0.33333333 0.
 SPECIAL_POINT G 0. 0. 0.
 SPECIAL_POINT A 0. 0. -0.5
 SPECIAL_POINT L 0.5 0. -0.5
 SPECIAL_POINT H 0.33333333 -0.33333333 -0.5
 SPECIAL_POINT A 0. 0. -0.5
 NPOINTS 20
&END KPOINT_SET
&KPOINT_SET ! LM
 UNITS B_VECTOR
 SPECIAL_POINT L 0.5 0. -0.5
 SPECIAL_POINT M 0.5 0. 0.
 NPOINTS 20
&END KPOINT_SET
&KPOINT_SET ! KH
 UNITS B_VECTOR
 SPECIAL_POINT K 0.33333333 -0.33333333 0.
 SPECIAL_POINT H 0.33333333 -0.33333333 -0.5
 NPOINTS 20
&END KPOINT_SET

Adjust NPOINTS as appropriate. K-point calculation in cp2k require a lot of 
RAM memory - the system may freeze. More reasonable value can be NPOINTS 10 
or even lower for larger systems.

Best Regards,
Dobromir


On Monday, January 2, 2023 at 12:35:23 PM UTC+2 DMT wrote:

> I found a software called vaspkit, it was available from github and it 
> does not require vasp to run. It requires only a POSCAR file with a defined 
> cell and atom coordinates (you can export to POSCAR with VMD). 
> Unfortunately, sometimes vaspkit works and sometimes it does not. There are 
> simply cases where it prints the files without the information inside of 
> them - no rotated geometry (cell definition + coordinates after the 
> High-symmetry K-points are found) and no K-points.
>
> Best Regards,
> Dobromir
>
> On Sunday, January 1, 2023 at 1:37:26 AM UTC+2 DMT wrote:
>
>> Hello,
>>
>> to my understanding automatically generated K-points cannot serve as well 
>> as the actual Special K-points for the Brillouine zone in reciprocal space.
>>
>> I tried using the tool SeeK-path (
>> https://www.materialscloud.org/work/tools/seekpath) but often it gives 
>> wrong geometry (moves atoms around through cell walls in the elementary 
>> cell) regardless of adjustments in the cell dimensions. Any adjustment from 
>> dimensions too small to dimensions too big for the geometry gives (various, 
>> but still) errors. And there is no way to use it with the original 
>> geometry, as the Special Kpoints coordinates it gives are to only be used 
>> with the new cell definition and coordinates it gives.
>>
>> Are there any other ways to find the actual Special points ?
>>
>> Best Regards,
>> Dobromir
>>
>

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/bb64e783-97ad-442b-a0c9-322764490be0n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20230102/ba62d82d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parse_pykpts_paste.pl
Type: application/x-perl
Size: 1395 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20230102/ba62d82d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kpoints.py
Type: application/x-chimera
Size: 186 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20230102/ba62d82d/attachment-0003.bin>


More information about the CP2K-user mailing list