Quantum Espresso¶
This module is used to call Quantum Espresso simulation and parse its output The user need to supply a complete input script with single-point scf calculation, CELL_PARAMETERS, ATOMIC_POSITIONS, nat, ATOMIC_SPECIES arguments. It is case sensitive. and the nat line should be the first argument of the line it appears. The user can also opt to the ASE interface instead.
This module will copy the input template to a new file with “_run” suffix, edit the atomic coordination in the ATOMIC_POSITIONS block and run the similation with the parallel set up given.
-
flare.dft_interface.qe_util.
dft_input_to_structure
(dft_input: str)¶ Parses a qe input and returns the atoms in the file as a Structure object
Parameters: dft_input – QE Input file to parse Returns: class Structure
-
flare.dft_interface.qe_util.
edit_dft_input_positions
(dft_input: str, structure)¶ Write the current configuration of the OTF structure to the qe input file
Parameters: - dft_input – dft input file name
- structure – atomic structure to compute
Returns: the name of the edited file
-
flare.dft_interface.qe_util.
parse_dft_forces
(outfile: str)¶ Get forces from a pwscf file in eV/A
Parameters: outfile – str, Path to pwscf output file Returns: list[nparray] , List of forces acting on atoms
-
flare.dft_interface.qe_util.
parse_dft_forces_and_energy
(outfile: str)¶ Get forces from a pwscf file in eV/A
Parameters: outfile – str, Path to pwscf output file Returns: list[nparray] , List of forces acting on atoms
-
flare.dft_interface.qe_util.
parse_dft_input
(dft_input: str)¶ parse the input to get information of atomic configuration
Parameters: dft_input – input file name Returns: positions, species, cell, masses
-
flare.dft_interface.qe_util.
run_dft_en_par
(dft_input, structure, dft_loc, n_cpus)¶ run DFT calculation with given input template and atomic configurations. This function is not used atm
if n_cpus == 1, it executes serial run.
Parameters: - dft_input – input template file name
- structure – atomic configuration
- dft_loc – relative/absolute executable of the DFT code
- n_cpus – # of CPU for mpi
- dft_out – output file name
- npool – not used
- mpi – not used
- **dft_wargs –
not used
Returns: forces, energy
-
flare.dft_interface.qe_util.
run_dft_par
(dft_input, structure, dft_loc, n_cpus=1, dft_out='pwscf.out', npool=None, mpi='mpi', **dft_kwargs)¶ run DFT calculation with given input template and atomic configurations. if n_cpus == 1, it executes serial run.
Parameters: - dft_input – input template file name
- structure – atomic configuration
- dft_loc – relative/absolute executable of the DFT code
- n_cpus – # of CPU for mpi
- dft_out – output file name
- npool – not used
- mpi – not used
- **dft_wargs –
not used
Returns: forces