gtalign

#!/usr/bin/env bash

## gtalign 0.16.0-alpha 
## demo with 1CIF vs 1YCC
## Extracted from GTalign_demo.ipynb 
##
## James Vincent help@sbgrid.org
## Jan 10, 2025

## !! User required vars
my_arch=gpu      # Set to gpu or mp 
model_one=1CIF   # ID of structure one 
model_two=1YCC   # ID of structure two

echo "## Start SBGrid environment"
export SBGRID_ALLOW=true       # SBGrid internal dev only
source /programs/sbgrid.shrc
export GTALIGN_X=0.16.0-alpha
echo "## Using GTALIGN version:  ${GTALIGN_X} "

## Set MP or GPU:
my_gtalign=gtalign_${my_arch}

if [[ "$my_arch" == *"gpu"* ]]; then
  echo "## Using GPU:  ${my_gtalign} "
  echo "## Verify GPU"
  ${my_gtalign} --dev-list
else
  echo "## Using CPU (mp):  ${my_gtalign} "
fi

## Set models for comparison
model_one_file=${model_one}.cif.gz
model_one_url=https://files.rcsb.org/download/${model_one_file}

model_two_file=${model_two}.cif.gz
model_two_url=https://files.rcsb.org/download/${model_two_file}



echo "## Download structures:"
wget ${model_one_url}
wget ${model_two_url}

echo "## Run gtalign: "
${my_gtalign} -v --qrs=${model_one_file} --rfs=${model_two_file} -o out2_${model_one}_${model_two}_speed6 --dev-queries-per-chunk=1 --dev-queries-total-length-per-chunk=40000 --dev-max-length=40000 --speed=6 --pre-score=0 --ter=0 -s 0 --cpu-threads-reading=1

echo "## Check output: "
cat out2_${model_one}_${model_two}_speed6/${model_one}.cif__0.out
ls -la out2_${model_one}_${model_two}_speed6```