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

Incorrect unit cell generated by parse_poscar_header() #5

Open
akashjn opened this issue Jun 7, 2018 · 2 comments
Open

Incorrect unit cell generated by parse_poscar_header() #5

akashjn opened this issue Jun 7, 2018 · 2 comments

Comments

@akashjn
Copy link

akashjn commented Jun 7, 2018

In vasp_raman.py script version [0.5.1], within parse_poscar_header() :

poscar_header += "%15.12f %15.12f %15.12f\n" % (b[0][0], b[0][1], b[0][2])
poscar_header += "%15.12f %15.12f %15.12f\n" % (b[1][0], b[1][1], b[1][2])
poscar_header += "%15.12f %15.12f %15.12f\n" % (b[2][0], b[2][1], b[2][2])

generates a wrong unit-cell for displaced POSCAR from the given POSCAR.phon. Actually above code writes the transpose of the unitcell matrix given in POSCAR.phon. To get correct unit-cell (same as in POSCAR.phon) use,
poscar_header += "%15.12f %15.12f %15.12f\n" % (b[0][0], b[1][0], b[2][0])
poscar_header += "%15.12f %15.12f %15.12f\n" % (b[0][1], b[1][1], b[2][1])
poscar_header += "%15.12f %15.12f %15.12f\n" % (b[0][2], b[1][2], b[2][2])

@raulf2012
Copy link

What is the implication of previously calculated spectra? This seems like it might be a big issue.

@akashjn
Copy link
Author

akashjn commented Jun 20, 2018

For a unit-cell whose all angles (alpha, beta and gamma) are not equal to 90 degrees, taking a transpose of the unit-cell matrix will change the relative position of the atoms in the displaced POSCAR, and depending on the angles, atoms might come too close or move farther from each other. So, the structure that we want to simulate will be lost (or distorted) and we will not get correct calculated RAMAN spectra.

However, if all angles (alpha, beta and gamma) are equal to 90 degrees, 'vasp_raman.py, version [0.5.1]' will work fine. Because, in the unit-cell matrix only diagonal elements will be non-zero and on taking a transpose of such a matrix, matrix remain unchanged. Therefore, the unit-cell in displaced POSCARs will be same as the POSCAR.phon and script will work fine.

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

2 participants