1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
|
BootStrap: docker
From: registry.scicore.unibas.ch/schwede/promod3:3.4.2-OST2.9.1-jammy
%post
##############################################################################
# POST
##############################################################################
# CHANGE DASH TO BASH
rm /bin/sh
ln -sf /bin/bash /bin/sh
# INSTALL SYSTEM DEPS
#####################
apt-get update -y && apt-get install -y ipython3 jupyter python3-pip
pip3 install ipywidgets==8.1.1
pip3 install nglview \
six
# SET LOCALE
############
echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8
# SETUP IPYTHON / JUPYTER
#########################
export JUPYTER_PATH="/usr/local/share/jupyter"
mkdir -p $JUPYTER_PATH
mkdir -p $JUPYTER_PATH/kernels/ost-kernel
cat > $JUPYTER_PATH/kernels/ost-kernel/kernel.json <<EOF
{
"display_name": "OST",
"language": "python",
"argv": [
"python",
"-m", "ipykernel",
"-f", "{connection_file}",
"--InteractiveShellApp.exec_PYTHONSTARTUP=False",
"--InteractiveShellApp.exec_files=/usr/local/lib64/python3.10/site-packages/ost/ost_startup.py"
],
"env": {
}
}
EOF
%environment
##############################################################################
# ENVIRONMENT
##############################################################################
export TEMP="/tmp"
export TEMPDIR="/tmp"
export TMPDIR="/tmp"
export TMP="/tmp"
export JUPYTER_PATH="/usr/local/share/jupyter"
%apprun ChemdictTool
##############################################################################
# CHEMDICT TOOL APP
##############################################################################
$OST_ROOT/bin/chemdict_tool "$@"
%apprun lDDT
##############################################################################
# lDDT APP
##############################################################################
$OST_ROOT/bin/lddt "$@"
%apphelp lDDT
The Local Distance Difference Test.
Usage:
singularity run --app lDDT <IMAGE> [options] <mod1> [mod1 [mod2]] <re1>[,ref2,ref3]
Options:
-s selection performed on ref
-c use Calphas only
-f perform structural checks and filter input data
-t fault tolerant parsing
-p <file> use specified parmeter file. Mandatory
-v <level> verbosity level (0=results only,1=problems reported, 2=full report)
-b <value> tolerance in stddevs for bonds
-a <value> tolerance in stddevs for angles
-r <value> distance inclusion radius
-i <value> sequence separation
-e print version
-x ignore residue name consistency checks
%apprun Molck
##############################################################################
# MOLCK APP
##############################################################################
$OST_ROOT/bin/molck "$@"
%apphelp Molck
This is molck - the molecule checker
Usage:
singularity run --app Molck <IMAGE> [options] file1.pdb [file2.pdb [...]]
Options:
--complib=path location of the compound library file. If not provided, the
following locations are searched in this order:
1. Working directory, 2. OpenStructure standard library location (if the
executable is part of a standard OpenStructure installation)
--rm=<a>,<b> remove atoms and residues matching some criteria
zeroocc - Remove atoms with zero occupancy
hyd - Remove hydrogen atoms
oxt - Remove terminal oxygens
nonstd - Remove all residues not one of the 20 standard amino acids
unk - Remove unknown and atoms not following the nomenclature
--fix-ele clean up element column
--stdout write cleaned file(s) to stdout
--out=filename write cleaned file(s) to disk. % characters in the filename are
replaced with the basename of the input file without extension.
Default: %-molcked.pdb
--color=auto|on|off
whether output should be colored
--map-nonstd maps modified residues back to the parent amino acid, for example
MSE -> MET, SEP -> SER.
%apprun OST
##############################################################################
# OST APP
##############################################################################
$OST_ROOT/bin/ost "$@"
%apphelp OST
The OST app exposes the OpenStructure executable and can be used to run an
interactive shell, scripts and OpenStructure actions.
ProMod3 modules can be imported as any other Python module.
Usage:
singularity run --app OST <IMAGE> [options] (script | action)
[parameters]
Options:
-i, --interactive start interpreter interactively (must be first
parameter, ignored otherwise)
-h, --help show this help message and exit
-v VLEVEL, --verbosity_level=VLEVEL
sets the verbosity level [default: 2]
To list all available actions:
singularity run --app OST <IMAGE> --help
If script requires some external files eg. PDBs, they have to be located in the
path accessible via mounted volumes. By default Singularity mounts $HOME and
goes to CWD. Thus this sould work as expected out of the box.
%apprun PM
##############################################################################
# PM APP
##############################################################################
$PROMOD_ROOT/bin/pm "$@"
%apphelp PM
The PM app exposes the ProMod3 executable and can be used to run scripts and
predefined modelling "actions".
Usage:
singularity run --app PM <IMAGE> [options] (script | action)
[parameters]
Options:
-h, --help show this help message and exit
-v VLEVEL, --verbosity_level=VLEVEL
sets the verbosity level [default: 2]
To list all available actions:
singularity run --app PM <IMAGE> help
If script/action requires some external files eg. PDBs, they have to be located
in the path accessible via mounted volumes. By default Singularity mounts $HOME
and goes to CWD. Thus this sould work as expected out of the box.
%appenv IPython
##############################################################################
# NOTEBOOK ENV
##############################################################################
export DNG_ROOT=$OST_ROOT
export DNG_INITDIR=${DNG_ROOT}/lib64/python3.10/site-packages/ost
%apprun IPython
##############################################################################
# OST IPYTON APP
##############################################################################
ipython3 -i $DNG_INITDIR/ost_startup.py "$@"
%apphelp IPython
OST-powered iPython shell where ProMod3 modules can be imported as any other
Python module.
Usage:
singularity run --app IPython <IMAGE> [options]
Detailed help:
singularity run --app IPython <IMAGE> --help
%appenv Notebook
##############################################################################
# NOTEBOOK ENV
##############################################################################
export BIN_DIR=$OST_ROOT/bin
export XDG_RUNTIME_DIR=""
. $OST_ROOT/libexec/openstructure/ost_config
%apprun Notebook
##############################################################################
# NOTEBOOK APP
##############################################################################
jupyter notebook --NotebookApp.iopub_data_rate_limit=10000000 --no-browser "$@"
%apphelp Notebook
A Jupyter notebook playground with OST, ProMod3 and nglview.
Usage:
singularity run --app Notebook <IMAGE> [options]
The Jupyter notebook is run by default with `--NotebookApp.iopub_data_rate_limit=10000000`
and `--no-browser` options.
Useful options when running on remote server:
--ip=<Unicode> (NotebookApp.ip)
Default: 'localhost'
The IP address the notebook server will listen on.
--port=<Integer> (NotebookApp.port)
Default: 8888
The port the notebook server will listen on.
Copy the URL to the browser and launch the notebook with OST kernel. This will
load all necessary OST/ProMod3 components just like in the OST shell. We also enabled
the nglview widget to interactively view molecular structures and trajectories.
For more details on how to use nglview see http://nglviewer.org/nglview/latest/.
To list of all available options:
singularity run --app Notebook <IMAGE> --help
%runscript
##############################################################################
# RUNSCRIPT
##############################################################################
cat << EOF
Singularity container for OST $OPENSTRUCTURE_VERSION and ProMod3 $PROMOD_VERSION.
This container includes the following apps:
* OST - OpenStructure executable
* PM - ProMod3 executable
* IPython - OST-powered iPython shell
* Notebook - A Jupyter notebook playground with OST, ProMod3 and nglview
* lDDT - The Local Distance Difference Test
* Molck - Molecular checker
* ChemdictTool - Creating or update a compound library
To see the help for each individual app run:
singularity help --app <APP NAME> <IMAGE NAME>
EOF
%help
Singularity container for OST and ProMod3.
This container includes the following apps:
* OST - OpenStructure executable
* PM - ProMod3 executable
* IPython - OST-powered iPython shell
* Notebook - A Jupyter notebook palyground with OST and nglview
* lDDT - The Local Distance Difference Test
* Molck - Molecular checker
* ChemdictTool - Creating or update a compound library
To see the help for each individual app run:
singularity help --app <APP NAME> <IMAGE NAME>
|