Skip to content

Commit

Permalink
switched case order
Browse files Browse the repository at this point in the history
  • Loading branch information
jrudz committed Jul 12, 2024
1 parent de9744d commit a8efe22
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/nomad_parser_vasp/parsers/xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ def xml_get(path: str, slicer=slice(0, 1), fallback=None):
# its unknown contributions (3 ways, choose 1) #
##############################################################

# Case 1: Add UnknownEnergy to contribution list in the parser with a value
from nomad_parser_vasp.schema_packages.vasp_schema import UnknownEnergy

output.total_energy[0].contributions.append(
UnknownEnergy(value=(total_energy - hartreedc - xcdc))
)
# Expected Results: normalizer does not change the value of UnknownEnergy
# Case 1: Don't include UnknownEnergy in parsing
# Expected Results: UnknownEnergy is added to contribution list by the normalizer

# Case 2: Add UnknownEnergy to contribution list in the parser but without a value
# from nomad_parser_vasp.schema_packages.vasp_schema import UnknownEnergy

# output.total_energy[0].contributions.append(UnknownEnergy(value=None))
# Expected Results: UnknownEnergy value is calculated by the normalizer and placed into this section

# Case 3: Don't include UnknownEnergy in parsing
# Expected Results: UnknownEnergy is added to contribution list by the normalizer
# Case 3: Add UnknownEnergy to contribution list in the parser with a value
# from nomad_parser_vasp.schema_packages.vasp_schema import UnknownEnergy

# output.total_energy[0].contributions.append(
# UnknownEnergy(value=(total_energy - hartreedc - xcdc))
# )
# Expected Results: normalizer does not change the value of UnknownEnergy

0 comments on commit a8efe22

Please sign in to comment.