abics.applications.latgas_abinitio_interface.base_solver module

class abics.applications.latgas_abinitio_interface.base_solver.SolverBase(path_to_solver)[source]

Bases: object

Base class defining the common interface of solvers.

path_to_solver

Path to solver program.

Type

str

input

Input manager.

Type

SolverBase.Input

output

Output manager.

Type

SolverBase.Output

Initialize the solver.

Parameters
  • solver_name (str) – Solver name.

  • path_to_solver (str) – Path to the solver.

class Input[source]

Bases: object

Input manager.

base_info

Common parameter.

Type

Any

pos_info

Information of position.

Type

Any

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]

from_directory(base_input_dir)[source]

Set information, base_input and pos_info, from files in the 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 structure.

Parameters

structure (pymatgen.Structure) – Atomic structure.

update_info_from_files(workdir, rerun)[source]

Update information by result files.

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

  • rerun (int) –

write_input(workdir)[source]

Generate input files of the solver program.

Parameters

workdir (str) – Path to working directory.

class Output[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 coodinates is measured in the units of Angstrom.

Return type

named_tuple(“energy”, “structure”)

__init__(path_to_solver)[source]

Initialize the solver.

Parameters
  • solver_name (str) – Solver name.

  • path_to_solver (str) – Path to the solver.

name()[source]
Returns

name – Name of solver.

Return type

str

solver_run_schemes()[source]
Returns

schemes – Implemented runner schemes.

Return type

tuple[str]