abics.applications.latgas_abinitio_interface.qe module

To deal with QuantumESPRESSO

class abics.applications.latgas_abinitio_interface.qe.QESolver(path_to_solver, *, parallel_level=None)[source]

Bases: abics.applications.latgas_abinitio_interface.base_solver.SolverBase

Solver class dealing with QuantumESPRESSO (with new XML format).

Initialize the solver.

Parameters
  • path_to_solver (str) – Path to the solver.

  • parallel_level (dict) – Parallelization levels

class Input(*, parallel_level=None)[source]

Bases: object

QE input files manager.

pwi

QE input.

Type

qe_tools.parsers.PwInputFile

datadir

Path to the data directory of QE.

Type

str

filetocheck

Name of the file to be used for check finished.

Type

str

parallel_level

Parallelization levels

Type

dict

check_finished(workdir)[source]

Check if the solver program has finished or not.

Parameters

workdir (str) – Path to the working directory.

cl_args(nprocs, nthreads, workdir)[source]

Generate command line arguments of the solver program.

Parameters
  • nprocs (int) – The number of processes.

  • nthreads (int) – The number of threads.

  • workdir (str) – Path to the working directory.

Returns

args – Arguments of command

Return type

list[str]

cleanup(workdir)[source]

Remove file for check finished.

Parameters

workdir (str) – Path to the working directory.

file_for_check_finished(workdir)[source]
from_directory(base_input_dir)[source]

Initialize information from files in base_input_dir.

Parameters

base_input_dir (str) – Path to the directory including base input files.

update_info_by_structure(structure)[source]

Update information by atomic structure.

Parameters

structure (pymatgen.Structure) – Atomic structure

update_info_from_files(output_dir, rerun)[source]

Do nothing.

write_input(output_dir)[source]

Generate input files of the solver program.

Parameters

output_dir (str) – Path to working directory.

class Output(prefix)[source]

Bases: object

Output manager.

get_results(workdir)[source]

Get energy and structure obtained by the solver program.

Parameters

workdir (str) – Path to the working directory.

Returns

phys – Total energy and atomic structure. The energy is measured in the units of eV and coordinates is measured in the units of Angstrom.

Return type

named_tuple(“energy”, “structure”)

__init__(path_to_solver, *, parallel_level=None)[source]

Initialize the solver.

Parameters
  • path_to_solver (str) – Path to the solver.

  • parallel_level (dict) – Parallelization levels

name()[source]
Returns

solver_name – Name of solver, “QuantumESPRESSO”.

Return type

str

solver_run_schemes()[source]
Returns

schemes – Implemented runner schemes.

Return type

tuple[str]