chemsmart.cli package
Subpackages
- chemsmart.cli.gaussian package
- Submodules
- chemsmart.cli.gaussian.com module
- chemsmart.cli.gaussian.crest module
- chemsmart.cli.gaussian.custom module
- chemsmart.cli.gaussian.dias module
- chemsmart.cli.gaussian.gaussian module
- chemsmart.cli.gaussian.irc module
- chemsmart.cli.gaussian.link module
- chemsmart.cli.gaussian.modred module
- chemsmart.cli.gaussian.nci module
- chemsmart.cli.gaussian.opt module
- chemsmart.cli.gaussian.qmmm module
- chemsmart.cli.gaussian.resp module
- chemsmart.cli.gaussian.traj module
- chemsmart.cli.gaussian.scan module
- chemsmart.cli.gaussian.singlepoint module
- chemsmart.cli.gaussian.tddft module
- chemsmart.cli.gaussian.ts module
- chemsmart.cli.gaussian.wbi module
- Module contents
- chemsmart.cli.mol package
- chemsmart.cli.orca package
- Submodules
- chemsmart.cli.orca.inp module
- chemsmart.cli.orca.irc module
- chemsmart.cli.orca.modred module
- chemsmart.cli.orca.neb module
- chemsmart.cli.orca.opt module
- chemsmart.cli.orca.qmmm module
- chemsmart.cli.orca.orca module
- chemsmart.cli.orca.scan module
- chemsmart.cli.orca.singlepoint module
- chemsmart.cli.orca.ts module
- Module contents
Submodules
chemsmart.cli.config module
- class chemsmart.cli.config.Config[source]
Bases:
objectCentral configuration helper for chemsmart.
The class is organised into five logical sections:
Template & destination paths — where bundled templates live and where they are copied to (
~/.chemsmart).Conda detection — locate the active conda installation via
shutil.which(works on Linux, macOS, Git Bash and Conda PowerShell).POSIX shell management — detect the active shell (bash / zsh / sh) and return the correct rc file path and
exportlines.Windows PowerShell management — detect an Anaconda / Miniconda PowerShell session and write
$env:PATHentries into the PS profile.Windows registry management — fallback for plain CMD sessions that have neither a POSIX shell nor PowerShell; persists PATH via the Windows registry.
- property chemsmart_dest
Destination path for the user’s
.chemsmartconfiguration.
- property chemsmart_gaussian
Path to the
gaussiansub-directory of the user config.
- property chemsmart_orca
Path to the
orcasub-directory of the user config.
- property chemsmart_package_path
Absolute path to the root of the chemsmart source/install tree.
- property chemsmart_server
Path to the
serversub-directory of the user config.
- property chemsmart_template
Return a Traversable pointing to the bundled
.chemsmarttemplate directory.Uses
importlib.resourcesso that the path is resolved correctly after installation on Windows, macOS, and Linux alike.
- property conda_folder
Root directory of the conda installation (parent of the directory containing the executable).
- property conda_path
Locate the
condaexecutable viashutil.which.Works on Linux, macOS, Windows Git Bash, and Anaconda / Miniconda PowerShell Prompt (all of which add conda to
PATH).Raises
FileNotFoundErrorif conda is not found.
- configure_conda_in_server_yaml()[source]
Auto-detect the conda installation and update the placeholder
~/miniconda3path in all server YAML files.Conda is located via
conda_folder, which usesshutil.which("conda")and therefore works on all supported platforms — Linux, macOS, Windows Git Bash and Anaconda / Miniconda PowerShell Prompt.If conda cannot be found a helpful message is logged instead of raising an exception.
- Return type:
- configure_paths_interactively()[source]
Interactively prompt for optional software folder paths.
Prompts the user for the Gaussian g16, ORCA, and NCIPLOT installation folders. Pressing Enter skips a prompt.
Uses
click.prompt()so the prompts work correctly on all platforms — Linux, macOS, Windows Git Bash, and Conda PowerShell — without any shell-specificreadsyntax in the Makefile.- Return type:
- property env_vars
Unix-style
exportlines to append to the active shell rc file.Returns
[]on native Windows (no POSIX shell active). On Windows Git Bash / MSYS2 the Unix-style exports are returned so that the shell rc file is updated correctly.
- property powershell_profiles
Return profile paths to update when running inside a PowerShell session (e.g. Anaconda / Miniconda PowerShell Prompt).
PowerShell is detected via the
PSModulePathenvironment variable, which is always set by PowerShell regardless of how it was launched.Both Windows PowerShell 5.x and PowerShell 7+ profile paths are returned so the update works across both versions.
Returns
[]on non-Windows platforms or outside a PowerShell session.
- property ps_env_vars
PowerShell profile lines written by
make configure.Returns a
$env:PYTHONPATHline for editable installs and aSet-Aliasdeclaration that maps the barechemsmartcommand tochemsmart.exe.Note
We use
Set-Aliasrather than adding directories to$env:PATHor defining afunctionwrapper.PowerShell resolves aliases before functions and before external commands, so the alias will win even if a bare
chemsmartPOSIX script is present somewhere onPATH(e.g. inchemsmart/cli/from a development install).Calling
chemsmart.exedirectly avoids the Windows “Open with” popup that appears when PowerShell tries to execute a file with no recognised extension.chemsmart.exeis always present in the active conda environment’sScripts/directory after a successfulpip install.
- setup_environment()[source]
Copy bundled templates to
~/.chemsmartand register thechemsmartcommand in the active shell environment.Dispatch logic:
POSIX shell (Linux, macOS, Git Bash on Windows): append
exportlines to the shell rc file (~/.bashrc,~/.zshrc, …).Windows PowerShell (Anaconda / Miniconda PS Prompt, detected via
PSModulePath): write aSet-Aliasdeclaration and$env:PYTHONPATHline to the PS profile, replacing any previous chemsmart block.Windows CMD / other: update PATH / PYTHONPATH in the Windows user registry.
- property shell_config
Return the shell startup file path for the active POSIX shell.
Returns
Noneon native Windows when no POSIX shell is active (i.e. theSHELLenvironment variable is not set). On Windows Git Bash / MSYS2 theSHELLvariable is set, so the shell rc file is managed exactly as on Linux / macOS.
chemsmart.cli.job module
CLI options for ALL jobs that can be run in this package.
This module provides common command-line interface decorators and options that are shared across different job types in the chemsmart package.
- chemsmart.cli.job.click_file_label_and_index_options(f)[source]
Common click options for specifying file label, append-label, and index via CLI.
- chemsmart.cli.job.click_filename_options(f)[source]
Common click options for specifying filenames via CLI.
- chemsmart.cli.job.click_filenames_options(f)[source]
Common click options for specifying filenames via CLI.
- chemsmart.cli.job.click_folder_options(f)[source]
CLI options for directory-based batch processing.
- chemsmart.cli.job.click_job_options(f)[source]
Common job control options for all job types.
Provides standard options for job execution control, including the ability to skip completed jobs or force re-execution.
chemsmart.cli.jobrunner module
chemsmart.cli.logger module
chemsmart.cli.main module
CLI interface for chemsmart project.
This module provides the main entry point for the chemsmart command-line interface, organizing various subcommands and providing the ASCII art banner display.
- chemsmart.cli.main.main()[source]
The main function executes on commands:
python -m chemsmartand$ chemsmart.This is your program’s entry point.
You can change this function to do whatever you want. .. rubric:: Examples
Run a test suite
Run a server
Do some other stuff
Run a command line application (Click, Typer, ArgParse)
List all available tasks
Run an application (Flask, FastAPI, Django, etc.)
chemsmart.cli.run module
chemsmart.cli.sub module
Submission of jobs to queuing system via cli.
This module provides command-line interface for submitting jobs to various queuing systems and cluster schedulers.