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

[WIP] Adding Support for Command Line Interface #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Shibu778
Copy link

@Shibu778 Shibu778 commented Oct 3, 2024

Dear Maintainer,
This pull request introduces a Command Line Interface (CLI) for the nonrad repository, enhancing the usability and accessibility of the tool. The CLI is built using the click library, providing a structured and user-friendly way to interact with the functionalities of nonrad.

Key Features

CLI Group: Added a CLI group nonrad to serve as the entry point for various commands.

Commands

nonrad is the main command.

Subcommands

prep_ccd: Implemented the prep_ccd command which accepts three arguments:

  1. ground_path: Path to the ground state structure file.
  2. excited_path: Path to the excited state structure file.
  3. cc_dir: Directory to store the displaced structures.

pes: Extracts the Potential Energy Surface (PES) related data and plots it. It accepts following arguements:

  1. cc_dir : Path to the directory containing the CCD calculations.
  2. ground_files: Path to the directory containing the ground state calculation files.
  3. excited_files: Path to the directory containing the excited state calculation files.
  4. plot: If True, the potential energy surfaces are plotted. Default is False.
  5. plot_name: Name of the plot file. Default is pes.png.

Changes Made

  1. Created a new cli.py file to define the CLI commands.
  2. Updated pyproject.toml to include the CLI entry point.
  3. Imported necessary modules and defined the nonrad CLI group and pccd command.

Usage

nonrad prep_ccd <ground_path> <excited_path> <cc_dir> -d -0.5 0.5 9

nonrad pes -p -n pes.pdf CC_DIR GROUND_FILES EXCITED_FILES

TODO

  • Add other features
  • Make the CLI more flexible

I will be adding the above as soon as possible.

Please give your suggestion for improvement.

@Shibu778 Shibu778 changed the title Adding Support for Command Line Interface [WIP] Adding Support for Command Line Interface Oct 5, 2024
@mturiansky
Copy link
Owner

Hi @Shibu778, thanks for working on this. I see that this is a work in progress, so let me know when you are ready for me to look it over.

Please make sure there are unit tests for all the functionality that you're adding and that the docstrings adhere to numpy-style formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants