Skip to content

Incorrect unit cell generated by parse_poscar_header()  #5

@akashjn

Description

@akashjn

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])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions