Installation for Windows Using Anaconda PowerShell
This guide covers installing CHEMSMART on Windows using the Anaconda or Miniconda PowerShell prompt.
Create Environment
Install the required software:
Conda: Install either Anaconda3 or Miniconda3 for Windows. The Anaconda / Miniconda installer registers the Anaconda PowerShell Prompt shortcut in the Start Menu.
Chocolatey: Install from https://chocolatey.org/install to enable
makesupport.
Note
Ensure the Anaconda / Miniconda environment variables are added correctly during installation (select “Add Anaconda to my PATH environment variable” or run the installer with default settings and use the dedicated Anaconda Prompt).
Open the Anaconda PowerShell Prompt (or Miniconda PowerShell Prompt) from the Start Menu and install
make:choco install make
Clone the repository:
git clone https://github.com/xinglong-zhang/chemsmart.git
Create the conda environment:
cd chemsmart conda env create -f environment.yml
Activate the environment:
conda activate chemsmart
Note
You may need to run conda init powershell once to allow conda environments to be activated inside PowerShell. If
prompted, close and reopen the Anaconda PowerShell Prompt afterwards.
Make Installation
Install the package and dependencies:
make install
For developers, install additional packages:
make install-dev
Configure CHEMSMART
Run the make configure command to set up the ~/.chemsmart templates and register the chemsmart command in
your PowerShell environment:
make configure
What make configure does on Anaconda / Miniconda PowerShell:
Copies templates — copies the bundled
.chemsmartconfiguration templates to~\.chemsmart(%USERPROFILE%\.chemsmart).Updates PowerShell profiles — writes a
$env:PYTHONPATHentry and aSet-Alias -Name chemsmart -Value chemsmart.exedeclaration to:~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1(Windows PowerShell 5.x, used by Anaconda / Miniconda prompts)~/Documents/PowerShell/Microsoft.PowerShell_profile.ps1(PowerShell 7+, if installed)
Note
A ``Set-Alias`` declaration (rather than a bare
$env:PATHaddition) is used because PowerShell resolves aliases before external commands in PATH. This means that even if a bare POSIX-stylechemsmartscript (no.exeextension) is present somewhere on PATH — for example inchemsmart/cli/in a development install — the alias wins andchemsmart.exe(which pip places in the condaScripts/directory) is called directly. This avoids the Windows “Open with” popup.If you previously ran
make configureand your profile contained old$env:PATHorfunction chemsmartentries, re-runningmake configurewill automatically remove the old block and write the newSet-Aliasdeclaration in its place.Prompts for software paths — after setting up the PowerShell profiles,
make configureinteractively asks for the installation folders of the following software:Gaussian g16
ORCA
NCIPLOT
Press Enter to skip any prompt you don’t need. The entered paths are written to
~\.chemsmart\server\*.yaml. These prompts use Python’sclick.prompt()and work correctly on all platforms.Configures the conda path — auto-detects your conda installation via
condain PATH and updates the~/.chemsmart/server/*.yamlfiles with the correct conda path for your remote HPC cluster. If conda is not found in PATH, a message is logged — add conda to your PATH and re-runchemsmart config server.Outputs activation instructions — at the end of
make configure, the Makefile prints a reminder to run. $PROFILEso thatchemsmartis immediately available in the current session.
Note
On Windows, make configure does not execute . $PROFILE automatically — it only prints the instruction.
You must run . $PROFILE manually in your Anaconda/Miniconda PowerShell Prompt to load the chemsmart alias
into your current session. Alternatively, simply open a new Anaconda PowerShell Prompt.
After make configure completes, the chemsmart command is available immediately in any new Anaconda
PowerShell Prompt. To activate it in your current session without opening a new one, run:
. $PROFILE
After this, you can verify the installation:
chemsmart --version
or
chemsmart --help
Note
Each time make configure is run, the installer replaces the previous chemsmart block in the PS profile with the
latest settings. Re-running configure is therefore safe and idempotent.
Troubleshooting
PowerShell execution policy error
If you see an error like cannot be loaded because running scripts is disabled on this system, you need to allow
local scripts to run. Open PowerShell as Administrator and run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
conda not found after make configure
If conda is not in your PATH when make configure runs, the server YAML files will not be updated automatically.
Add conda to your PATH (or activate the conda base environment) and then re-run:
chemsmart config server
chemsmart command not found after make configure
Make sure you have reloaded the PowerShell profile:
. $PROFILE
Or open a new Anaconda PowerShell Prompt — the profile is sourced automatically on startup.
chemsmart opens an “Open with” popup instead of running
This means Windows found a bare POSIX script named chemsmart (no .exe extension) in $env:PATH before
resolving the alias. Re-run make configure to update the profile with the Set-Alias declaration that takes
precedence over external files, then reload the profile:
make configure
. $PROFILE