Skip to content

Commit

Permalink
Add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
shigeandtomo committed Dec 5, 2023
1 parent 12df348 commit b04450a
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions dpdata/plugins/openmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,31 @@

@Format.register("openmx")
class OPENMXFormat(Format):
"""Format for the `OpenMX <https://www.openmx-square.org/>`.
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"

Expand All @@ -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"

Expand Down

0 comments on commit b04450a

Please sign in to comment.