Usage
oncvpsp-tools implements the contents of oncvpsp.x input and output files as Python dataclasses. These are
documented below
- class ONCVPSPInput(atom, reference_configuration, lmax, optimization, local_potential, vkb_projectors, model_core_charge, log_derivative_analysis, output_grid, test_configurations)[source]
Class for the contents of an ONCVPSP input file.
The
ONCVPSPInputclass is a dataclass that helps a user interact with input files foroncvpsp.x.Typically, a user will create an
ONCVPSPInputobject from an input file using thefrom_file()method, as followsfrom oncvpsp_tools import ONCVPSPInput inp = ONCVPSPInput.from_file("path/to/input.in")
ONCVPSPInputobjects – being adataclass– have the same attributes as the input parameters (listed below). Use these to interact with the contents of the input file.- Parameters:
atom (
ONCVPSPAtom) – The atom block of the input filereference_configuration (
ONCVPSPList[ONCVPSPConfigurationSubshell]) – The reference configuration block of the input filelmax (int) – The lmax block of the input file
optimization (
ONCVPSPList[ONCVPSPOptimizationChannel]) – The optimization block of the input filelocal_potential (
ONCVPSPLocalPotential) – The local potential block of the input filevkb_projectors (
ONCVPSPList[ONCVPSPVKBProjector]) – The VKB projectors block of the input filemodel_core_charge (
ONCVPSPModelCoreCharge) – The model core charge block of the input filelog_derivative_analysis (
ONCVPSPLogDerivativeAnalysis) – The log derivative analysis block of the input fileoutput_grid (
ONCVPSPOutputGrid) – The output grid block of the input filetest_configurations (
ONCVPSPList[ONCVPSPList[ONCVPSPConfigurationSubshell]]) – The test configurations block of the input file
- classmethod from_file(filename)[source]
Create an
ONCVPSPInputobject from an ONCVPSP input file.
- classmethod from_str(txt)[source]
Create an
ONCVPSPInputobject from a string.
- class ONCVPSPOutput(content, input, semilocal_ion_pseudopotentials, local_pseudopotential, charge_densities, wavefunctions, arctan_log_derivatives, projectors, energy_error)[source]
Class for the contents of an
oncvpsp.xoutput file.The
ONCVPSPOutputclass is a dataclass that helps a user interact with output files fromoncvpsp.x. Typically, a user will not create aONCVPSPOutputobject directly, but rather use the class methodfrom_file()as follows:from oncvpsp_tools import ONCVPSPOutput output = ONCVPSPOutput.from_file("path/to/output")
ONCVPSPOutputobjects – being adataclass– have the same attributes as the input parameters (listed below). Use these to interact with the contents of the output file. For example, to plot the semilocal ion pseudopotentials:output.semilocal_ion_pseudopotentials.plot()
- Parameters:
content (str) – the entire content of the output file
input (
ONCVPSPInput) – the input file used to generate the outputsemilocal_ion_pseudopotentials (
ONCVPSPOutputDataList) – the semilocal ion pseudopotentialslocal_pseudopotential (
ONCVPSPOutputData) – the local pseudopotentialcharge_densities (
ONCVPSPOutputDataList) – the charge densitieswavefunctions (
ONCVPSPOutputDataList) – the pseudoatomic wavefunctionsarctan_log_derivatives (
ONCVPSPOutputDataList) – the arctan log derivativesprojectors (
ONCVPSPOutputDataList) – the projectorsenergy_error (
ONCVPSPOutputDataList) – the energy error
- classmethod from_str(content)[source]
Create an
ONCVPSPOutputobject from a string.
- classmethod from_file(filename)[source]
Create an
ONCVPSPOutputobject from an ONCVPSP output file.