2. Single-Node Setup

To enable support for a broader range of exchange-correlation functionals in RESCU, it is recommended to install LibXC. This library provides numerous exchange-correlation functionals beyond the built-in defaults.

  1. Download and Install LibXC

    Use the following commands to extract, compile, and install LibXC:

    tar -xzf libxc-4.3.4.tar.gz
    cd libxc-4.3.4
    ./configure --prefix=/home/zwt0516/repo/libxc-4.3.4 --disable-shared CFLAGS="-O3 -fPIC"
    make && make check && make install
    

    Tip

    Replace /home/zwt0516/repo/libxc-4.3.4 with your preferred installation path.

  2. Configure RESCU to Locate the Libraries

    To ensure RESCU can find the compiled libraries, create a file named libpaths.m in the RESCU root directory with the following contents:

    softroot  = '/home/zwt0516/.local';
    xc        = '/home/zwt0516/repo/libxc-4.3.4';
    

    Note

    Adjust the paths above to reflect your actual installation locations.

  3. Launch RESCU in MATLAB

    To run RESCU on a single node:

    • Open MATLAB.

    • Set the current working directory to the root folder of the RESCU package.

    • (Optional but recommended) Save your current MATLAB path before making any changes, so it can be restored later if needed.

    savepath folderName/pathdef.m
    

After that, clear the MATLAB path using the restoredefaultpath command as shown in Fig. 2.1. This prevents name space conflicts with other codes.

Fig. 2.1 Clean MATLAB path.

There are five directories in the RESCU package:

  • binRESCU binary.

  • docRESCU documentation.

  • examples — Input file examples.

  • license— License files.

  • srcRESCU source code.

Go to the src directory and type makeRESCU to install RESCU (as shown in Fig. 2.2).

Fig. 2.2 Build RESCU.

The End User License Agreement will be displayed and you will be prompted to accept the agreement. You can directly notify RESCU of your agreement by typing makeRESCU -agreeToLicense y.

Warning

makeRESCU will try to add RESCU permanently to the MATLAB path, but you may not have the permissions to do that. MATLAB path management is explained here or you can simply type addpath /path/to/rescu/src when launching MATLAB.

RESCU is now built and needs to be activated. To activate RESCU, sign up or sign in to your account on the Nanoacademic portal. Go to the product section and click on RESCU. Then click on the Start Your Free Trial button and you should see a panel like Fig. 2.3

Fig. 2.3 Generate RESCU license.

Download the file license.lic by clicking the download link and copy it to the directory $HOME/.nanoacademic/RESCU. Alternatively, you may copy it anywhere and set the environment variable RESCU_LICENSE_PATH as, say

export RESCU_LICENSE_PATH=/home/vincentm/licenses/license.lic

You can finally check that RESCU works properly by running one of the input files in the examples directory. For example,

rescu -i al_lcao_scf.input

Warning

You may have to modify the input file to let RESCU know where the required pseudopotential files are.

Note

If you want to compile RESCU to a standalone binary, please refer to this section Custom Standalone Build (Optional).

Instructions on more advanced configurations, including LAN and parallel installations, are found in Cluster Installation.