Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusion about transformation matrix #13

Open
chengyangXu opened this issue Sep 20, 2020 · 3 comments
Open

Confusion about transformation matrix #13

chengyangXu opened this issue Sep 20, 2020 · 3 comments

Comments

@chengyangXu
Copy link

Dear Qi,
Your code is quite helpful, yet I have a question about transfomation matrix in the unfold class. You have written B = np.dot(np.linalg.inv(M).T, b) , but I found b=np.dot(M,B) i.e. B = np.dot(np.linalg.inv(M), b) in Phys. Rev. B 85, 085201 (2012), which lead differences of K sampling in supercell brillioun zone between two cases. Could you tell me why you choose transformation matrix M.T?

Thank you sincerely,
Xu

@QijingZheng
Copy link
Owner

Please refer to the docstring of the unfold class.

        M is the transformation matrix between supercell and primitive cell: 
         
            M = np.dot(A, np.linalg.inv(a))     
         
        In real space, the basis vectors of Supercell (A) and those of the
        primitive cell (a) satisfy:
         
            A = np.dot(M, a);      a = np.dot(np.linalg.inv(M), A)
         
        Whereas in reciprocal space
         
            b = np.dot(M.T, B);    B = np.dot(np.linalg.inv(M).T, b)    

@chengyangXu
Copy link
Author

chengyangXu commented Oct 1, 2020

Thank you for your reply!

@Gargee-123
Copy link

Gargee-123 commented Nov 8, 2021

Dear Prof. Qijing Zheng,

I have calculated the transformation matrix definitions and it matches with your definition that you have mentioned. I have another question,
In those above definitions, A and a matrix is represented as column vectors . Is it correct ?

I mean to say, A = M.a
where,
A =
[Ax Bx Cx,
Ay By Cy,
Az Bz Cz]
and
a =
[ax bx cx,
ay by cy,
az bz cz]

Please let me know whether this is correct.

Best regards
Gargee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants