No rule to make target `pyamff_fortran/*.f90′, needed by `pyamff_fortran/*.o’.

If you are having this error during your compilation with VASP-6.4.2 and VTST, if you are encountering the error

error message;
No rule to make target `pyamff_fortran/*.f90', needed by `pyamff_fortran/*.o'. Stop.

Solution

Make sure you have updated the LIB in makefile inside src/

# vim /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src/makefile
LIB=lib parser pyamff_fortran

For more information, do take a look at Configuring VTST with VASP-6.4.2 with Intel 2023.1

Configuring VTST with VASP-6.4.2 with Intel 2023.1

Taken from VTST.Tools Installation Guide

The VTST•Tools has a Fortran component which can be linked into the VASP code as well as a collection of scripts.

Step 1: Download the VTST Code

Download the VTST Code (vtstcode.tgz) at http://theory.cm.utexas.edu/vtsttools/download.html 

Step 2: Building VTST code into VASP

To install, download the files in vtsttools/vtstcode, choose a version, and copy the files in the directory into your vasp source directory. The file chain.F is replaced, so back up the old version. There are other files in the package: neb.F, dynmat.F, dimer.F, lanczos.F, sd.F, cg.F, qm.F, lbfgs.F, bfgs.F, fire.F, and opt.F in and vtstcode6.4/ directories. The vtstcode6.4/ directory contains another file called ml_pyamff.F and directory named pyamff_fortran/, which interface to a machine learning package PyAMFF.

In my situation, I put it in /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src

$ cd /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src
$ tar -zxvf vtstcode-198.tgz
$ cd vtstcode-198/vtstcode6.4
$ cp -Rv * /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src

Step 3: Find the variable SOURCE in the .objects file (a hidden file in src/)

Find the variable SOURCE in the .objects file (a hidden file in src/), which defines which objects will be built, and add the following objects before chain.o:

$ cd /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src
$ ls -al .objects
$ vim .objects

Around line 126, before chain.o, insert the following

bfgs.o dynmat.o instanton.o lbfgs.o sd.o cg.o dimer.o bbm.o \
fire.o lanczos.o neb.o qm.o \
pyamff_fortran/*.o ml_pyamff.o \
opt.o

Step 4: Update the LIB in makefile inside src/

# vim /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src/makefile
LIB=lib parser pyamff_fortran

To be continued with VASP Installation later.