Skip to content

Instantly share code, notes, and snippets.

@matteoferla
Last active October 12, 2023 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matteoferla/236e8e1700c221f7cfa21992393119f9 to your computer and use it in GitHub Desktop.
Save matteoferla/236e8e1700c221f7cfa21992393119f9 to your computer and use it in GitHub Desktop.
Example of how I run a Fragmenstein analysis in Diamond
#! bin/bash
# For scripts required see: https://gist.github.com/matteoferla/e0496d5766c12a0ae1738b943b41a536
# A few things don't work in CentOS 7 due to GNU lib C (glibc) 2.17, so it has to be run in a Singularity container
: << USAGE
export JOB_SCRIPT=/data/xchem-fragalysis/shared/singularity.sh;
export APPTAINER_CONTAINER=/data/xchem-fragalysis/shared/singularity/rockyplus.sif;
export JOB_INNER_SCRIPT=/data/xchem-fragalysis/mferla/Zika/job.sh;
condor_submit /data/xchem-fragalysis/shared/target_script.condor
USAGE
: << INSTALLATION
export PIP_NO_USER=1; # gets ignored.
export PYTHONUSERBASE=$CONDA_PREFIX; # double tap
conda install -y -n base -c conda-forge openbabel plip;
pip install -q fragmenstein
pip install -q pyrosetta-help
PYROSETTA_USERNAME=๐Ÿ‘พ๐Ÿ‘พ๐Ÿ‘พ PYROSETTA_PASSWORD=๐Ÿ‘พ๐Ÿ‘พ๐Ÿ‘พ install_pyrosetta
INSTALLATION
export HOST=${HOST:-$(hostname)}
export USER=${USER:-$(users)}
export HOME=${HOME:-$_CONDOR_SCRATCH_DIR}
source /etc/os-release;
echo "Running script ${0} as $USER in $HOST which runs $PRETTY_NAME"
# ---------------------------------------------------------------
source /data/xchem-fragalysis/mferla/.bashrc;
cd ๐Ÿ‘พ๐Ÿ‘พ๐Ÿ‘พ
pwd;
export TEMPLATE="๐Ÿ‘พ๐Ÿ‘พ๐Ÿ‘พ/๐Ÿค–๐Ÿค–๐Ÿค–.pdb'
export HITS='๐Ÿ‘พ๐Ÿ‘พ๐Ÿ‘พ/๐Ÿค–๐Ÿค–๐Ÿค–.sdf'
N_CORES=$(cat /proc/cpuinfo | grep processor | wc -l)
nice -19 python fragmenstein_merge_sw_place.py \
--template $TEMPLATE --hits $HITS \
--n_cores $(($N_CORES - 1)) --suffix _pairs \
--workfolder /tmp/fragmenstein \
--max_tasks 5000 \
--sw_databases REAL-Database-22Q1.smi.anon \
--weights weights.json \
--combination_size 2 \
--timeout 600;
echo 'COMPLETE'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment