| 1 |
________________________________________________________________________ |
| 2 |
|
| 3 |
* * * README & INSTALL file for XCRYSDEN * * * |
| 4 |
________________________________________________________________________ |
| 5 |
|
| 6 |
|
| 7 |
XCrySDen web site is http://www.xcrysden.org/. The code can be |
| 8 |
downloaded either as source or compiled package. |
| 9 |
|
| 10 |
The pre-compiled package is available in two flavors for GNU/Linux, |
| 11 |
named as shared and semishared. Both packages use dynamic |
| 12 |
(i.e. shared) libraries, the difference being that the semishared |
| 13 |
package has several needed shared libraries included within itself |
| 14 |
(i.e. Tcl/Tk, Togl, Mesa, Glu. and FFTW), thus hopefully diminishing |
| 15 |
the software requirements. |
| 16 |
|
| 17 |
XCRYSDEN may be included in several OS distributions, hence you may |
| 18 |
first check if it exists for your distribution. If it does then it is |
| 19 |
recommended to use it (e.g. on GNU/Linux Debian based system you can |
| 20 |
install xcrysden as: sudo apt install xcrysden). If xcrysden is not |
| 21 |
available for your distribution, then read below instructions how to |
| 22 |
compile the source package. |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
________________________________________________________________________ |
| 27 |
|
| 28 |
INSTALLATION INSTRUCTIONS |
| 29 |
________________________________________________________________________ |
| 30 |
|
| 31 |
1. Installing the compiled package |
| 32 |
2. User customization |
| 33 |
3. Compiling the source package |
| 34 |
|
| 35 |
|
| 36 |
________________________________________________________________________ |
| 37 |
|
| 38 |
1.) HOW TO INSTALL THE COMPILED PACKAGE |
| 39 |
________________________________________________________________________ |
| 40 |
|
| 41 |
|
| 42 |
The compiled package does not require the compilation, hence its |
| 43 |
installation is fairly simple. |
| 44 |
|
| 45 |
-- |
| 46 |
FOR IMPATIENT: minimal installation instructions |
| 47 |
-- |
| 48 |
|
| 49 |
1. unpack the xc-VERSION.tar.gz package file |
| 50 |
e.g., as: tar zxvf xc-VERSION.tar.gz |
| 51 |
or: gunzip -c xc-VERSION.tar.gz | tar xvf - |
| 52 |
|
| 53 |
2. cd into the so-created directory (i.e., cd xcrysden-VERSION/) |
| 54 |
|
| 55 |
3. launch the program as "./xcrysden" |
| 56 |
|
| 57 |
Starting from XCrySDen-1.5, the use of XCRYSDEN_TOPDIR environmental |
| 58 |
variable is deprecated, because it was a source of confusion for many |
| 59 |
users. Consider to unset it in case it was defined during the |
| 60 |
installation of previous versions. |
| 61 |
|
| 62 |
Optionally, XCRYSDEN_SCRATCH environmental variable can be defined. |
| 63 |
It is the place where XCrySDen writes scratch (temporary) files. If |
| 64 |
the variable is not defined the /tmp/ directory will be used. |
| 65 |
|
| 66 |
BEWARE: If an older XCrySDen version is already installed and |
| 67 |
XCRYSDEN_TOPDIR variable defined then you need to manually unset (or |
| 68 |
update) the XCRYSDEN_TOPDIR variable definition in your profile !!! |
| 69 |
|
| 70 |
|
| 71 |
________________________________________________________________________ |
| 72 |
|
| 73 |
2.) USER CUSTOMIZATION |
| 74 |
________________________________________________________________________ |
| 75 |
|
| 76 |
|
| 77 |
XCrySDen can be user-customized manually. For this reason create |
| 78 |
$HOME/.xcrysden/ directory and copy the "Tcl/custom-definitions" and |
| 79 |
optionally "Tcl/Xcrysden_resources" there (the Tcl/ is a subdirectory |
| 80 |
in the XCrySDen root directory). These can be then modified according |
| 81 |
to user preference. |
| 82 |
|
| 83 |
Starting from XCrySDen-1.5, the use of './xcConfigure' is deprecated |
| 84 |
(it has caused more problems than advantages). |
| 85 |
|
| 86 |
For more info about customization, see: http://www.xcrysden.org/doc/custom.html |
| 87 |
|
| 88 |
|
| 89 |
________________________________________________________________________ |
| 90 |
|
| 91 |
3.) HOW TO COMPILE THE SOURCE PACKAGE |
| 92 |
________________________________________________________________________ |
| 93 |
|
| 94 |
|
| 95 |
3.1 SOFTWARE REQUIREMENTS: |
| 96 |
|
| 97 |
XCrySDen depends on several libraries, in particular: |
| 98 |
- Tcl/Tk |
| 99 |
- OpenGL (e.g., Mesa and Glu) |
| 100 |
- Togl (2.0 or later) |
| 101 |
- FFTW3 |
| 102 |
- BWidget |
| 103 |
|
| 104 |
The compilation of XCrySDen requires the development versions of these |
| 105 |
and other libraries (see system/README), because not only the library |
| 106 |
files, but also their header files are required. To aid at easier |
| 107 |
compilation, these libraries will be automatically downloaded from the |
| 108 |
web if so instructed (see below). Alternatively, these can be download |
| 109 |
from: |
| 110 |
|
| 111 |
Tcl/Tk: http://prdownloads.sourceforge.net/tcl/ |
| 112 |
Mesa: ftp://ftp.freedesktop.org/pub/mesa/ |
| 113 |
Togl: https://sourceforge.net/projects/togl/files/Togl/2.0/ |
| 114 |
FFTW: http://www.fftw.org/download.html |
| 115 |
BWidget: http://sourceforge.net/projects/tcllib/files/BWidget/ |
| 116 |
|
| 117 |
In addition to these libraries, also the X11 libraries are needed for |
| 118 |
compilation. |
| 119 |
|
| 120 |
[ NOTICE: during the compilation the required BWidget package (small |
| 121 |
size) will be always automatically donwloaded from: |
| 122 |
http://sourceforge.net/projects/tcllib/files/BWidget/ ] |
| 123 |
|
| 124 |
|
| 125 |
3.2 COMPILATION: |
| 126 |
|
| 127 |
First read the system/README file. It is the easiest to compile the |
| 128 |
shared version of xcrysden (because it is more easy to install |
| 129 |
software dependencies with a package manager system, such as apt or |
| 130 |
dnf, then to compile needed libraries from sources). |
| 131 |
|
| 132 |
To compile XCrySDen sources the "Make.sys" file must exist in the |
| 133 |
package root directory. Templates can be find in system/ |
| 134 |
sub-directory. Copy an appropriate template file as, e.g.: |
| 135 |
|
| 136 |
$ cp ./system/Make.sys-shared Make.sys |
| 137 |
|
| 138 |
and edit the "Make.sys" to suit your needs. |
| 139 |
|
| 140 |
If you want the compilation to automatically download and compile the |
| 141 |
external library sources (Tcl/Tk, Mesa, Togl, FFTW) define |
| 142 |
"COMPILE_ALL = yes" (see system/Make.sys-semishared for more details). |
| 143 |
|
| 144 |
Then compile as: |
| 145 |
|
| 146 |
$ make all |
| 147 |
|
| 148 |
If everything went well and compilation was fully successful, you have |
| 149 |
a usable xcrysden. Try: ./xcrysden; if it works that's it. |
| 150 |
|
| 151 |
To make xcrysden loadable from a terminal, you can create an alias |
| 152 |
(e.g. alias xcrysden=$XCRYSDEN_TOPDIR/xcrysden) or make a symbolic |
| 153 |
link so that xcrysden will be on your PATH |
| 154 |
(e.g. ln -s $XCRYSDEN_TOPDIR/xcrysden /usr/local/bin), where |
| 155 |
$XCRYSDEN_TOPDIR is the root directory of xcrysden. |
| 156 |
|
| 157 |
|
| 158 |
3.3 INSTALLING SYSTEM WIDE (shared flavor only): |
| 159 |
|
| 160 |
XCrySDen (shared-flavor of compilation only) can be installed |
| 161 |
system-wide as: |
| 162 |
|
| 163 |
$ make install |
| 164 |
|
| 165 |
By default this will install the package into /usr/local/. The |
| 166 |
installation directory can be changed by invoking "make install" as: |
| 167 |
|
| 168 |
$ prefix=/MY/INSTALLATION/DIR make install |
| 169 |
|
| 170 |
where /MY/INSTALLATION/DIR stands for installation directory. This will |
| 171 |
install the package into ($prefix/bin/xcrysden, $prefix/lib/xcrysden/, |
| 172 |
$prefix/share/xcrysden/). |
| 173 |
|
| 174 |
|
| 175 |
3.4 TROUBLE SHOOTING: |
| 176 |
|
| 177 |
If the installation has failed for some reason then read the printed |
| 178 |
error message. |
| 179 |
|
| 180 |
Also read carefully the instructions inside the "Make.sys" and edit |
| 181 |
the file according to your needs. |
| 182 |
|
| 183 |
The most often cause of failure is that either some header files were |
| 184 |
not found or that there are some missing references, which means that |
| 185 |
the code will have to be linked against additional libraries. |
| 186 |
|
| 187 |
If the failure appeared in compilation of external library, then try |
| 188 |
to compile this library manually, i.e., do "cd external/src/LIB", |
| 189 |
where LIB is the corresponding library directory, and read the |
| 190 |
installation instructions therein. |
| 191 |
|
| 192 |
In case of unsolvable problems, first google for help and only then |
| 193 |
ask for help on XCrySDen mailing list ([email protected], |
| 194 |
http://www.democritos.it/mailman/listinfo/xcrysden). |
| 195 |
|
| 196 |
|
| 197 |
-- |
| 198 |
Anton Kokalj ([email protected]), Thu Aug 8 2019 |