-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL.txt
More file actions
236 lines (161 loc) · 7.89 KB
/
Copy pathINSTALL.txt
File metadata and controls
236 lines (161 loc) · 7.89 KB
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
*httk* Installation Instructions
********************************
The High-Throughput Toolkit (httk)
Copyright 2012 - 2018, Rickard Armiento, et al.
For License information see the file LICENSE.txt.
Contact: httk [at] openmaterialsdb.se
=====================================================================
Installation
============
There are a few alternative ways to download and install *httk*. Httk
presently consists of a python library and a few programs. If you just
want access to use the python library, and do not need the external
programs, the install is very easy.
Note: for *httk* version 2.0 we will go over to a single program
('python endpoint') "httk", for which the pip install step should be
sufficient to get a full install.
(There are also separate instructions below for advanced users that
want to do a direct manual install without the Python pip installed.)
Alternative 1: Install via pip to just access the python library
----------------------------------------------------------------
1. You need Python 2.7 and access to pip in your terminal window. (You
can get Python and pip, e.g., by installing the Python 2.7 version
of Anaconda, https://www.anaconda.com/download, which should give
you all you need on Linux, macOS and Windows.)
2. Issue in your terminal window:
pip install httk
If you at a later point want to upgrade your installation, just
issue:
pip install httk --upgrade
You should now be able to simply do "import httk" in your python
programs to use the *httk* python library.
Alternative 2: Install via pip for python library + binaries + ability to develop *httk*
----------------------------------------------------------------------------------------
1. In addition to Python 2.7 and pip, you also need git. You can get
git from here: https://git-scm.com/
2. Issue in your terminal window:
git clone https://github.com/rartino/httk
cd httk
pip install --editable . --user
If you at a later point want to upgrade your installation, just go
back to the *httk* directory and issue:
git pull
pip install . --upgrade --user
3. To setup the paths to the *httk* programs you also need to run:
source /path/to/httk/init.shell
where "/path/to/httk" should be the path to where you downloaded
*httk* in the steps above. To make this permanent, please add this
line to your shell initialization script, e.g., ~/.bashrc
You are now ready to use *httk*.
Notes:
* The above instructions give you access to the latest stable
release of httk. To get the latest developer relase (which may or
may not work), issue:
git checkout devel
pip install . --upgrade --user
in your httk directory. To switch back to the stable release, do:
git checkout master
pip install . --upgrade --user
* An alternative to installing with "pip install" is to just run
httk out of the httk directory. In that case, skip the pip
install step above and just append "source
~/path/to/httk/init.shell" to your shell init files, with
"~/path/to/httk" replaced by the path of your httk directory.)*
Alternative 3: For experienced users: direct manual install
-----------------------------------------------------------
If you are somewhat familiar with the command line in Linux, Unix,
MacOSX or cygwin, and don't want to mess with python, all you need to
do is download the archive (see:
http://httk.openmaterialsdb.se/downloads.html ) uncompress it in a
directory of your choosing, and configure your environment in your
environment init file (.bashrc or .cshrc) either by inserting "source
/path/to/.../httk/init.shell" or by inserting instructions that adds
the "httk/bin" directory to your "PATH" environment variable, and the
"httk" directory to your "PYTHONPATH" environment variable.
That is all that is needed. As your first test, you can try to run
"Examples/0_import_httk/0_import_httk.py". (Please be aware that the
first time you run this command it can be rather slow, since python is
creating "*.pyc" files for all httk modules.)
Alternative 4: Step-by-step instructions for installation from archive
----------------------------------------------------------------------
Find the latest relase download at this link:
https://github.com/rartino/httk/releases/latest, and get the link to
the "httk-<version>.tgz" archive.
Run the following in a terminal:
mkdir -p ~/bin/python
cd ~/bin/python
curl -L <download link> --output httk-<version>.tgz
tar -zxf httk-<version>.tgz
rm -f httk-<version>.tgz
where you have to fill in <download link> and <version> according to
the release page.
The archive extaction (tar -zxf) will have created a subdirectory
named after the actual version of httk that you downloaded. Check this
with the command "ls". Lets say you see "httk-1.1.2", then do the
following:
ln -f -s httk-1.1.2 httk-latest
source ~/bin/python/httk-latest/init.shell
If you add the very last line to your ".bashrc" and/or ".cshrc", httk
will work in all new terminals you open. (Or alternatively, just add
"~/bin/python/httk-latest/bin/" to your "PATH" environment variable,
and "~/bin/python/httk-latest" to your PYTHONPATH environment
varibale.) If you cannot figure out how to do this on your system, you
will have to re-run "source ~/bin/python/httk-latest/setup.shell"
every time you want to use httk.
You can now start using httk. There is no further compiling, etc.
required.
As your first test, you can try to run:
~/bin/python/httk-latest/Examples/0_import_httk/0_import_httk.py
This program simply loads the httk library and prints out its version,
if everything works. Please be aware that the first time you run this
command it can be rather slow, since python is creating "*.pyc" files
for all httk modules.
Upgrade manual installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This assumes you have followed the step-by-step installation
instructions above. To upgrade, first check what version you presently
have with:
ls ~/bin/python/
(look for the highest numbered httk-* directory)
Then find the latest relase download at this link:
https://github.com/rartino/httk/releases/latest, and get the link to
the ".tar.gz" archive.
Then do this:
cd ~/bin/python
rm -f httk-latest.tgz
curl -L <download link> --output httk-<version>.tar.gz
tar -zxf httk-<version>.tgz
rm -f httk-<version>.tar.gz
If the new version is, e.g., v1.1.3):
cp httk-latest/httk.cfg httk-1.1.3/httk.cfg
ln -f -s httk-1.1.3 ../httk-latest
This concludes the upgrade.
Download Source code
====================
The source code of *httk* is available at github:
https://github.com/rartino/httk
An archive of the source code of the latest version can be downloaded
here: https://github.com/rartino/httk/releases/latest
Windows
=======
These instructions may be expanded in the future. For now, what you
need to do is download cygwin and when aksed what software to install,
include
wget, python
After cygwin is installed, start a cygwin terminal and follow the
instructions above.
Optional configuration
======================
Edit the "httk.cfg" file in the httk directory to configure paths to
other software that you want to use from httk. For programs (e.g.,
"isotropy") you want the path to point at the executable. For python
libraries, you want the path setting to point at the directory you
would include in "PYTHONPATH", i.e., a directory that typically
contains a subdirectory with the name of the package.
Note: if you don't have certain software, don't worry, just leave the
line blank. If you have some libraries installed in the system (e.g.
'import ase' works), then you can also leave the lines blank. If you
want to make sure *not* to use system libraries, set
allow_system_libs=no (this is useful if you are forced to work on a
machine with too old versions installed in the system)
Now you should read relevant parts of README.txt and look at the Tutorial/ and/or Examples/ programs.