-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·40 lines (34 loc) · 1.87 KB
/
setup.sh
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
#! /bin/bash
#
# This bash shell script adds the directory containing active_particles to the
# Python path, and sets up aliases, environment variables and functions useful
# when using active_particles.
export AP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # path to active_particles package
export AP_PYTHON=$(. activate active_particles_env; which python) # python executable to use with active_particles
alias ap_python="$AP_PYTHON"
export AP_MPROF="$(. activate active_particles_env; which mprof)" # python memory profiling tool
alias ap_mprof="$AP_MPROF"
alias ap_update="( cd $AP_DIR ; git pull ; echo 'sourcing setup.sh' ; . setup.sh )" # alias to update active_particles git repository
# PYTHON
export PYTHONPATH=$PYTHONPATH:${AP_DIR}/.. # for python to find active_particles
# COMMANDS
alias ap_param="$AP_PYTHON ${AP_DIR}/param.py"
alias ap_launch="bash ${AP_DIR}/launch/launch.sh"
# SCRIPTS (defined as variables so they can be used with ap_launch)
export AP_CSS="$AP_PYTHON ${AP_DIR}/analysis/css.py"
export AP_CTT="$AP_PYTHON ${AP_DIR}/analysis/ctt.py"
export AP_CUU="$AP_PYTHON ${AP_DIR}/analysis/cuu.py"
export AP_FRAME="$AP_PYTHON ${AP_DIR}/analysis/frame.py"
export AP_MSD="$AP_PYTHON ${AP_DIR}/analysis/msd.py"
export AP_VARN="$AP_PYTHON ${AP_DIR}/analysis/varn.py"
# PLOTS
alias ap_pd2min="$AP_PYTHON ${AP_DIR}/analysis/pd2min.py"
alias ap_c44="$AP_PYTHON ${AP_DIR}/plot/c44.py"
alias ap_chi_msd="$AP_PYTHON ${AP_DIR}/plot/chi_msd.py"
alias ap_cmsd="$AP_PYTHON ${AP_DIR}/plot/cmsd.py"
alias ap_comparison="$AP_PYTHON ${AP_DIR}/plot/comparison.py"
alias ap_corlcort="$AP_PYTHON ${AP_DIR}/plot/corlcort.py"
alias ap_msd_comparison="$AP_PYTHON ${AP_DIR}/plot/msd_comparison.py"
alias ap_pphiloc="$AP_PYTHON ${AP_DIR}/plot/pphiloc.py"
# FUNCTIONS
. ${AP_DIR}/exponents.sh # translations between floats and litteral expressions