n2p2 format#
Class: N2P2Format
n2p2.
This class support the conversion from and to the training data of n2p2 format. For more information about the n2p2 format, please refer to https://compphysvienna.github.io/n2p2/topics/cfg_file.html
Conversions#
Convert from this format to LabeledSystem#
- dpdata.LabeledSystem(file_name: 'FileType', fmt: Literal['n2p2'] = None) dpdata.system.LabeledSystem
- dpdata.LabeledSystem.from_n2p2(file_name: 'FileType') dpdata.system.LabeledSystem
Read from n2p2 format.
- Parameters:
- file_namestr
file name, i.e. the first argument
- Returns:
- LabeledSystem
converted system
Convert from LabeledSystem to this format#
- dpdata.LabeledSystem.to(fmt: Literal['n2p2'], file_name: 'FileType')
- dpdata.LabeledSystem.to_n2p2(file_name: 'FileType')
Write n2p2 format.
By default, LabeledSystem.to will fallback to System.to.
- Parameters:
- file_namestr
file name, where the data will be written