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 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()