chgcar_mod.f90 VASP input problems

Bader charge density analysis

Moderator: moderators

Post Reply
paapu
Posts: 6
Joined: Tue Apr 26, 2011 12:35 pm

chgcar_mod.f90 VASP input problems

Post by paapu »

Dear Baders,

I have a standard setup: a PC with Ubuntu 10.04 and gfortran shipped with it.

Since there was no binary of bader for me
(the binaries failed to run, complained about libraries). I compiled source with no problem
from http://theory.cm.utexas.edu/bader/
Source Code (v0.27b 02/23/11)
by gfortran using this modified Makefile in dir ~/Downloads/bader
(the program output says it is Version 0.27c 03/23/11)
-----------------------------------------------------

.SUFFIXES: .f90

FC = gfortran

FFLAGS =

LINK = -static-libgfortran

OBJS = kind_mod.o \
matrix_mod.o \
ions_mod.o \
options_mod.o \
charge_mod.o \
chgcar_mod.o \
cube_mod.o \
io_mod.o \
bader_mod.o \
voronoi_mod.o \
command_arg.o

%.o %.mod : %.f90
$(FC) $(FFLAGS) -c $*.f90

bader: $(OBJS) main.o
rm -f bader
$(FC) $(LINK) main.o -o $@ $(OBJS)

clean:
rm -f *.o *.mod bader

-----------------------------------------------------

Now when trying to use bader for my CHGCAR file (vasp.5.2.2 15Apr09 complex)

>Kauppi ~/tmp> ~/Downloads/bader/bader CHGCAR
>
> GRID BASED BADER ANALYSIS (Version 0.27c 03/23/11)
>
> OPEN ... CHGCAR
> VASP-STYLE INPUT FILE
> vasp5
>At line 84 of file chgcar_mod.f90 (unit = 100, file = 'CHGCAR')
>Fortran runtime error: Bad integer for item 1 in list input

I get the same error with CHG_NaCl in
NaCl.tar.gz
downloaded from
http://theory.cm.utexas.edu/bader/

When saying
>Kauppi ~/Downloads/NaCl> ~/Downloads/bader/bader CHG_NaCl

> GRID BASED BADER ANALYSIS (Version 0.27c 03/23/11)

> OPEN ... CHG_NaCl
> VASP-STYLE INPUT FILE
>At line 84 of file chgcar_mod.f90 (unit = 100, file = 'CHG_NaCl')
>Fortran runtime error: Bad integer for item 1 in list input
----------------------------------------------------------------------------------------------

Any help appreciated.

Terveisin, Markus
graeme
Site Admin
Posts: 2256
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: chgcar_mod.f90 VASP input problems

Post by graeme »

Thank you for pointing this problem out. I was able to reproduce it for gfortran on ubuntu. I've made a small change to the code to work around this specific problem with gfortran. I'll upload the new version now.
paapu
Posts: 6
Joined: Tue Apr 26, 2011 12:35 pm

Re: chgcar_mod.f90 VASP input problems

Post by paapu »

Thank's! (that was quick)

With source code 04/27/11 - Version 0.27d, compiled with gfortran
I'm now able to reproduce example:
NaCl crystal (vasp chgcar) (at http://theory.cm.utexas.edu/vtsttools/bader/)

Terveisin, Markus
Post Reply