Skip to content

Commit

Permalink
Phonon supercell for phono3py in velph
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Sep 1, 2024
1 parent c31afad commit 3fb27cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/phelel/velph/cli/phono3py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,10 @@ def cmd_init(toml_filename: str, random_displacements: Optional[int]):
type=click.Path(),
default="velph.toml",
)
@click.option(
"--yaml-filename",
"yaml_filename",
nargs=1,
type=click.Path(),
default="phono3py/phono3py_disp.yaml",
)
@click.help_option("-h", "--help")
def cmd_generate(toml_filename: str, yaml_filename: str):
def cmd_generate(toml_filename: str):
"""Generate phono3py input files."""
yaml_filename = "phono3py/phono3py_disp.yaml"
if not pathlib.Path("POTCAR").exists():
click.echo('"POTCAR" not found in current directory.')

Expand Down
4 changes: 1 addition & 3 deletions src/phelel/velph/cli/phono3py/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ def run_init(
"""
convcell = parse_cell_dict(toml_dict["unitcell"])
supercell_matrix = toml_dict["phelel"].get("supercell_dimension", None)
phonon_supercell_matrix = toml_dict["phelel"].get(
"phonon_supercell_dimension", None
)
phonon_supercell_matrix = toml_dict["phonopy"].get("supercell_dimension", None)
if "primitive_cell" in toml_dict:
primitive = parse_cell_dict(toml_dict["primitive_cell"])
primitive_matrix = np.dot(np.linalg.inv(convcell.cell.T), primitive.cell.T)
Expand Down

0 comments on commit 3fb27cf

Please sign in to comment.