rm exe
[unres.git] / INSTALL
1 Guide to installation of the UNRES package and its components
2
3 ***************************
4 1. General information
5 ***************************
6
7 The most convenient way to install the package is using Cmake, as described 
8 in section 2. If your system does not run the required version of Cmake or
9 installation does not work, do step-by-step compilation of the components
10 of the package, as described in section 3.
11
12 === Requirements ===
13
14  -- C compiler
15  -- Fortran compiler (must understant the Fortran 77 instructions)
16  -- MPI (for CSA and MREMD)
17
18 ***************************
19 2. Installation using cmake
20 ***************************
21
22 === Requirements ===
23
24  -- CMake 2.8.0 or later
25  -- C compiler 
26  -- Fortran compiler
27  -- MPI (for CSA and MREMD)
28
29 === Basic Installation ===
30
31 These instructions give a very basic overview of how to configure, compile and
32 install UNRESPACK on most systems.  If you are using unique install locations
33 and/or libraries that are not automatically detected please consult the 'Advanced'
34 section.
35
36 1. Create a 'build' directory in the package source directory.
37
38    mkdir build
39    cd build
40
41 2. Configure the build system
42
43    cmake ..
44
45 3. Compile
46
47    make 
48
49 4. Install
50
51    sudo make install
52
53
54 === Advanced ===
55
56 The build system (CMake) provides mechanisms for specifying non-standard
57 build parameters.
58
59
60 Compilers & installation
61 ------------------------
62    
63    -DCMAKE_Fortran_COMPILER=xxx equal to name of Fortran Compiler you wish to use 
64      (ifort, gfortran)
65
66    -DCMAKE_INSTALL_PREFIX=xxx specify the binaries installation prefix
67                             (default UNRESPACK_source_dir/bin)
68
69 Force-fields
70 ------------
71
72    -DUNRES_MD_FF=xxx  compiles the MD versions with given force field. 
73      Options are: GAB, E0LL2Y. Default: GAB
74
75    -DUNRES_CSA_FF=xxx compiles the CSA versions with given force field
76      Options are: CASP3, ALPHA, BETA, ALPHABETA, CASP5, 3P, 4P. Default: 4P.
77
78 Please read the online documentation on force fields available at 
79  http://unres.eu/unres#SECTION00090000000000000000
80   
81
82 MPI 
83 ---
84
85 MPI implementation on your system should be automatically detected ("MPI Found" 
86 message after runing cmake). If not you have two options:
87
88 1. Try setting the path to you MPI wrapper implementation
89
90    -DMPI_Fortran_COMPILER=xxx MPI wrapper
91
92 2. If option 1 fails or your MPI implementation does not come with a compiler wrapper 
93    try setting both the MPI include and library paths manually. This will circumvent
94    autodetection entirely. 
95
96    -DMPI_Fortran_INCLUDE_PATH=xxx
97    -DMPI_Fortran_LIBRARY="xxx"
98
99 ****************************
100 3. Step-by-step installation
101 ****************************
102
103 For this installation, you will need to visit each source directory (see doc/UNRESPACK.txt
104 for directory structure). Specific installation instructions are in the documentation of 
105 of the particular components of the package (UNRES, WHAM, CLUSTER, XDRFPDB). Only general
106 instructions are given here.
107
108 1. Go to the respective source directory.
109
110 2. Determine if any of the Makefiles present there matches your needs. The Makefiles for
111 Inter Fortran and Gnu Fortran are present everywhere and are guaranteed to work (provided
112 that your compiler/MPI installation is correct). Use this Makefile as the working Makefile
113
114 If your system uses a different compiler, copy the most matching Makefile to your working
115 Makefile (e.g., to Makefile_CRAY if you'll be working with Cray Fortran).
116
117 3. Make a symbolic link of the working Makefile to Makefile, e.g.,
118
119 ln -s Makefile_gfortran Makefile
120
121 Before that, you'll need to remove the existing symbolic link (in the distribution, it
122 points to Makefile_ifort). 
123
124 4. Edit the Makefile to define MPI location, libraries, and the binaries directory
125 and executalble names, if you want to use different location/names from those in the
126 distribution Makefiles. The present locations are the subdirectories of the bin 
127 directory and executable names include package component, compiler, MPI information,
128 and force field, e.g. unres_csa_gfort_MPICH_4P.exe stands for the CSA component, 
129 compiled with GNU Fortran in a parallel mode (using MPICH) to run calculations with
130 the 4P force field.
131
132 5. For the components of XDRFPDB and in the directory cluster/unres/src, say
133
134 make
135
136 In other directories say
137
138 make <force_field>
139
140 to create the respective executable.
141
142 The compiler flags are specified for the 4P (also covers the 3P, and CASP5 ff),
143 GAB (also covers E0G), and E0LL2Y force fields for all components; the CASP3 force field
144 is also specified for the CSA and MINIM component.