Installation




Installation for Mac OS X


We encourage users to download and use XtalOpt pre-compiled from here. However, you may continue reading if you wish to compile XtalOpt on your own.


Dependencies


First, and foremost, Mac OS X users must install Xcode to begin compiling the following programs. Xcode 8 or later is required because Apple did not start including some of the C++11 features that XtalOpt uses until then.

The following dependencies can be installed from the package manager MacPorts or Homebrew:

Using the package manager for your mac distribution, install the dependencies listed above. For example, using MacPorts,

port install git cmake qt5-mac qwt61 eigen libssh

or using Homebrew,

brew install git cmake qt5 qwt eigen libssh

Source Installations


None. Before release 11, XtalOpt needed Open Babel and Avogadro. But there are currently no source installations required.


XtalOpt

Once the dependencies are installed, installing XtalOpt is simple. First, change to your source directory:

cd $HOME/src

Check out the master branch of the XtalOpt sources:

git clone git://github.com/xtalopt/XtalOpt.git xtalopt

Make a build directory and enter it:

mkdir xtalopt/build
cd xtalopt/build

For Homebrew and at the time of writing this, Qt5 and Qwt headers are not included in the $PATH, and cmake will not find them. So we must show cmake where they are. Thus, we need to add the next few lines of code before running cmake. Set the CMAKE_INSTALL_PREFIX to wherever you'd like:

      export CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_PREFIX_PATH=/usr/local/opt/qt/"
      export CMAKE_FLAGS="$CMAKE_FLAGS -DQWT_INCLUDE_DIR=/usr/local/opt/qwt/lib/qwt.framework/Headers"
      export CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=<wherever>"
Configure, build, and install:

cmake ${CMAKE_FLAGS} ..
make -j3
sudo make install

Note: if you need to use Kerberos authentication to establish a SSH connection to the remote server, the libssh library used by XtalOpt will not work. There is a workaround for Linux (and possibly Mac) users, which will call the command line ssh/scp commands to communicate with the remote cluster. This can be enabled by adding -DUSE_CLI_SSH=true to the cmake command above. This ssh backend will not prompt for a password, and expects the ssh commands to "just work". Passwordless ssh logins can be enabled using the ssh-copy-id command.


XtalOpt is now installed.


Test the installation

An xtalopt.app directory will be created wherever your cmake install prefix pointed to. You can test the program by opening this .app file. If it opens successfully and the dialog box appears, you have successfully installed XtalOpt.