Skip to content

Commit

Permalink
add additional fields as kwargs to PhononBSDOSDoc (materialsproject#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
naik-aakash authored and hrushikesh-s committed Nov 16, 2024
1 parent 35eb935 commit b7f20e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/atomate2/common/schemas/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def from_forces_born(
**kwargs:
additional arguments
"""
additional_fields = kwargs.get("additional_fields", {})
factor = get_factor(code)
# This opens the opportunity to add support for other codes
# that are supported by phonopy
Expand Down Expand Up @@ -466,7 +467,7 @@ def from_forces_born(
total_dft_energy / formula_units if total_dft_energy is not None else None
)

return cls.from_structure(
doc = cls.from_structure(
structure=structure,
meta_structure=structure,
phonon_bandstructure=bs_symm_line,
Expand Down Expand Up @@ -514,6 +515,8 @@ def from_forces_born(
},
)

return doc.model_copy(update=additional_fields)

@staticmethod
def get_kpath(
structure: Structure, kpath_scheme: str, symprec: float, **kpath_kwargs
Expand Down

0 comments on commit b7f20e8

Please sign in to comment.