From 3fb27cfed8ceae029a032cf2f66404cc5111ef68 Mon Sep 17 00:00:00 2001 From: Atsushi Togo Date: Sun, 1 Sep 2024 17:24:46 +0900 Subject: [PATCH] Phonon supercell for phono3py in velph --- src/phelel/velph/cli/phono3py/__init__.py | 10 ++-------- src/phelel/velph/cli/phono3py/init.py | 4 +--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/phelel/velph/cli/phono3py/__init__.py b/src/phelel/velph/cli/phono3py/__init__.py index 4898b4b..2c5285c 100644 --- a/src/phelel/velph/cli/phono3py/__init__.py +++ b/src/phelel/velph/cli/phono3py/__init__.py @@ -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.') diff --git a/src/phelel/velph/cli/phono3py/init.py b/src/phelel/velph/cli/phono3py/init.py index 28a7349..0b832d1 100644 --- a/src/phelel/velph/cli/phono3py/init.py +++ b/src/phelel/velph/cli/phono3py/init.py @@ -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)