This thread is locked.Only browsing is available.
Top Page > Browsing
How to read *.scfout file?
Date: 2020/02/22 03:18
Name: Zafer Kandemir   <zaferkandemir35@gmail.com>

Dear Prof. Dr. Ozaki and OpenMX experts,

I install openmx program by using "sudo apt-get install openmx". (This is version 3.7.6.2).
My operating system is Ubuntu 18.04.
I calculated the Hamiltonian and overlap matrix elements for NiO_NC.dat.
I obtained NiO_NC.scfout file. However, this file is a binary, so I can't open it.
How can I read this file and obtain the Hamiltonian matrix elements?

I tried to compile the analysis_example file, but it gives error messages.
-----------------------
>>$ make analysis_example
mpicc -openmp -O3 -I/usr/local/include -I./liberi-091216/source analysis_example.o read_scfout.o -L/usr/local/lib -lfftw3 -llapack -lblas -lg2c -static -lm -o analysis_example
gcc: error: analysis_example.o: No such file or directory
gcc: error: read_scfout.o: No such file or directory
makefile:625: recipe for target 'analysis_example' failed
make: *** [analysis_example] Error 1
-----------------------
I would be grateful for your help.


Thanks
Best regards

Dr. Zafer Kandemir
Department of Physics
メンテ
Page: [1]

Re: How to read *.scfout file? ( No.1 )
Date: 2020/02/22 16:13
Name: Naoya Yamaguchi

Dear Dr. Zafer Kandemir,

SCFOUT files can be read by "analysis_example" as you tried, and you need to compile it by modifying "makefile" appropriately.
You can refer to the following:
http://www.openmx-square.org/tech_notes/OpenMX-Compile.pdf

The default setting in "makefile" is not appropriate for your Ubuntu if you use some compilers installed by "apt".
Could you try to compile it after you modify CC, FC, LIB in "makefile" as follows?
CC = mpicc -fopenmp -O3
FC = mpicc -fopenmp -O3
LIB = -L/opt/local/lib -lfftw3 -llapack -lblas -lmpi -lmpi_mpifh -lgfortran

Regards,
Naoya Yamaguchi
メンテ
Re: How to read *.scfout file? ( No.2 )
Date: 2020/02/22 18:27
Name: Zafer Kandemir  <zaferkandemir35@gmail.com>

Dear Naoya Yamaguchi

Thank you very much Sir.

I changed makefile as following:

CC = mpicc -fopenmp -O3
FC = mpicc -fopenmp -O3
LIB = -L/usr/lib/x86_64-linux-gnu -lfftw3 -llapack -lblas -lmpi -lmpi_mpifh -lgfortran

Then, I applied 'make install' command:

------------------------------------
$ make install

mpicc -fopenmp -03 -I./liberi-091216/source openmx.o .......
......
strip openmx
cp openmx ../work/openmx
-------------------------------------

*.o files occurred in the openmx3.7/source/ folder. After that, I applied 'make analysis_example' command:

-------------------------------------
$ make analysis_example

mpicc -fopenmp -O3 -I./liberi-091216/source -c analysis_example.c
mpicc -fopenmp -O3 -I./liberi-091216/source -c read_scfout.c
read_scfout.c: In function ‘Input’: .......
......
mpicc -fopenmp -O3 -I./liberi-091216/source analysis_example.o read_scfout.o -L/usr/lib/x86_64-linux-gnu -lfftw3 -llapack -lblas -lmpi -lmpi_mpifh -lgfortran -lm -o analysis_example
cp analysis_example ../work/analysis_example
-------------------------------------

'openmx' and 'anaysis_example' files are executable files in /work directory.

-------------
$./analysis_example *.scfout > HS.out
-------------

I can open HS.out file.
---
Read the scfout file (result_nio/nio.scfout)
atomnum=4
Catomnum=0
Latomnum=0
Ratomnum=0


Kohn-Sham Hamiltonian spin=0
glbal index=1 local index=0 (grobal=1, Rn=0)
-0.4506200 0.0791113 -0.0004959 -0.0004935 -0.0004950 .....
---
メンテ

Page: [1]