Start here

Install PyMACS and create a clean working folder

Use this page when you need PyMACS files in a fresh directory and want the safest path before running the examples.

What the installer does

The Quick Start installer temporarily clones the PyMACS repository, copies the files into the folder your terminal is currently pointing at, skips the cloned repository's .git folder, includes hidden project files, and removes the temporary clone when it is done.

  • Checks that git exists before copying anything.
  • Warns before copying into a non-empty directory.
  • Asks before overwriting files with the same names.
  • Uses Git LFS when available so large example assets are downloaded.
  • Warns when Git LFS is missing so users understand why large files may look incomplete.

One-command install

Run this from the folder where you want the PyMACS files to appear.

Copy command
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 "PyMACS Quick Start Install"
echo "Target: $TARGET_DIR"

if ! command -v git >/dev/null 2>&1; then
  echo "ERROR: git is not installed or not available in PATH."
  exit 1
fi

if [ "$(find "$TARGET_DIR" -mindepth 1 -maxdepth 1 | wc -l)" -gt 0 ]; then
  echo "WARNING: This directory is not empty."
  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

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
  git lfs install
  git lfs pull
else
  echo "WARNING: Git LFS was not detected."
fi

shopt -s dotglob nullglob
for item in "$TMP_DIR/pymacs"/*; do
  base="$(basename "$item")"
  [ "$base" = ".git" ] && continue

  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

cleanup
trap - EXIT
cd "$TARGET_DIR"

echo "Done. Next:"
echo "conda env create -f environment_cgenff.yml"
echo "conda env create -f environment_mdanalysis.yml"
EOF

After installation

  • Create the cgenff environment for structure setup and ligand conversion.
  • Create the mdanalysis environment for simulation control, analysis, plots, and reports.
  • Confirm GROMACS is visible with gmx --version.
  • Start with the Example 1 workflow before attempting a new scientific system.