Skip to content
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

Additional inputs to phonopy #1418

Merged
merged 4 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions pyiron_atomistics/atomistics/master/phonopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,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 @@ -264,9 +279,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
Loading