“System” Module

A Portal to load/run tasks of PanPython.

class panpython.system.System(dump_path, pandat='', time_limit_in_min=15.0)[source]

Bases: object

Parameters
  • dump_path (str) – the path where task result is saved

  • pandat (str, default='') – a full path of pandat.exe

  • time_limit_in_min (str, default=15.0) – time limit (minutes) for each pandat calculation

Note

Initialize “System” instance with dump path and full path of Pandat.exe, and time limit (minutes) of each Pandat calculation. Full path of Pandat.exe is necessary only when Pandat calculations are performed, while this path can be left empty when doing post-processing. Time limit of Pandat calculation is necessary for discarding abnormal calculations.

Examples

>>> import os
>>> from panpython.system import System
>>> from panpython.task.htc import HtcMesh
>>> pandat = "YOUR_PATH_TO_PANDAT_EXE/Pandat.exe"
>>> dump_path = "./output/"
>>> batch_file = "./template_batchfile.pbfx"
>>> config_file = "./Configuration.JSON"
>>>
>>> m_system = System(pandat=pandat, dump_path=dump_path)  # initialize system
>>> m_system.add_task(task_definition=HtcMesh(batch_file=batch_file, config_file=config_file, thread_num=1))  # add task
>>> m_system.run() # run task
add_task(task_instance)[source]

Add task instance to “System”

Parameters

task_instance (object) – A task instance

run()bool[source]

Run all added tasks in “System”

Returns

True if all task is success, False is any task failed

Return type

bool

property system_args

arguments of the calculation