aiida_vasp.common.dryrun#
Module to provide dryrun functionality.
Module Contents#
Classes#
A class representing the scheme of the jobs. |
Functions#
Return all factors of a number in descending order, including the number itself. |
|
Perform a dryrun for a VASP calculation, return obtained information. |
|
Perform a dryrun for the input and work out the best parallelisation strategy. |
|
Prepare inputs for VASP calculation. |
|
Dry run a relaxation workchain builder. |
|
Dry run a vaspu.vasp workchain builder. |
API#
- class aiida_vasp.common.dryrun.JobScheme(n_kpoints: int, n_procs: int, n_nodes: Optional[int] = None, cpus_per_node: Optional[int] = None, npw: Optional[int] = None, nbands: Optional[int] = None, ncore_within_node: bool = True, ncore_strategy: str = 'maximise', wf_size_limit: float = 1000)[source]#
A class representing the scheme of the jobs.
Initialization
Instantiate a JobScheme object.
- Parameters:
n_kpoints – Number of kpoints.
n_procs – Number of processes.
n_nodes – Number of nodes.
cpus_per_node – Number of CPUs per node.
npw – Number of plane waves.
nbands – Number of bands.
ncore_within_node – If True, limit plane-wave parallelisation to within each node.
ncore_strategy – Strategy for optimising NCORE, choose from ‘maximise’ and ‘balance’.
wf_size_limit – Limit of the ideal wavefunction size per process in MB.
- classmethod from_dryrun(dryrun_outcome: dict, n_procs: int, **kwargs) aiida_vasp.common.dryrun.JobScheme[source]#
Construct from dryrun results.
- Parameters:
dryrun_outcome – The outcome from a dryrun.
n_procs – Number of processes.
kwargs – Additional keyword arguments.
- Returns:
A JobScheme object
- aiida_vasp.common.dryrun.factors(num: int) list[int][source]#
Return all factors of a number in descending order, including the number itself.
- Parameters:
num – The number to factor.
- Returns:
A list of factors.
- aiida_vasp.common.dryrun.dryrun_vasp(input_dict: dict | aiida.engine.processes.builder.ProcessBuilder, vasp_exe: str = 'vasp_std', timeout: int = 10, work_dir: str | None = None, keep: bool = False) dict[source]#
Perform a dryrun for a VASP calculation, return obtained information.
- Parameters:
input_dict – The input dictionary/builder for VaspCalculation.
vasp_exe – The VASP executable to be used.
timeout – Timeout for the underlying VASP process in seconds.
work_dir – Working directory, if not supplied, will use a temporary directory.
keep – Whether to keep the dryrun output.
- Returns:
A dictionary of the dry run results parsed from OUTCAR.
- aiida_vasp.common.dryrun.get_jobscheme(input_dict: dict, nprocs: int, vasp_exe: str = 'vasp_std', **kwargs) aiida_vasp.common.dryrun.JobScheme[source]#
Perform a dryrun for the input and work out the best parallelisation strategy.
- Parameters:
input_dict – Inputs of the VaspCalculation.
nprocs – Target number of processes to be used.
vasp_exe – The executable of local VASP program to be used.
kwargs – Additional keyword arguments to be passed to JobScheme.
- Returns:
A JobScheme object.
- aiida_vasp.common.dryrun.prepare_inputs(inputs: dict) aiida_vasp.calcs.vasp.VaspCalculation[source]#
Prepare inputs for VASP calculation.
- Parameters:
inputs – The inputs to prepare.
- Returns:
The prepared inputs.