“HTC Core” Module

The core module of running concurrency HTC

class panpython.sdk.htc.htc_core.Htc(batch_file, task_map, units, target_path, exe_path, json_config_type, time_limit_in_min=15.0, thread_num=1)[source]

Bases: object

  • batch_file (str) – full path of batch file

  • task_map (dict) – a dict of tasks

  • units (Union[list, dict]) – units of Pandat

  • target_path (str) – full path of output folder

  • exe_path (str) – full path of Pandat.exe

  • json_config_type (str) – calculation type from JSON configuration file

  • time_limit_in_min (float, default=15.0) – time limitation of a single Pandat.exe

  • thread_num (int, default=1) – number of concurrency threads


>>> from panpython.sdk.htc.htc_core import Htc
>>> from panpython.sdk.parser.htc_condition_parser import JsonParser
>>> parser: JsonParser = JsonParser('htc_condition.JSON')
>>> task_map: dict = parser.task_map
>>> htc_tasks = Htc(batch_file='example.pbfx',
...                 task_map=parser.task_map,
...                 units=parser.units,
...                 target_path='output/intermediate/',
...                 exe_path='pandat.exe',
...                 json_config_type='point',
...                 time_limit_in_min=10.0,
...                 thread_num=1)
>>> htc_tasks.run_htc()
property failed_task

a dictionary of failed task info


Return False if batch file does not exist or is empty.


True if batch file exists, False otherwise

Return type:


run_htc(htc_type: str = '', start_id: int = 0)[source]

Run a batch of Pandat calculations

  • htc_type (str) – type of htc calculation

  • start_id (int) – starting index of HTC calculation

set_optimization(parser: JsonParser)[source]

Set up optimization conditions for HTC


parser (object) – HTC parser