Configure
For an apo protein, select protein-only. For a ligand system with approved Funnel access, choose option 5.
pymacs-leela
python pymacs_run.py configure
python pymacs_run.py validatePyMACS · Leela GPU server
Leela runs GROMACS interactively rather than through a scheduler. Give every system its own folder, select one idle GPU, and run the job inside a named tmux session so it continues after you disconnect.
Before you start
This walkthrough is for authorized Leela users. It is separate from the Triton scheduler workflow: on Leela, you start and monitor each job yourself.
Step 1 — Connect and activate
The one-time Leela administrator setup provides the pymacs-leela command. It activates the PyMACS setup environment, preserves Leela's compatible CUDA-11.5 GROMACS installation, and loads private Funnel settings when you have been authorized for ligand work.
# If your SSH config already defines the Leela host:
ssh leela
# Otherwise, replace YOUR_LEELA_USERNAME:
# ssh YOUR_LEELA_USERNAME@leela.ccs.miami.edu
pymacs-leela
gmx --version
nvidia-smiDo not activate the separate gromacs-gpu micromamba environment on Leela. That package expects CUDA 12, while Leela's NVIDIA driver supports CUDA 11.5. pymacs-leela keeps the known-working CUDA-11.5 GROMACS build first in PATH.
Protein–ligand runs only — private CGenFF access
Protein-only, protein–protein, and protein–peptide runs can skip this section. The Kyle CGenFF Funnel URL and token are private; they are stored in permission-restricted files on Leela, never in a job folder or repository.
Run pymacs-leela, then use python pymacs_run.py configure and choose option 5, remote CGenFF via Kyle Funnel. PyMACS sends only the prepared ligand MOL2 to Kyle and receives the CGenFF parameter stream back.
Step 2 — Create one run folder
Make a new folder for each system. Put a single .pdb, .cif, or .mmcif structure there, then run the installer. Leela has Git available after pymacs-leela.
pymacs-leela
mkdir -p /nethome/$USER/MD_PROJECTS/MY_SYSTEM
cd /nethome/$USER/MD_PROJECTS/MY_SYSTEM
# Copy your structure into this folder first, then run:
bash <<'EOF'
set -e
REPO_URL="https://github.com/schurerlab/Pymacs.git"
TMP_DIR="$(mktemp -d)"
TARGET_DIR="$(pwd)"
cleanup() {
rm -rf "$TMP_DIR"
}
trap cleanup EXIT
echo "======================================"
echo " PyMACS Quick Start Install"
echo "======================================"
echo
echo "This will copy a fresh PyMACS instance into:"
echo " $TARGET_DIR"
echo
if ! command -v git >/dev/null 2>&1; then
echo "ERROR: git is not installed or not available in PATH."
echo "Please install git first, then run this command again."
exit 1
fi
if [ "$(find "$TARGET_DIR" -mindepth 1 -maxdepth 1 | wc -l)" -gt 0 ]; then
echo "WARNING: This directory is not empty."
echo "Files with the same names as PyMACS files may be overwritten."
echo
printf "Continue copying PyMACS into this directory? [y/N]: "
read -r answer </dev/tty
case "$answer" in
y|Y|yes|YES) ;;
*)
echo "Install cancelled."
exit 0
;;
esac
fi
echo
echo "Cloning PyMACS into a temporary folder..."
git clone "$REPO_URL" "$TMP_DIR/pymacs"
cd "$TMP_DIR/pymacs"
if command -v git-lfs >/dev/null 2>&1 || git lfs version >/dev/null 2>&1; then
echo "Git LFS detected. Pulling large tracked files..."
git lfs install
git lfs pull
else
echo "WARNING: Git LFS was not detected."
echo "Core PyMACS files will still be copied, but large example assets may remain as LFS pointer files."
echo "Install Git LFS later and re-run this installer if you need the full example datasets."
fi
echo
echo "Copying PyMACS files into your current directory..."
shopt -s dotglob nullglob
for item in "$TMP_DIR/pymacs"/*; do
base="$(basename "$item")"
if [ "$base" = ".git" ]; then
continue
fi
if [ -e "$TARGET_DIR/$base" ]; then
printf "Overwrite existing %s? [y/N]: " "$base"
read -r overwrite </dev/tty
case "$overwrite" in
y|Y|yes|YES)
rm -rf "$TARGET_DIR/$base"
;;
*)
echo "Skipping $base"
continue
;;
esac
fi
cp -R "$item" "$TARGET_DIR/"
done
echo "Cleaning up temporary clone..."
cleanup
trap - EXIT
cd "$TARGET_DIR"
echo
echo "Done. PyMACS has been copied into:"
echo " $TARGET_DIR"
echo
echo "Next recommended steps:"
echo " conda env create -f environment_cgenff.yml"
echo " conda env create -f environment_mdanalysis.yml"
echo
echo "Then follow the Step 1 / Step 2 / Step 3 workflow on this page."
EOFStep 3 — Configure and prepare
The guided configuration saves the scientific choices in pymacs_run.json. Setup creates the topology, box, solvent, ions, and em.tpr.
For an apo protein, select protein-only. For a ligand system with approved Funnel access, choose option 5.
pymacs-leela
python pymacs_run.py configure
python pymacs_run.py validateDo not start MD until this completes successfully.
pymacs-leela
python pymacs_run.py setup
python pymacs_run.py statusStep 4 — Choose an idle GPU
Leela exposes GPUs numbered 0 through 3. Use nvidia-smi immediately before launching a job. Choose a GPU with no active GROMACS process; do not assume a number is free from an earlier check.
pymacs-leela
nvidia-smi
# Record one idle number, for example:
GPU_ID=3If a GPU lists a GROMACS process or substantial memory use, select another idle GPU or wait. The display process on GPU 0 uses a few MiB and is normal; assess the process table before choosing.
Step 5 — Start MD in tmux
A named tmux session keeps the terminal process alive after your SSH connection closes. Start Step 2 inside its own session; use a distinct session name and GPU ID for every system.
pymacs-leela
cd /nethome/$USER/MD_PROJECTS/MY_SYSTEM
tmux new -s my-system-md
# Inside tmux, replace GPU_ID with the idle GPU you selected:
python 2_AutomateGromacs.py --mode protein --ns 1000 --compute GPU --gpu GPU_ID --headless
# Detach and leave the MD running: press Ctrl-b, then dpymacs-leela
cd /nethome/$USER/MD_PROJECTS/MY_LIGAND_SYSTEM
tmux new -s my-ligand-md
# Replace LIG and GPU_ID. Run only after Step 1 succeeds.
python 2_AutomateGromacs.py --mode ligand --ligand LIG --ns 1000 --compute GPU --gpu GPU_ID --headless
# Detach: Ctrl-b, then dStep 6 — Monitor or reconnect
Reconnect whenever needed. Attaching shows the live program output; the log and GPU view are useful for a quick status check without attaching.
tmux ls
tmux attach -t my-system-md
# Or inspect without attaching:
tail -f run_1000ns.log
nvidia-smiStep 7 — Resume safely
If the tmux session is still listed, the job is still running—do not launch a duplicate. If it stopped and a checkpoint exists, create a new tmux session and continue production.
pymacs-leela
cd /nethome/$USER/MD_PROJECTS/MY_SYSTEM
tmux new -s my-system-resume
python 2_AutomateGromacs.py --resume --production_only --ns 1000 --compute GPU --gpu GPU_ID --headlessThe whole Leela path
ssh leela
pymacs-leela
cd /nethome/$USER/MD_PROJECTS/MY_SYSTEM
python pymacs_run.py configure
python pymacs_run.py validate
python pymacs_run.py setup
nvidia-smi
tmux new -s my-system-md
python 2_AutomateGromacs.py --mode protein --ns 1000 --compute GPU --gpu GPU_ID --headless
# Detach with Ctrl-b, then d