Compilation Tutorial of AmberTools17 under Windows


  • Prerequisites for compilation

Install gcc, gfortran, tar, tcsh, make

  • Compile and install

1. Download the installation file
Go to the official website to download the installation file AmberTools17.tar.bz2, you need to leave an email.

2. Unzip the installation file
tar jxvf AmberTools17.tar.bz2
Get catalog amber16.

3. Enter the installation directory
cd amber16
As you can see, there are directories under this path
Include file

4. Set the AMBERHOME environment variable
export AMBERHOME='pwd'
We are already in the amber16 directory, so just use the current path.

5. Configure the build environment
./configure-cygwin-noX11 gnu

There are many configuration options, we only use the simplest.

It will be automatically updated during configuration. If you don't want to update, or update errors, you can use the --no-updates option to turn off the update.

The built-in python script will be installed by default, if you don't want to install it, you can use --skip-python to close

After the configuration starts, it will check whether the compilation environment is normal. The most time-consuming and error-prone parts are the NetCDF and fftw parts. The NetCDF library has both a Fortran interface and a C interface. It can also be closed. But according to our test, if it is closed NetCDF, later compilation of cpptrj and 3drism will not succeed, and may cause other problems, so try to open it as much as possible.

6. Source installation script
If you use another shell, source the corresponding script.

7. Installation
make install
The longest time-consuming and the most error-prone areas. The following are some of the errors and solutions:
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lquadmath
The libquadmath.a library was not found, and the reason is unknown. Copy it to ./lib manually.
misc_utils.c:22:22: Fatal error: execinfo.h: No such file or directory
The Linux-specific system function is called here, not under cygwin. Comment out line 22 of misc_utils.c, the function print_backtrace only keeps one sentence fprintf(stderr, "Error: signal %d\n",signal);

8. Other settings
After the installation is complete, all executable programs are under ./bin. These programs are divided into two categories, one is a real executable program (binary), and the other is a script that wraps executable programs. Although their extension is also .exe, the corresponding real binary program is in ./bin/to_be_dispatched. Therefore, if it is not used in a shell, the second type cannot be called directly. The simple solution is to use all of them directly Binary program, and set the corresponding environment variables. Of course, you can also change those scripts to Windows batch scripts, or use shell calls.

The compiled program also needs several library files cygwin1.dll, USER32.dll, cyggfortran-3.dll when executing. Therefore, when publishing these programs, copy these three files to ./bin and release them together, otherwise It may not run on a computer without these library files.

When these programs are in use, most of them need the AMBERHOME environment variable.

When using reduce.exe, you need to set the environment variable REDUCE_HET_DICT="$AMBERHOME/dat/reduce_wwPDB_het_dict.txt"

When nab.exe is used, you need to add ${AMBERHOME}/lib to LD_LIBRARY_PATH

* For Research Use Only.