Skip to content

A problem reading the DIELECTRIC TENSOR  #1

@alonkukl

Description

@alonkukl

Hi

I came a cross a problem with vasp and the dielectric tensor, sometimes when the valuesof the tensor are very big the numbers in the OUTCAR are mixedup and so the python script doesn't read them correctly. For example see the following sinnpet

MACROSCOPIC STATIC DIELECTRIC TENSOR (including local field effects in DFT)
  ------------------------------------------------------
       13738.431079-16959.202530     2.426989
        -7663.060793 23943.531628    -3.049640
            2.471794    -5.009690  1175.736030
  ------------------------------------------------------

In vasprun.xml the data is printed correctly, so I suggest to try and read the OUTCAR, and if it doesn't succeed then read the data from the xml with the following commands:

from lxml import etree
doc = etree.parse('vasprun.xml')
values = [c.text for c in doc.xpath("/modeling/calculation/varray")[3].getchildren()]

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