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

Inner product between phonon eigenvectors of two structures #2

Open
lucydot opened this issue Nov 10, 2018 · 1 comment
Open

Inner product between phonon eigenvectors of two structures #2

lucydot opened this issue Nov 10, 2018 · 1 comment

Comments

@lucydot
Copy link

lucydot commented Nov 10, 2018

I'd like to use JuliaPhonons to do a similar analysis as found in part V of this paper. The inner product between the eigenvectors of a defect cell and a defect-free cell is calculated to give a distribution function which quantifies to what extent the defect phonon modes are bulk-like or defect-like.

I'm happy to write the code which will calculate and plot the distribution function, and can submit this as a PR, if you think it would be useful to have in JuliaPhonons?

@jarvist
Copy link
Owner

jarvist commented Nov 10, 2018

Yeah, defo - sounds cool!
I haven't read the paper.

A minimum working example of calculated overlaps between two sets of eigenvectors should be trivial:-

evecA,eigsA=read_meshyaml(open("meshA.yaml"),P)
evecB,eigsB=read_meshyaml(open("meshB.yaml"),P)

[ dot(evecA[a],evecB[b]) for a in 1:3N, b in 1:3N ] 

For the case of identical phonons (i.e. same mesh.yaml) you should get the identity matrix. Doing it in this 2D way catches the re-ordering of the eigenvectors (they come out ordered by the eigenvalues).

You might then want to think about collapsing down the info from 3Nx3N to just N, by taking the trace of the x,y,z components, or perhaps the L2 norm.

The scientific gotcha is that you have to do this with an identical basis. (For the phonons the basis is the atomic locations.) So it's fine if you're doing substitional defects, from the prior work here it appears Phonopy just sensibly constructs a basis in the order it is specified in the POSCAR.
If you are planning to do interstitions / vacancies, you need to do some work to make it the same (atomic) basis. Somewhere along the line you need to inject a dummy atom; in Gaussian (a vacuum electronic structure code) these are simply called 'ghost atoms'. I'm not sure whether there is an equivalent in VASP, there probably is. Or you could inject an extra fictitious FORCE-SET or similar.

Generally the Julia-Phonons code is pretty terrible! It was just hacked together on the fly as I understood the form of the eigenvectors returned from Phonopy; and then hacked some more to get some specific observables out for specific projects, but never really cleanly refactored! It may do stupid stuff like set global variables; it can read multiple mesh.yaml files, but I've never really computed on two things at once!

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

No branches or pull requests

2 participants