QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started 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
-
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.
-
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
-
Please enclose the actual python script to your post.
-
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
-
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.
-
thanks very much, it works now.
although i have not make clear what is wrong with my original script.
-
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.
-
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.
-
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.
-
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.
-
I can strongly recommend Notepad++
-
thank you sir.
i will try it