-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new format for OpenMX #585
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## devel #585 +/- ##
==========================================
+ Coverage 82.81% 83.13% +0.32%
==========================================
Files 73 76 +3
Lines 6580 6766 +186
==========================================
+ Hits 5449 5625 +176
- Misses 1131 1141 +10 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre-commit check should be passed before merging. See https://docs.deepmodeling.com/projects/deepmd/en/master/development/coding-conventions.html#run-scripts-to-check-the-code
It's not automatically fixed because you submit the PR from the master branch.
from dpdata.format import Format | ||
|
||
@Format.register("openmx") | ||
class OPENMXFormat(Format): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding some documentation for this new format. For example, a link to external documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@njzjz Thank you for the reply.
I have a question. What is the “documentation" in your message?
For example, on page 36 of the dpdata documentation, there are description about qe/cp/traj
, right? Do you meant that a similar description should be added for openmx
?
Or is it sufficient to simply attach a link to the DFT package OpenMX, like this?
I look forward to your advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this, e.g. what openmx is and what this format is.
Lines 20 to 28 in 12df348
class ASEStructureFormat(Format): | |
"""Format for the `Atomic Simulation Environment <https://wiki.fysik.dtu.dk/ase/>`_ (ase). | |
ASE supports parsing a few dozen of data formats. As described in i | |
`the documentation <ihttps://wiki.fysik.dtu.dk/ase/ase/io/io.html>`_, | |
many of these formats can be determined automatically. | |
Use the `ase_fmt` keyword argument to supply the format if | |
automatic detection fails. | |
""" |
Btw, it may be better to rename it to openmx/out
(or something like this) or add an alias to show this is the output but not the input. The input file can also be a format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@njzjz Thank you.
I maked out what you meant. So, I added some documentation for this new format, and changed keyword from openmx
to openmx/out
.
Dear developers,
I added a new format key,
openmx
to read output files from OpenMX. I wrote the codes with reference to theqe/cp/traj
format ones.Thank you in advance.