EPWpy.Abinit.EPWpy_Abinit#
Functions
|
Classes
|
High-level interface to the ABINIT simulation package. |
- class EPWpy.Abinit.EPWpy_Abinit.PyAbinit(QE, type_input=None, system='si', code='.', env='mpirun')[source]#
-
High-level interface to the ABINIT simulation package.
The PyAbinit class provides automated setup, input generation, and file transfer utilities for ABINIT calculations, with optional interoperability with Quantum ESPRESSO (QE) workflows.
It inherits from: - SetDir → manages directory creation and organization - SetAbinit → provides parameter defaults and methods to define ABINIT input files
The class can be initialized with a PyQE object to enable transfer of structural and pseudopotential data between QE and ABINIT runs.
- system#
Name of the material or system (used for directory naming).
- Type:
str
- code#
Path to the ABINIT executable or script directory (default: current directory).
- Type:
str
- home#
Current working directory when initialized.
- Type:
str
- env#
Parallel execution environment command (e.g., "mpirun", "srun").
- Type:
str
- verbosity#
Controls the verbosity of logging (default: 1).
- Type:
int
- abinit_params#
Dictionary storing input parameters for ABINIT.
- Type:
dict
- transfer_file#
List of files to be copied or linked to the ABINIT run directory.
- Type:
list
- run_serial#
If True, runs ABINIT calculations in serial mode.
- Type:
bool
- abi(input_abi=None, name='abi')[source]#
Prepare and write an ABINIT input file.
This method serves as the main interface for constructing ABINIT input files. It takes a dictionary of ABINIT keywords and parameters, initializes the working environment, and writes the formatted input file to disk.
- Parameters:
input_abi (dict, optional) --
Dictionary containing ABINIT input keywords and values. Each key should correspond to a valid ABINIT variable. Example:
{"ecut": 50, "ngkpt": [6,6,6], "nstep": 100}name (str, optional) -- Name of the ABINIT input file to write (default: "abi").
Notes
ABINIT supports multi-step workflows in a single input file, so care must be taken when defining input_abi to avoid conflicts between different calculation stages.
- The function internally calls:
set_work() → sets the current working directory.
set_abi() → updates ABINIT parameters.
WriteAbinitFiles() → handles file generation.
set_home() → restores the base working directory.
Example
>>> from epwpy import PyAbinit >>> ab = PyAbinit(qe, {"ecut": 40, "ngkpt": [6,6,6]}, system="si") >>> ab.abi({"ecut": 50, "nstep": 50}, name="scf") # Generates 'scf.in' for ABINIT