Installation for Linux and macOS

This guide covers installing CHEMSMART on Linux and macOS systems.

Create Environment

We recommend using conda to manage the packages required by CHEMSMART. Either Anaconda3 or Miniconda3 may be installed. See the conda installation guide for more information.

  1. Clone the repository:

    git clone https://github.com/xinglong-zhang/chemsmart.git
    
  2. Change to the chemsmart directory and create the environment:

    cd chemsmart
    make env
    

    This creates a conda environment named chemsmart with all required Python packages.

    If conda is not installed, you can use virtualenv instead:

    make env USE_CONDA=false
    

    or:

    make virtualenv
    

    However, using conda is recommended.

    Tip

    Run make help to see all available make targets.

  1. Activate the conda environment:

    conda activate chemsmart
    

Make Installation

  1. Install the package and dependencies:

    make install
    
  2. For developers, install additional packages (dev, test, docs):

    make install-dev
    

Configure CHEMSMART

Run the make configure command to set up the ~/.chemsmart templates and register the chemsmart command in your shell environment:

make configure

What make configure does on Linux and macOS:

  1. Copies templates — copies the bundled .chemsmart configuration templates to ~/.chemsmart.

  2. Updates your shell rc file — appends export PATH=... and export PYTHONPATH=... lines to ~/.bashrc (bash) or ~/.zshrc (zsh) so that the chemsmart command is available in new terminal sessions.

  3. Prompts for software paths — after setting up the shell environment, make configure interactively 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’s click.prompt() and work correctly on all platforms.

  4. Configures the conda path — auto-detects your conda installation via which conda and updates the ~/.chemsmart/server/*.yaml files 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-run chemsmart config server.

  5. Automatically sources your shell config — after writing the export lines, make configure sources every shell rc file that exists (~/.bashrc, ~/.zshrc, ~/.profile) so that chemsmart is active for the rest of the current make session, regardless of which file chemsmart wrote to.

Note

make configure sources the rc files inside its own sub-shell process. Because a child process cannot export environment changes back to its parent, your current terminal session is not automatically updated. You must run the source command below in your own terminal, or open a new terminal window.

After make configure completes, the chemsmart command is available immediately in any new terminal. To activate it in your current terminal without opening a new one, run the command for your shell:

source ~/.bashrc   # bash
# or
source ~/.zshrc    # zsh
# or
source ~/.profile  # sh / other

Then verify the installation:

chemsmart --version

or

chemsmart --help

Note

If ~/.bashrc (or ~/.zshrc) already contains a chemsmart section (i.e. make configure has been run before), it will not be modified again to avoid duplicate entries.