Skip to content

Instantly share code, notes, and snippets.

@philipturner
Last active December 6, 2025 18:34
Show Gist options
  • Select an option

  • Save philipturner/b3ff0e9a0a5107d10bec257132c486d6 to your computer and use it in GitHub Desktop.

Select an option

Save philipturner/b3ff0e9a0a5107d10bec257132c486d6 to your computer and use it in GitHub Desktop.

Molecular Renderer: Tutorial Video

All copyable terminal commands from the video.

macOS Instructions

Check that the Swift compiler works from the command line.

Application: Terminal

swift --version
cd ~/Desktop

mkdir MyCLI
cd MyCLI
swift package init --name MyCLI --type executable
swift run MyCLI

cd ../
rm -rf MyCLI

Download and compile Molecular Renderer.

Application: Terminal

cd ~/Desktop

git clone https://github.com/philipturner/molecular-renderer
cd molecular-renderer
bash install-libraries.sh
bash run.sh

WinGet

Install Swift through WinGet.

Application: Command Prompt

winget --version
winget install --id Microsoft.VisualStudio.2022.Community --exact --force --custom "--add Microsoft.VisualStudio.Component.Windows11SDK.22000 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
OR
winget install --id Microsoft.VisualStudio.2022.Community --exact --force --custom "--add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
winget install --id Swift.Toolchain -e
swift --version

Check that the Swift compiler works from the command line.

Application: Git Bash

cd ~/Desktop

mkdir MyCLI
cd MyCLI
swift package init --name MyCLI --type executable
swift run MyCLI

cd ../
rm -rf MyCLI

Visual Studio Code

Prepare to test Swift in Visual Studio Code.

Application: Git Bash

cd ~/Desktop

mkdir MyCLI
cd MyCLI
swift package init --name MyCLI --type executable

Actually test Swift in Visual Studio Code.

Application: Visual Studio Code

swift run MyCLI

Molecular Renderer

Download Molecular Renderer and install binary dependencies.

Application: Git Bash

cd ~/Desktop

git clone https://github.com/philipturner/molecular-renderer
cd molecular-renderer
./install-libraries.bat

Compile Molecular Renderer.

Application: Visual Studio Code

./run.bat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment