effective_coulomb

py4vasp.calculation.effective_coulomb

(

  • data_context,
  • **kwargs

)

Effective Coulomb interaction U obtained with the constrained random phase approximation (cRPA).

This class provides post-processing routines to read and visualize first-principles results from constrained Random Phase Approximation (cRPA) calculations. After you have performed a cRPA calculation using VASP this class can visualize the effective Coulomb interaction U along the radial or frequency axis. Youy can use this U mean-field theories like DFT+U and Dynamical Mean Field Theory (DMFT).

The cRPA method is essential for strongly correlated materials, where standard Density Functional Theory (DFT) often incorrectly predicts a metallic ground state or fails to capture magnetic order. You can activate the cRPA calculation in VASP by setting ALGO = CRPAR in the INCAR file. The method computes the effective Coulomb interaction U in real space by excluding screening processes within a predefined correlated subspace, typically associated with localized orbitals such as d or f states.

While different flavors of cRPA exist, we recommend using the spectral cRPA (s-cRPA) method that you activate by setting LSCRPA = .TRUE.. in the INCAR file. This approach overcomes significant limitations of earlier cRPA formulations While different flavors of cRPA exist, we recommend using the spectral cRPA (s-cRPA) method that you activate by setting LSCRPA = .TRUE.. in the INCAR file. This approach overcomes significant limitations of earlier cRPA formulations1, in particular numerical instabilities for highly occupied correlated shells or unphysical results like negative U values.

References


  1. Kaltak, M., et al., Constrained Random Phase Approximation: the spectral method, Phys. Rev. B 112, 245102 (2025), https://doi.org/10.1103/m3gh-g6r6 ↩︎

ohno_potential

(

  • radius: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str],
  • delta: float

) → ndarray

Ohno potential for given radius/radii and delta.

This is used to interpolate the Coulomb potential to other radii.

Parameters

radius: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]
The radial distance(s) at which to evaluate the potential.
delta: float
The delta parameter for the Ohno potential.

Returns

ndarray
The Ohno potential evaluated at the given radius/radii.

path

Returns the path from which the output is obtained.

plot

(*args, **kwargs)

Almost same as the to_graph() function.

All arguments will be passed to to_graph. If the to_graph() would produce multiple graphs this method will merge them into a single one.

print

()
Print a string representation of this instance.

read

(*args, **kwargs)
Convenient wrapper around to_dict. Check that function for examples and optional arguments.

selections

() → dict[str, list[str]]

Return a dictionary describing what kind of data are available.

Returns

dict[str, list[str]]
Dictionary containing available selection options with their possible values. Keys include the selection criteria “spin”, “screening”, and “potential”.

to_csv

(

  • *args,
  • filename: str | Path = None,
  • **kwargs

)

Writes the data to a csv file.

Writes out a csv file for data stored in a dataframe generated with the to_frame() method. Useful for creating external plots for further analysis.

If no filename is provided a default filename is deduced from the name of the class.

Note that the filename must be a keyword argument, i.e., you explicitly need to write filename=”name_of_file” because the arguments are passed on to the to_graph() method. Please check the documentation of that method to learn which arguments are allowed.

Parameters

filename: str | Path = None
Name of the csv file which the data is exported to.

to_dict

() → dict[str, ndarray]

Convert the effective Coulomb object to a dictionary representation.

The integrals are evaluated over 4 Wannier functions. For the bare Coulomb interaction, these integrals can be computed with either a high ENCUT or low cutoff ENCUTGW that you set in the INCAR file. The screened Coulomb interaction is evaluated with the dielectric function and will have smaller values than the bare Coulomb potential. If you set TWO_CENTER = .TRUE. in the INCAR file, the Coulomb interactions are evaluated also at neighboring cells.

Returns

dict[str, ndarray]
A dictionary containing the effective Coulomb interaction data. In particular, it includes the bare Coulomb interaction with high and low cutoffs, the screened Coulomb interaction, and optionally the frequencies and positions at which the interactions are evaluated.

to_frame

(*args, **kwargs) → Dataframe

Convert data to pandas dataframe.

This will first convert use the to_graph() method to convert to a Graph. All arguments are passed to that method. The resulting graph is then converted to a dataframe.

Returns

Dataframe
Pandas dataframe corresponding to data in the graph

to_graph

(

  • selection: str = ‘U J V’,
  • omega: None | EllipsisType | ndarray = None,
  • radius: None | EllipsisType | ndarray = None,
  • radius_max: None | float = None,
  • config: AAAConfig = interpolate.AAAConfig()

) → Graph

Generate a graph representation of the effective Coulomb interaction.

The method automatically determines the plot type based on which parameters are provided:

  • If only omega is given: creates a frequency-dependent plot

  • If only radius/radius_max is given: creates a radial-dependent plot

  • If both omega and radius/radius_max are given: creates a frequency plot for all radii

Parameters

selection: str = ‘U J V’
Specifies which data to plot. Default is “U”, “V”, and “J”. You can also select “u” or “v”. For collinear calculations, you select a specific spin coupling with “upup” or “updown”. Different choices can be combined, e.g., “U(upup)” or “J(updown)”. You may prefix the selection with “bare” or “screened” to select the bare or screened potential, e.g., “bare(U)”. If no prefix is given, it is deduced from the selection, e.g., “U” is interpreted as “screened(U)”.
omega: None | EllipsisType | ndarray = None
Frequency values for frequency-dependent plots. If not set, or set to ellipsis (…), the frequency points along the imaginary axis are used. You can also provide specific frequencies on the real axis, then the data will be analytically continued and plotted for the selected frequencies.
radius: None | EllipsisType | ndarray = None
Radial distance values for radial-dependent plots. If not set, the plot will be for r=0. If set to ellipsis (…), the radial points used in VASP are used. You can also provide specific radii, then the data will be interpolated to the selected radii.
radius_max: None | float = None
Maximum radius for radial-dependent plots. If set, all data for radii greater than this value will be ignored.
config: AAAConfig = interpolate.AAAConfig()
Configuration for the analytic continuation of the frequency-dependent data. Use this if you need to adjust the parameters of the analytic continuation.

Returns

Graph
A graph object containing the visualization of the effective Coulomb interaction data.

to_image

(

  • *args,
  • filename = None,
  • **kwargs

)

Read the data and generate an image writing to the given filename.

The filetype is automatically deduced from the filename; possible are common raster (png, jpg) and vector (svg, pdf) formats. If no filename is provided a default filename is deduced from the name of the class and the picture has png format.

Note that the filename must be a keyword argument, i.e., you explicitly need to write filename=”name_of_file” because the arguments are passed on to the to_graph() method. Please check the documentation of that method to learn which arguments are allowed.

to_plotly

(*args, **kwargs)

Produces a graph and convertes it to a plotly figure.

The arguments to this function are passed on to the to_graph() method. Takes the resulting graph and converts it to a plotly figure.