From b04450a183622ccf7068338da8e7ce9569c33912 Mon Sep 17 00:00:00 2001 From: shigetomo Date: Tue, 5 Dec 2023 22:40:15 +0900 Subject: [PATCH] Add some documentation --- dpdata/plugins/openmx.py | 41 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/dpdata/plugins/openmx.py b/dpdata/plugins/openmx.py index 930990ee..f340857c 100644 --- a/dpdata/plugins/openmx.py +++ b/dpdata/plugins/openmx.py @@ -5,8 +5,31 @@ @Format.register("openmx") class OPENMXFormat(Format): + """Format for the `OpenMX `. + + OpenMX (Open source package for Material eXplorer) is a nano-scale material simulation package based on DFT, norm-conserving pseudopotentials, and pseudo-atomic localized basis functions. + + Note that two output files, System.Name.dat and System.Name.md, are required. + + Use the `openmx/out` keyword argument to supply this format. + """ + @Format.post("rot_lower_triangular") - def from_system(self, file_name, begin=0, step=1, **kwargs): + def from_system(self, file_name: str, **kwargs) -> dict: + """Read from OpenMX output. + + Parameters + ---------- + file_name : str + file name, which is specified by a input file, i.e. System.Name.dat + **kwargs : dict + other parameters + + Returns + ------- + dict + data dict + """ fname = f"{file_name}.dat" mdname = f"{file_name}.md" @@ -18,7 +41,21 @@ def from_system(self, file_name, begin=0, step=1, **kwargs): return data @Format.post("rot_lower_triangular") - def from_labeled_system(self, file_name, begin=0, step=1, **kwargs): + def from_labeled_system(self, file_name: str, **kwargs) -> dict: + """Read from OpenMX output. + + Parameters + ---------- + file_name : str + file name, which is specified by a input file, i.e. System.Name.dat + **kwargs : dict + other parameters + + Returns + ------- + dict + data dict + """ fname = f"{file_name}.dat" mdname = f"{file_name}.md"