Author Topic: how to specify the K point not along the high symmetrical direction  (Read 4356 times)

0 Members and 1 Guest are viewing this topic.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
Hi
I am doing a band structure calculation, and I want to know one K point that  is not along the high symmetrical direction.
so I am wondering how to specify the Fraction position in BZ, because in the option where can not input K,M,G,V ..
I need your help

thank you very much


Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Take a look at this post: https://quantumwise.com/forum/index.php?topic=2096.msg9939#msg9939. You can define any k-point route(s) in the BZ through scripting.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
Thank you for your reply,
however, i copy the sentence to myown script
the errors occurs. so please do me a favor what is wrong with the syntax.




+------------------------------------------------------------------------------+
  File "./band .py", line 377
                "G"  : numpy.array((0.0, 0.0, 0.0)),
    ^
SyntaxError: invalid syntax


the paragraph is following:
def mysym():
        return {
            "G"  : numpy.array((0.0, 0.0, 0.0)),
            "K"  : numpy.array((2./3., 1./3., 0.0)),
            "Y"  : numpy.array((0.0, 0.5, 0.0)),
            "X"  : numpy.array((0.5, 0.0, 0.0)),
            "V"  : numpy.array((0.5, 0.5, 0.0)),
        }

bulk_configuration.bravaisLattice().symmetryPoints = mysym





bandstructure = Bandstructure(
    configuration=bulk_configuration,
    route=['G','X','K','G' 'V','Y','G'],
    points_per_segment=51,
    bands_above_fermi_level=30
    )
nlsave('band.hdf5', bandstructure)


thanks again

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Please enclose the actual python script to your post.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
Thank your for your reply.

enclose is my own  script adding the def function .

please help me, i am very sorry i am not familiar with python

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
I  think you have copied the script from the forum page together with some non-ASCII character. I enclose an example script that you can modify directly in some text editor, e.g., using the Editor built in the QuantunATK GUI.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
thanks very much, it works now.

although i have not make clear what is wrong with my original script.

 

Offline Martin_QW

  • Regular QuantumATK user
  • **
  • Posts: 10
  • Country: dk
  • Reputation: 1
    • View Profile
My guess is that the original script contains a mix between tabs and spaces, which is something python has problems with. Some editors can show the difference between tabs and spaces, which might be helpful.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
My guess is that the original script contains a mix between tabs and spaces, which is something python has problems with. Some editors can show the difference between tabs and spaces, which might be helpful.


thanks for your kindly suggesting, and would you let me know which editor can detect the different between blank and tabs?

thanks very  much.


Offline Martin_QW

  • Regular QuantumATK user
  • **
  • Posts: 10
  • Country: dk
  • Reputation: 1
    • View Profile
I was able to detect the issue with Sublime Text. It allows you to specify how spaces and tabs should be treated. I think most decent programming editors has such options, so if you prefer another editor, then you should be able to find some guides online.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
I was able to detect the issue with Sublime Text. It allows you to specify how spaces and tabs should be treated. I think most decent programming editors has such options, so if you prefer another editor, then you should be able to find some guides online.

thank you very much, i will try it .

just now, i checked ultraedit editor which i am using , it is pity it seems has no python support.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5423
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
I can strongly recommend Notepad++

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
thank you sir.

i will try it