-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-patch-AutoDockTools
executable file
·80 lines (56 loc) · 1.66 KB
/
python-patch-AutoDockTools
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
#!/bin/sh
#
# this script is used by me to start python
#
######
## Set some environment variable.
MGL_ROOT="/home/xiang/Applications/mgltools_x86_64Linux2_1.5.7"
export MGL_ROOT
MGL_ARCHOSV=`$MGL_ROOT/bin/archosv`
export MGL_ARCHOSV
MGL_EXTRALIBS="$MGL_ROOT/lib"
export MGL_EXTRALIBS
MGL_EXTRAINCLUDE="$MGL_ROOT/include"
export MGL_EXTRAINCLUDE
PATH="$MGL_ROOT/bin:$PATH"
export PATH
TCL_LIBRARY="$MGL_ROOT/tcl8.5"
export TCL_LIBRARY
TK_LIBRARY="$MGL_ROOT/tk8.5"
export TK_LIBRARY
# Open Babel formats, plugins directory:
BABEL_LIBDIR="$MGL_ROOT/lib/openbabel/2.4.1"
export BABEL_LIBDIR
BABEL_DATADIR="$MGL_ROOT/share/openbabel/2.4.1"
export BABEL_DATADIR
MY_NEW_PYTHON=$MGL_ROOT/my-build-python-2.7.13
LD_LIBRARY_PATH="$MGL_ROOT/lib:$MY_NEW_PYTHON/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
unset PYTHONHOME
PYTHONHOME="$MGL_ROOT"
export PYTHONHOME
PYTHONPATH="$MGL_ROOT/MGLToolsPckgs"
export PYTHONPATH
$MY_NEW_PYTHON/bin/python $@
cat <<EOF
1. install a similar python by using current version, py2
2. install all needed packages inside py2
3. add py2 `site-packages` into original path by using `pth` file,
be careful with the precedence of names, suggest to use `zz.pth`
4. stop `ipython` reading system wide configurations if necessary.
```
if __name__ == '__main__':
import os
from IPython import start_ipython
# a path should be added, otherwise, new initialized folders
# will be creatd at every time where ipython starts
os.environ['IPYTHONDIR'] = 'dirpath'
start_ipython()
```
5. start by using `adt -i`, then embed IPython Shell inside it,
by commands inside Python idle(teminal):
```
import IPython
IPython.embed()
```
EOF