Skip to content

Commit

Permalink
Merge pull request #1418 from pyiron/phonopy_eigenvectors
Browse files Browse the repository at this point in the history
Additional inputs to phonopy
  • Loading branch information
raynol-dsouza authored Jun 12, 2024
2 parents 7e19a13 + 1e35ef3 commit 88b456f
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions pyiron_atomistics/atomistics/master/phonopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,21 @@ def __init__(self, project, job_name):
"'distance' parameter, i.e., all atoms in supercell are displaced with the same displacement distance in "
"direct space. (Copied directly from phonopy docs. Requires the alm package to work.)",
)
self.input["eigenvectors"] = (
False,
"whether or not to save the eigenvectors of the dynamical matrix at each irreducible qpoint, "
"which are necessary to obtain the projected DOS (which can be done with a post-processing script). "
"They are accessed using job.phonopy.get_mesh_dict()['eigenvectors']. WARNING: "
"Setting this to True can result in a very large .h5 file (~GBs) or hit memory limits. "
"Only set to True if you know what you are doing!",
)
self.input["tetrahedron_method"] = (
True,
"use the tetrahedron method for the BZ integration. "
"If set to False, the Gaussian smearing method is used. "
"The 'sigma' value for the smearing is determined internally by phonopy. "
"See https://phonopy.github.io/phonopy/setting-tags.html#sigma .",
)

self.phonopy = None
self._job_generator = PhonopyJobGenerator(self)
Expand Down Expand Up @@ -266,9 +281,14 @@ def collect_output(self):
self.phonopy.produce_force_constants(
fc_calculator=None if self.input["number_of_snapshots"] is None else "alm"
)
self.phonopy.run_mesh(mesh=[self.input["dos_mesh"]] * 3)
self.phonopy.run_mesh(
mesh=[self.input["dos_mesh"]] * 3,
with_eigenvectors=self.input["eigenvectors"],
)
mesh_dict = self.phonopy.get_mesh_dict()
self.phonopy.run_total_dos()
self.phonopy.run_total_dos(
use_tetrahedron_method=self.input["tetrahedron_method"]
)
dos_dict = self.phonopy.get_total_dos_dict()

self.to_hdf()
Expand Down

0 comments on commit 88b456f

Please sign in to comment.