electronic_minimization¶
- py4vasp.calculation.electronic_minimization¶
- class py4vasp.calculation._electronic_minimization.ElectronicMinimization(*args, **kwargs)¶
Access the convergence data for each electronic step.
The OSZICAR file written out by VASP stores information related to convergence. Please check the vasp-wiki (https://www.vasp.at/wiki/index.php/OSZICAR) for more details about the exact outputs generated for each combination of INCAR tags.
- plot(*args, **kwargs)¶
Wrapper around the
to_graph()
function.This will merge multiple graphs if you specify different sources with the selection arguments. All arguments are passed to the wrapped function.
- 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()¶
Returns possible alternatives for this particular quantity VASP can produce.
The returned dictionary contains a single item with the name of the quantity mapping to all possible selections. Each of these selection may be passed to other functions of this quantity to select which output of VASP is used.
- Returns:
The key indicates this quantity and the values possible choices for arguments to other functions of this quantity.
- Return type:
dict
- to_csv(*args, filename=None, **kwargs)¶
Converts 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()
function. Please check the documentation of that function to learn which arguments are allowed.- Parameters:
filename (str | Path) – Name of the csv file which the data is exported to.
- to_dict(selection=None)¶
Extract convergence data from the HDF5 file and make it available in a dict
- Parameters:
selection (str) – Choose from either iteration_number, free_energy, free_energy_change, bandstructure_energy_change, number_hamiltonian_evaluations, norm_residual, difference_charge_density to get specific columns of the OSZICAR file. In case no selection is provided, supply all columns.
- Returns:
Contains a dict from the HDF5 related to OSZICAR convergence data
- Return type:
dict
- to_frame(*args, **kwargs)¶
Wrapper around the
to_frame()
function.Generates dataframes from the graph object. For information about parameters that can be passed to this method, look at
to_graph()
.- Returns:
Pandas dataframe corresponding to data in the graph
- Return type:
Dataframe
- to_graph(selection='E')¶
Graph the change in parameter with iteration number.
- Parameters:
selection (str) – Choose strings consistent with the OSZICAR format
- Returns:
The Graph with the quantity plotted on y-axis and the iteration number of the x-axis.
- Return type:
Graph
- 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()
function. Please check the documentation of that function to learn which arguments are allowed.
- to_plotly(*args, **kwargs)¶
Convert the graph of this quantity to a plotly figure.
The arguments to this function are automatically passed on to the
to_graph()
function. Please check the documentation of that function to learn which arguments are allowed.