-
Download OpenMX package version 3.9.9 from http://www.openmx-square.org/download.html.
-
Install the dependent environment of the original OpenMX. Check that the original OpenMX can be installed successfully.
-
Install HDF5 1.12.1 for C language.
-
Apply the 'overlap only' patch. Copy patch files
overlap_only_patch/openmx.c
andoverlap_only_patch/truncation.c
to the source directory of the original OpenMX (openmx3.9/source
). -
Edit
makefile
in the source directory of the original OpenMX. Add-I${HDF5_path}/include -L${HDF5_path}/lib
at the end of theCC
in the originalmakefile
, with${HDF5_path}
replaced by the HDF5 path; add-lhdf5
at the end of theLIB
in the originalmakefile
. Notice: depending on installation setup, the library path may be${HDF5_path}/lib
or${HDF5_path}/lib64
. -
Run
make
command to install:make clean make all make install
Executable file
openmx
can be found in the source directory.
-
Before running 'overlap only' OpenMX, the path to the HDF5 shared objects must be added to the runtime library search path. For example,
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HDF5_path}/lib
with
${HDF5_path}
replaced by the HDF5 path. Notice: depending on installation setup, the library path may be${HDF5_path}/lib64
or${HDF5_path}/lib64
. -
Perform the 'overlap only' program like the original OpenMX. For example, for overlap matrices of magic angle twisted bilayer graphene (MATBG), move to the directory
examples
of current repository, edit your path to the VPS and PAO (openmx3.9/DFT_DATA19
) forDATA.PATH
keyword in fileMATBG.dat
, and run:mpirun -np 1 ${openmx_path} MATBG.dat > openmx.std
with
${openmx_path}
replaced by the path of installed 'overlap only' OpenMX. The overlap matrices could be found in theoutput
directory in the format of HDF5.