-
Visit the Tinker website, and determine the current version number, e.g., 25.5. Download the Tinker Package Distribution and the Tinker Executables for Linux.
$ cd {download_dir}
$ curl -OR https://dasher.wustl.edu/tinker/downloads/tinker-25.5.tar.gz
$ curl -OR https://dasher.wustl.edu/tinker/downloads/bin-linux-25.5.tar.gz
-
If not yet installed, install gfortran. While not necessary, it is useful to also install the locate command and initialize its database, so that local libraries can be found for linking.
$ su
# yum install gfortran mlocate
# updatedb
# exit
- Extract distribution
$ su
# cd /usr/local
# tar xvf {download_dir}/tinker-25.5.tar.gz
# chown -R root:root tinker
- Copy and update the Makefile
# cd /usr/local/tinker
# cp make/Makefile source/
cp: overwrite 'source/Makefile'? y
# cd source
# vi Makefile
Update the TINKERDIR location
#TINKERDIR = $(HOME)/tinker
TINKERDIR = /share/apps/tinker
Verify LINKDIR location
LINKDIR = /usr/local/bin
If necessary, uncomment the definitions in the following section, and comment out all other definition sections
OS Type: Generic Linux
Compiler: GNU gfortran 13.3
- Compile Tinker
# make
-
Fix link errors
At this point, you will likely get some errors that need to be resolved. These are typically related to incompatible or mixed versions of libraries being linked to the compiled object files when creating the executables.
...
$ gfortran -O3 -fopenmp -static-libgcc -o alchemy.x -L. -L/share/apps/tinker/lib/linux -Wl,--no-as-needed -ldl -L/share/apps/tinker/fftw/lib alchemy.o libtinker.a -lfftw3_threads -lfftw3
...
/bin/ld: libtinker.a(epolar.o): in function `epolar0b_._omp_fn.0':
epolar.f:(.text+0x1522): undefined reference to `_gfortran_os_error_at'
...
collect2: error: ld returned 1 exit status
An "undefined reference to `__isoc23_strtoul'" error is due to your system not having glibc vesion 2.38 or later, which is assumed by the libraries included with Tinker version 25+ distributions.
An "undefined reference to `_gfortran_os_error_at'" error is due to your system's gfortran compiler being an earlier that the fortran runtime library included with Tinker version 25+ distributions.
Changing the following symbolic links instructs the gfortran linker to use libraries that are compatible with earlier versions of glibc
cd /usr/local/tinker/lib/
cp -pr linux linux.000
cd linux
rm libfftw3.a; ln -s libfftw3.a-gnu-9.4.0 libfftw3.a
rm libfftw3_omp.a; ln -s libfftw3_omp.a-gnu-9.4.0 libfftw3_omp.a
rm libfftw3_threads.a; ln -s libfftw3_threads.a-gnu-9.4.0 libfftw3_threads.a
rm libgcc.a; ln -s libgcc.a-gnu-9.4.0 libgcc.a
rm libgfortran.a; ln -s libgfortran.a-gnu-9.4.0 libgfortran.a
rm libgomp.a; ln -s libgomp.a-gnu-9.4.0 libgomp.a
rm libquadmath.a; ln -s libquadmath.a-gnu-9.4.0 libquadmath.a
To match your system's gfortran compiler, locate the system fortran compiler and change the symbolic link to point to it.
# locate libgfortran.so
...
/usr/lib64/libgfortran.so.5.0.0
...
# rm libgfortran.a; ln -s /usr/lib64/libgfortran.so.5.0.0 libgfortran.a
Once the proper libraries on your system are linked in, the make should successfully complete resulting in executable files
# make
...
# ls *.x
alchemy.x dynamic.x monte.x potential.x spectrum.x torsfit.x
...
document.x molxyz.x poledit.x spacefill.x timer.x xyzpdb.x
-
Copy the executables to the Tinker bin directory, and remove the .x extension
# cd /usr/local/tinker
# cp -p source/*.x bin/
# cd bin
# for f in *.x; do mv "$f" "${f%.x}"; done
# ls
0README distgeom minrigid path radial testpol vibrot
...
diffuse minirot optrigid pssrot testpair vibrate
- Run a test job from the command line
# exit
$ cp /usr/local/tinker/example/benzene.* ~/
$ vi benzene.key
(Edit the parameters line to point to /usr/local/tinker/params/mm3)
$ /usr/local/tinker/bin/analyze.x benzene
- Configure WebMO to use Tinker as a computational engine
- Login to WebMO as user 'admin'
- Click 'Interface Manager' to enable the interfaces to any computational chemistry packages that you have installed on your system
- Click the 'Enable' icon for Tinker
- Click the 'Edit' icon to configure the Tinker interface
- Verify that the entries are correct; if necessary, edit entries and click Submit
- Tinker version: 25.5
- Tinker binary directory: /usr/local/tinker/bin
- Tinker binary extension: x
- Tinker parameter directory: /usr/local/tinker/params
- Click 'Return', 'Return to Admin', and 'Logout' to exit the WebMO administration page
- Login as a WebMO user, and run a test job using Tinker as the computational engine
- Workarounds
-
If link errors occur related to using the pre-compiled versions of libfft3.a, compile versions of this package locally. the source code is in tinker/fftw, and compilation directions are given in README0. Then adjust the symbolic links in tinker/lib/linux to point to these newly compiled libraries.
-
If using the g77 compiler, make the following changes in openend.f:
c open (unit=iunit,file=name,status='old',position='append')
open (unit=iunit,file=name,status='old',access='append')