forked from sharc-md/sharc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
169 lines (109 loc) · 4.99 KB
/
INSTALL
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
#******************************************
#
# SHARC Program Suite
#
# Copyright (c) 2023 University of Vienna
#
# This file is part of SHARC.
#
# SHARC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SHARC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SHARC. If not, see <http://www.gnu.org/licenses/>.
#
#******************************************
Installation Instructions
*************************
Basic Installation
==================
1. SHARC binaries
All you need to install sharc on a Linux system is a Fortran90 compatible
compiler (this release is tested against gfortran 4.4.7 and ifort 15.0)
as well as working blas, lapack and fftw3 libraries. The versions which come
with your Linux distribution should be sufficient. IF you want to use your
own numerical libraries (like MKL etc), please change the corresponding
LD variable within the Makefile.
To compile the fortran source code, just unzip the distribution
unzip sharc.zip
This should create a new directory called sharc which contains all
the necessary subdirectories and files.
Now go to the source directory
cd sharc/source
and edit the Makefile by adjusting the
USE_PYSHARC
USE_COMPILER
USE_LIBS
variables. It might also be necessary to modify other parts of the Makefile,
e.g., the F90 and CC variables.
Issuing the command:
make
will compile the source and create all the binaries.
make install
will copy the binary files into the sharc/bin/ directory of the
Sharc distribution, which already contains all the python scripts which
come with sharc.
In oder to use the binaries together with the python scripts,
set the $SHARC environment variable to the bin directory of the
sharc distribution, e.g. if you have unpacked sharc into your $HOME directory,
just set:
export SHARC=~/sharc/bin (for bourne shell users)
or
setenv SHARC $HOME/sharc/bin (for c-shell type users)
Note that it is advisable to put this line into your shell's login
scripts.
Alternatively, the sharcvars.sh/sharcvars.csh files can be used to set the SHARC
environment variable.
It is also advisable to check whether all files in bin/ are flagged as executable. Otherwise, say
chmod +x *
to make them executable.
2. PySHARC installation
For fast, I/O-free SHARC simulations with model potentials, you can use pysharc.
To install this, modify the sharc/source/Makefile, then go to sharc/pysharc,
modify sharc/pysharc/Makefile and sharc/pysharc/netcdf/Makefile,
and then issue the command inside sharc/pysharc:
make
in this directory.
Again, "make install" places all binaries in the appropriate places.
Note that in sharc/source/Makefile, the USE_PYSHARC option needs to set to "true".
Also note that to compile PySHARC requires an ANACONDA installation with several
libraries, as noted in the manual.
3. WFoverlap binaries
In order to install the wfoverlap program, which is necessary for many functionalities in SHARC, go to the respective source directory
cd sharc/wfoverlap/source
edit the Makefile appropriately, and issue the command:
make wfoverlap_ascii.x
If you have the COLUMBUS-MOLCAS interface installed on your system, set $COLUMBUS and then
make wfoverlap.x
to compile the full version of wfoverlap.x (only needed for SHARC dynamics with COLUMBUS and Dyson norm computations with MOLCAS).
Note that if you only compile wfoverlap_ascii.x, then make will create a symbolic link wfoverlap.x pointing to wfoverlap_ascii.x.
4. Test calculations
Now you are ready to run your first surface hopping trajectory including
arbitrary couplings!
Maybe at this stage it is a good idea to take a look at the test suite.
The easiest way to run some basic tests is to execute $SHARC/tests.py,
which will test the fundamental functionality of SHARC.
To test the wfoverlap installation, go to sharc/wfoverlap/source and say
make test
Installation for the experts
============================
Although the time consuming part of any ab initio molecular dynamics
simulation are the necessary quantum chemical calculations and thus
any BLAS/LAPACK version should be fine to link sharc against, adjusting
the Makefile to use a vendor provided version like MKL can easily be
done by exchanging the corresponding Makefile line
LD = -lblas -llapack -lfftw3
by something like
LD = -L/path/to/your/library -lmyblas -lmylapack -lmyfftw3
where /path/to/your/library points to the directory where your
library files are located and myblas, mylapack and myfftw3
have to be replace by the actual name of your numerical libraries.
To link against MKL, it should be sufficient to simply set
the USE_LIBS variable to "mkl".