Skip to content

Commit

Permalink
add command line option
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed Mar 14, 2024
1 parent 54219fa commit c525f45
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions phonopy_vibspec/scripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def add_common_args(parser: argparse.ArgumentParser):

parser.add_argument('-m', '--modes', type=list_of_modes, help='List of modes (1-based)', default='')

parser.add_argument('-O', '--only', type=str, help='only consider certain atoms', default='')


def interval(s_interval: str) -> Tuple[float, float]:
"""get interval
Expand Down
1 change: 1 addition & 0 deletions phonopy_vibspec/scripts/prepare_raman.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def main():
phonons = PhononsAnalyzer.from_phonopy(
phonopy_yaml=args.phonopy,
force_constants_filename=args.fc,
only=args.only if args.only != '' else None
)

raman_spectrum = phonons.prepare_raman(
Expand Down
3 changes: 2 additions & 1 deletion phonopy_vibspec/scripts/spectrum_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def main():
phonons = PhononsAnalyzer.from_phonopy(
phonopy_yaml=args.phonopy,
force_constants_filename=args.fc,
born_filename=args.born
born_filename=args.born,
only=args.only if args.only != '' else None
)

ir_spectrum = phonons.infrared_spectrum(modes=args.modes if len(args.modes) > 0 else None)
Expand Down
1 change: 1 addition & 0 deletions phonopy_vibspec/scripts/vesta_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def main():
phonons = PhononsAnalyzer.from_phonopy(
phonopy_yaml=args.phonopy,
force_constants_filename=args.fc,
only=args.only if args.only != '' else None
)

phonons.make_vesta_for_modes(
Expand Down

0 comments on commit c525f45

Please sign in to comment.