QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: njuxyh on April 30, 2018, 07:04

Title: how to specify the K point not along the high symmetrical direction
Post by: njuxyh on April 30, 2018, 07:04
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

Title: Re: how to specify the K point not along the high symmetrical direction
Post by: Petr Khomyakov on April 30, 2018, 08:10
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.
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: njuxyh on April 30, 2018, 14:48
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
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: Petr Khomyakov on April 30, 2018, 21:14
Please enclose the actual python script to your post.
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: njuxyh on May 1, 2018, 04:38
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
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: Petr Khomyakov on May 1, 2018, 17:40
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.
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: njuxyh on May 3, 2018, 03:17
thanks very much, it works now.

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

 
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: Martin_QW on May 3, 2018, 09:38
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.
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: njuxyh on May 3, 2018, 14:54
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.

Title: Re: how to specify the K point not along the high symmetrical direction
Post by: Martin_QW on May 3, 2018, 15:16
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.
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: njuxyh on May 3, 2018, 15:42
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.
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: Anders Blom on May 7, 2018, 21:00
I can strongly recommend Notepad++
Title: Re: how to specify the K point not along the high symmetrical direction
Post by: njuxyh on May 8, 2018, 13:42
thank you sir.

i will try it