---------------------------------------
description
abinit version: 6.12.3 built from sources w/ etsf-io fallback connector
platform: linux x86-64 3.2.x kernel
for several reasons i rely on the etsf-io capability, so my typical input files look like this one:
Code: Select all
acell 1 1 1 angstrom
rprim 0.00000000 2.71530000 2.71530000
2.71530000 0.00000000 2.71530000
2.71530000 2.71530000 0.00000000
# Atomic type information
ntypat 1
typat 1 1
znucl 14
# Atomic positions
natom 2
xred 0.0000 0.0000 0.0000
0.2500 0.2500 0.2500
# Exchange Correlation Parameters
ixc -001009
nsppol 1
nspinor 1
nspden 1
# Iteration Control Parameters
iscf 17
nstep 40
npulayit 5
iprcel 0
toldfe 1e-06
# Numerical Accuracy Parameters
tphysel 0
ngkpt 3 3 3
# Basis Set Parameters
nband 16
ecut 20
# Additional Parameters
chksymbreak 0
chkprim 0
# Output control
# Print results to *-etsf.nc netcdf files.
accesswff 3
istwfk *1
prteig 1
prtpot 1
abinit successfully returns and generates a couple of *-etsf.nc netcdf files, e.g. output_POT-etsf.nc.
i open the POT using the ase.io.pupynere module (python script):
Code: Select all
#file readpot.py
import ase.io.pupynere as ase_pupynere
import numpy
potfile = ase_pupynere.NetCDFFile('output_POT-etsf.nc','r')
# 'exchange_correlation_potential' is the only 3D scalar field variable in the file,
# so i figure it is the eff. potential.
potential = potfile.variables['exchange_correlation_potential'].data
print potential[0,0,0,0]
Code: Select all
$> python readpot.py
9.96920997e+36
same for all other indices.


Code: Select all
$> cut3d
What is the name of the 3D function (density, potential or wavef) file ?
output_POT-etsf.nc
=> Your 3D function file is : output_POT-etsf.nc
Does this file contain formatted 3D ASCII data (=0)
or unformatted binary header + 3D data (=1) ?
or ETSF binary (=2) ?
2
2 => Your file contains ETSF data
The information it contains should be sufficient.
WffOpen: opening output_POT-etsf.nc on unit 3
cut3d : read file output_POT-etsf.nc.
hdr_io_etsf: accessing ABINIT specific data from unit 3
hdr_io_etsf.F90:186:WARNING
Backtrace : etsf_io_low_read_dim()
Action performed : inquire dimension ID
Target (name) : rhoijdim2
Error message : NetCDF: Invalid dimension ID or name
Error id : -46
hdr_io_etsf.F90:240:ERROR
Backtrace : read_var_integer_1D()
read_var_infos_name()
Action performed : inquire variable ID
Target (name) : number_of_wavelets
Error message : NetCDF: Variable not found
Error id : -49
hdr_io_etsf.F90:240:ERROR
Backtrace : read_var_integer_1D()
read_var_infos_name()
Action performed : inquire variable ID
Target (name) : number_of_wavelets
Error message : NetCDF: Variable not found
Error id : -49
leave_new : decision taken to exit ...

finally, i resort to remove the lines accesswff 3 and istwfk *1 from the input file, so that abinit writes unformatted binary files. cut3d then successfully reads the potential file (output_POT).
running the original input file but replacing "prtpot" by e.g. "prtvxc" or "prtvha", so as to obtain the exchange-correlation and hartree potentials, respectively, i receive etsf.nc files that now contain valid potential data but that are again not readable by cut3d. same result if i have "prtvxc 1" and "prtvha 1" both enabled at the same time. as a check, i also write to unformatted VXC and VHA binary files, read them using cut3d, and the data are identical to the corresponding NetCDFFile().variables['exchange_correlation_potential'].data objects.
last, by enabling "prtpot 1" additionaly, all three etsf.nc files (VXC, VHA, and POT) now contain the same non-sense large numbers as described above and are (as always) not readable by cut3d.
any ideas? need more info? should this be filed as a bug?
i'm open to any suggestions.
thanks, carsten