minushalf.io package

Submodules

minushalf.io.atomic_program module

Class for atomic program input parameters in minushalf.yaml

class minushalf.io.atomic_program.AtomicProgram(exchange_correlation_code: str = 'pb', calculation_code: str = 'ae', max_iterations: int = 100)

Bases: MinushalfYamlTags

Set parameters and their default values

to_dict()

Return dictionary with the class variables

to_list()

return list with the class variables

minushalf.io.correction module

Class for correction input parameters in minushalf.yaml

class minushalf.io.correction.Correction(correction_code: str = 'v', potfiles_folder: str = 'minushalf_potfiles', amplitude: float = 1.0, valence_cut_guess: Optional[list] = None, conduction_cut_guess: Optional[list] = None, tolerance: float = 0.01, fractional_valence_treshold: float = 10, fractional_conduction_treshold: float = 9, cbm_characters: Optional[list] = None, vbm_characters: Optional[list] = None, overwrite_vbm: Optional[list] = None, overwrite_cbm: Optional[list] = None, inplace: bool = False, divide_character: Optional[list] = None)

Bases: MinushalfYamlTags

Set parameters and their default values

property cbm_characters: list

Returns: Artificial character in cbm

property conduction_cut_guess: list

Returns: CUT guess for nelder mead algorithm

property correction_code: dict

Returns: Code for DFT -1/2 correction

property divide_character: list

Returns: Factor that divides the correction between atoms

property overwrite_cbm: dict

Returns: Tag to overwrite vbm character

property overwrite_vbm: dict

Returns: Tag to overwrite vbm character

to_dict()

Return dictionary with the class variables

to_list()

return list with the class variables

property valence_cut_guess: list

Returns: CUT guess for nelder mead algorithm

property vbm_characters: list

Returns: Artificial character in vbm

minushalf.io.input_file module

Leads with input file (INP.ae) read by atomic program.

class minushalf.io.input_file.InputFile(exchange_correlation_code: str, calculation_code: str, chemical_symbol: str, esoteric_line: str, number_valence_orbitals: int, number_core_orbitals: int, valence_orbitals: list, description: str = '', last_lines: Optional[list] = None)

Bases: object

Parses input file.

property calculation_code: str

Returns: Calculation code for inp file (ae)

property chemical_symbol: str

Returns: Chemical symbol of the element (H, He, Li…)

electron_occupation(electron_fraction: float, secondary_quantum_number: int) None

Corrects the input file of the atomic program, decreasing a fraction of the electron in a layer specified by the secondary quantum number

Args:

electron_fraction (float): Fraction of the electron that will be decreased in the INP file. Can vary between 0 and 0.5

secondary_quantum_number (int): Specifies the layer on which the occupation is to be made.

property exchange_correlation_code: str

Returns: Functional of exchange and correlation (ca, wi, hl, gl,bh, pb, rp, rv, bl

static from_file(filename: str = './INP') any

Parse INP.ae file.

Args:

filename: name of the INP file.

Returns:

input_file: instance of InputFile class.

static minimum_setup(chemical_symbol: str, exchange_correlation_code: str, maximum_iterations: int = 100, calculation_code: str = 'ae') any

Create INP file with minimum setup.

Args: chemical_symbol (str): Symbol of the chemical element (H, He, Li…).

exchange_correlation_code (str): functional of exchange and correlation ( ca, wi, hl, gl, bh, pb, rp , rv, bl)

maximum_iterations (int): Maximum number of iterations for atomic program. The default is 100

Returns:

input_file: instance of InputFile class.

to_file(filename: str = './INP') None
Write INP file
Args:

filename (str): name of the output file

to_stringlist() list
Returns:

List with the lines of the INP file.

minushalf.io.make_minushalf_results module

function make minushalf_results.dat

minushalf.io.make_minushalf_results.make_minushalf_results(gap: float, valence_cuts: Optional[dict] = None, conduction_cuts: Optional[dict] = None, name: str = 'minushalf_results.dat') None

Make output file for execute command, minushalf_results.dat.

Args:

gap (float): final gap in the correction method

valence_cuts (dict):dictionary inform the atom symbol, orbital

and cut for valence correction in the following format: {(symbol,orbital):cut}

conduction_cuts (dict):dictionary inform the atom symbol, orbital

and cut for condsuction correction in the following format. {(symbol,orbital):cut}

name (str): name of the file

minushalf.io.minushalf_yaml module

Parser for minushalf.yaml

class minushalf.io.minushalf_yaml.MinushalfYaml(software_configurations: MinushalfYamlTags, atomic_program: MinushalfYamlTags, correction: MinushalfYamlTags)

Bases: MinushalfYaml

Class that parses the input for the execute command

static from_file(filename: str = 'minushalf.yaml')

Receives a file and catch all the parameters presents in the documentation

get_amplitude() float

Returns the amplitude

get_atomic_program_params() dict

Get dictionary of atomic program parameters

get_calculation_code() str

Returns the calculation code

get_cbm_characters() list

Returns the parameter vbm_characters

get_command() list

Returns the command that runs first principles calculations

get_conduction_cut_initial_guess() str

Returns the conduction cut initial guess

get_correction_code() list

Returns the code used to identify the correction

get_correction_params() dict

Get dictionary of correction parameters

get_divide_character() list

Returns the divide characters

get_exchange_corr_code() str

Returns exchange correlation code

get_inplace() bool

Returns the inplace

get_max_iterations() int

Returns max iterations

get_overwrite_cbm() list

Returns the parameter that overwrites cbm

get_overwrite_vbm() list

Returns the parameter that overwrites vbm

get_potential_folder() str

Returns the potential folder name

get_software_configurations_params() dict

Get dictionary of software configurations parameters

get_software_name() str

Returns the name of the software that runs first principles calculations

get_tolerance() float

Returns the tolerance

get_valence_cut_initial_guess() str

Returns the valence cut initial guess

get_vbm_characters() list

Returns the parameter that cbm_characters

minushalf.io.software_configurations module

Class for atomic program software parameters in minushalf.yaml

class minushalf.io.software_configurations.SoftwareConfigurations(command: Optional[list] = None, software_name: str = 'VASP')

Bases: MinushalfYamlTags

Set parameters and their default values

property command: dict

Returns: Command to perform first-principles calculations

property software_name: str

Returns: Name of the software used for ab initio calculations (VASP,…)

to_dict()

Return dictionary with the class variables

to_list()

return list with the class variables

minushalf.io.vtotal module

Analyze VTOTAL

class minushalf.io.vtotal.Vtotal(radius: array, down_potential: array)

Bases: object

Output for ATOM that contains the pseudopotential generated by an atom

static from_file(filename: str = './VTOTAL.ae') any

Parse VTOTAL and extract the following informations

static read_down_potential(filename: str) array

Extracts the potentials related to the state of spin Down calculated for the main elements

Args:

filename (str): Name of the VTOTAL file

static read_radius(filename: str) array

Extracts from the file information regarding the rays for which the potential calculations will be made made.

Args:

filename (str): Name of the VTOTAL file

Module contents

Python files to handle input and outputs