Source code for ai2_kit.main

from fire import Fire


[docs] class Group: def __init__(self, items: dict, doc: str = '') -> None: self.__doc__ = doc self.__dict__.update(items)
[docs] class AlgorithmGroup: """ Algorithms for specific domains. """
[docs] def proton_transfer(self): """ Proton transfer analysis toolkit. """ from ai2_kit.algorithm import proton_transfer return proton_transfer.cli_entry
[docs] def aosa(self): """ Amorphous oxides structure analysis toolkit. """ from ai2_kit.algorithm import aos_analysis return aos_analysis.cli_entry
[docs] def reweighting(self): """ Reweightning toolkit """ from ai2_kit.algorithm.reweighting import ReweightingTool return ReweightingTool()
[docs] class WorkflowGroup: """ Workflows for specific domains. """ @property def cll_mlp_training(self): from ai2_kit.workflow.cll_mlp import run_workflow return run_workflow @property def fep_mlp_training(self): from ai2_kit.workflow.fep_mlp import run_workflow return run_workflow
[docs] class ToolGroup: """ Tools for specific domains. """ @property def ase(self): from ai2_kit.tool.ase import AseTool return AseTool @property def dpdata(self): from ai2_kit.tool.dpdata import DpdataTool return DpdataTool @property def yaml(self): from ai2_kit.tool.yaml import Yaml return Yaml @property def batch(self): from ai2_kit.tool.batch import BatchTool return BatchTool @property def frame(self): from ai2_kit.tool.frame import FrameTool return FrameTool @property def hpc(self): from ai2_kit.tool.hpc import cmd_entry return cmd_entry @property def misc(self): from ai2_kit.tool.misc import cmd_entry return cmd_entry
[docs] class FeatureGroup: """ Featuring tools for specific domains. """ @property def catalysis(self): """ Catalyst specific tools. """ from ai2_kit.feat.catalysis import CmdEntries return CmdEntries @property def cat(self): """ Shortcut for catalyst. """ return self.catalysis @property def spectr(self): """ Spectrum specific tools. """ from ai2_kit.feat.spectrum import CmdEntries return CmdEntries()
ai2_kit = Group({ 'workflow': WorkflowGroup(), 'algorithm': AlgorithmGroup(), 'tool': ToolGroup(), 'feat': FeatureGroup(), }, doc="Welcome to use ai2-kit!")
[docs] def main(): Fire(ai2_kit)
if __name__ == '__main__': main()