Parsl Tasks

parsl_tasks.gen_structures.cmd_gen_structures(config)

Construct the shell command used to run the generation script via Parsl.

Prepares the working environment and generates the command to execute the CGCNN cms_dir/gen_structure.py script. This task generates hypothetical structures based on the initial crystal structures.

Parameters:

config (dict) –

ConfigManager. The following fields are used: - work_dir - cms_dir - num_workers - elements

See ConfigManager for field descriptions.

Returns:

A formatted shell command string to execute gen_structure.py.

Return type:

str

Raises:

Exception – If directory navigation or file operations fail.

parsl_tasks.cgcnn.cmd_cgcnn_prediction(config)

Construct the shell command used to run a CGCNN prediction via Parsl.

Prepares the working environment and generates the command to execute the CGCNN cms_dir/predict.py script.

Parameters:

config (dict) –

ConfigManager. The following fields are used: - work_dir - cms_dir - batch_size - num_workers

See ConfigManager for full field descriptions.

Returns:

A formatted shell command string to execute predict.py.

Return type:

str

Raises:

Exception – If directory navigation or file copying fails.

parsl_tasks.select_structures.cmd_select_structures(config)

Construct the shell command used to run the structure selection script via Parsl.

Prepares the command to execute the cms_dir/select_structure.py script. This task is used to identify and remove duplicate or near-duplicate structures, based on a structural similarity threshold

Parameters:

config (dict) –

ConfigManager. The following fields are used: - work_dir - cms_dir - ef_thr - num_workers

See ConfigManager for field descriptions.

Returns:

A formatted shell command string to execute select_structure.py.

Return type:

str

Raises:

Exception – If directory navigation or path generation fails.

parsl_tasks.dft_optimization.cmd_fused_vasp_calc(config, id, walltime=<class 'int'>)

Run a two-stage VASP calculation via a Python Parsl task.

It start by running a relaxation phase trying to find the lowest-energy configuration. If relaxation was successful, it runs the energy calculaction

Parameters:
  • config (ConfigManager or dict) –

    Configuration object. The following fields are used: - vasp_ntasks_per_run - vasp_work_dir - work_dir - cms_dir - vasp_std_exe - vasp_timeout - vasp_nsw

    See ConfigManager for field descriptions.

  • id (int) – Identifier for the structure being processed. Used to name files and subdirectories.

  • walltime (int, optional) – Timeout in seconds for each VASP run.

Raises:
  • VaspNonReached – If the relaxation step fails to reach the convergence threshold.

  • Exception – For general file I/O or execution failures.

Side Effects:
  • Creates and modifies files in a per-structure working directory

  • Executes VASP via shell command (os.system)

  • Cleans intermediate VASP output files on completion or error

parsl_tasks.hull.cmd_vasp_hull(config, work_subdir)

Using the total energies, computes the formation energies of each structure relative to reference elemental phases.

Parameters:
  • config (dict) –

    ConfigManager instance. The following fields are used:

    • CK.VASP_NTASKS_PER_RUN (int): Number of MPI ranks. 1 triggers a run with a single process; any other value results in srun -n <N>.

    • CK.VASP_STD_EXE: Path to the VASP executable.

    See ConfigManager for field descriptions.

  • work_subdir (str) – Name of the working subdirectory where the hull calculation is run.

Returns:

A formatted shell command string to execute run_single_vasp_hull_calculation.py.

Return type:

str

Raises:

Exception – If directory navigation or file operations fail.

parsl_tasks.hull.cmd_calculate_ehul(config)

Select promising structures: Structures with low energy above the hull (Ehull) are identified as promising candidates. These are automatically copied to a dedicated folder for further analysis, such as evaluation of additional physical properties or preparation for experimental validation.

Parameters:

config (dict) –

ConfigManager. The following fields are used: - CK.ELEMENTS - CK.CMS_DIR - CK.VASP_WORK_DIR - CK.ENERGY_DAT_OUT - CK.POST_PROCESSING_OUT_DIR - CK.MP_STABLE_OUT

See ConfigManager for field descriptions.

Returns:

A formatted shell command string to execute select_final_structures_ternary.py or select_final_structures_quaternary.py

Return type:

str

Raises:
  • Exception – If directory navigation, file operations, or command

  • composition fail.

parsl_tasks.hull.cmd_convex_hull_color(config)

Generate updated phase diagrams by plotting the convex hull and highlighting the positions of all computed structures and compositions.

Parameters:

config (dict) –

ConfigManager. The following fields are used: - CK.ELEMENTS - CK.CMS_DIR - CK.POST_PROCESSING_OUT_DIR - CK.MP_STABLE_OUT - CK.POST_PROCESSING_FINAL_OUT

See ConfigManager for field descriptions.

Returns:

A formatted shell command string to execute plot_convex_hull_ternary.py or plot_convex_hull_quaternary.py.

Raises:

Exception – If directory navigation or file operations fail.