Electronic Structure Workshop
This workshop requires a Conda environment with specific dependencies for Jupyter notebooks and scientific computing.
- Supported operating systems: Windows, macOS (Intel or Apple Silicon), or Linux.
- Internet access for downloading Miniconda.
- Python installed (to run the installer script).
- Appropriate permissions to install software on your machine.
The setup process will:
- Check if Conda (Miniconda or Anaconda) is already installed.
- If not installed, prompt you to download and install Miniconda automatically.
- Once Conda is installed, guide you to create a Conda environment with required dependencies.
If you do not already have Conda installed:
-
Run the
miniconda_installer.py
script:python miniconda_installer.py
- The script checks for an existing Conda installation.
- If Conda is not found, it will ask if you want to install Miniconda.
- Upon your confirmation, it detects your OS and architecture, downloads the appropriate installer, and installs Miniconda silently.
After installing Miniconda, activate Conda in your current session:
macOS/Linux:
source ~/miniconda3/bin/activate
Windows (Command Prompt):
C:\> "C:\Users\<YourUsername>\miniconda3\Scripts\activate.bat"
(Replace <YourUsername>
with your actual username. Adjust the path if Miniconda was installed elsewhere.)
Windows (PowerShell):
& "C:\Users\<YourUsername>\miniconda3\Scripts\Activate.ps1"
Note: Adjust paths if your Miniconda installation directory is different.
To initialize Conda on all available shells after activation:
conda init --all
Then close and reopen your terminal to refresh your environment.
After Conda is set up, create the environment with required dependencies.
-
Ensure the
environment.yml
file is in your project directory. -
Run:
conda env create -f environment.yml
This creates an environment named
eh_notebook_env
with:- python=3.9
- ipywidgets
- ipython
- scipy
- numpy
- matplotlib
- notebook
Alternatively, create the environment manually:
conda create -n eh_notebook_env -y python=3.9 ipywidgets ipython scipy numpy matplotlib notebook
Then activate it:
conda activate eh_notebook_env
With the environment set up and activated, you can:
- Launch Jupyter Notebook:
(Replace <notebook_name> with your actual notebook name)
jupyter notebook <notebook_name>.ipynb
- Remove the Conda environment:
conda remove -n eh_notebook_env --all
- Uninstall Miniconda by deleting its installation directory:
rm -rf ~/miniconda3
- Remove the Conda environment:
conda remove -n eh_notebook_env --all
- Uninstall Miniconda:
- Delete the
miniconda3
directory, usually located in%USERPROFILE%\miniconda3
:rmdir /S /Q %USERPROFILE%\miniconda3
- Delete the