[gpaw-users] kpoints error
Ask Hjorth Larsen
asklarsen at gmail.com
Fri Jun 19 20:19:23 CEST 2020
Am Fr., 19. Juni 2020 um 16:24 Uhr schrieb Ali Malik via gpaw-users
<gpaw-users at listserv.fysik.dtu.dk>:
>
> Dear all,
>
> I am trying to do ionic relaxation on VF3 compound. But I keep getting an error in kpoints (probably) during setting up of the k-mesh. I am not sure if this is related to ase or gpaw.
>
> Here is the output.
>
> File "/home/groups/da_mm/codes/gpaw/gpaw-20.1.0/bin/gpaw", line 11, in <module>
> load_entry_point('gpaw==20.1.0', 'console_scripts', 'gpaw')()
> File "/home/groups/da_mm/codes/gpaw/gpaw-20.1.0/lib/python3.7/site-packages/gpaw-20.1.0-py3.7-linux-x86_64.egg/gpaw/cli/main.py", line 80, in main
> ase_main('gpaw', 'GPAW command-line tool', __version__, commands, hook)
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/cli/main.py", line 99, in main
> f(args)
> File "/home/groups/da_mm/codes/gpaw/gpaw-20.1.0/lib/python3.7/site-packages/gpaw-20.1.0-py3.7-linux-x86_64.egg/gpaw/cli/python.py", line 34, in run
> runpy.run_path(args.arguments[0], run_name='__main__')
> File "/shared/apps/.intel/2018/python/3.7.2/lib/python3.7/runpy.py", line 263, in run_path
> pkg_name=pkg_name, script_name=fname)
> File "/shared/apps/.intel/2018/python/3.7.2/lib/python3.7/runpy.py", line 96, in _run_module_code
> mod_name, mod_spec, pkg_name, script_name)
> File "/shared/apps/.intel/2018/python/3.7.2/lib/python3.7/runpy.py", line 85, in _run_code
> exec(code, run_globals)
> File "optimizeall.py", line 44, in <module>
> rel_ions.run(fmax=fmax)
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/optimize/optimize.py", line 272, in run
> return Dynamics.run(self)
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/optimize/optimize.py", line 162, in run
> for converged in Dynamics.irun(self):
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/optimize/optimize.py", line 128, in irun
> self.atoms.get_forces()
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/atoms.py", line 754, in get_forces
> forces = self._calc.get_forces(self)
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/calculators/calculator.py", line 659, in get_forces
> return self.get_property('forces', atoms)
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/calculators/calculator.py", line 695, in get_property
> self.calculate(atoms, [name], system_changes)
> File "/home/groups/da_mm/codes/gpaw/gpaw-20.1.0/lib/python3.7/site-packages/gpaw-20.1.0-py3.7-linux-x86_64.egg/gpaw/calculator.py", line 288, in calculate
> self.initialize(atoms)
> File "/home/groups/da_mm/codes/gpaw/gpaw-20.1.0/lib/python3.7/site-packages/gpaw-20.1.0-py3.7-linux-x86_64.egg/gpaw/calculator.py", line 682, in initialize
> cell_cv, pbc_c, N_c)
> File "/home/groups/da_mm/codes/gpaw/gpaw-20.1.0/lib/python3.7/site-packages/gpaw-20.1.0-py3.7-linux-x86_64.egg/gpaw/calculator.py", line 1027, in create_wave_functions
> kd = self.create_kpoint_descriptor(nspins)
> File "/home/groups/da_mm/codes/gpaw/gpaw-20.1.0/lib/python3.7/site-packages/gpaw-20.1.0-py3.7-linux-x86_64.egg/gpaw/calculator.py", line 995, in create_kpoint_descriptor
> bzkpts_kc = kpts2ndarray(par.kpts, atoms)
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/calculators/calculator.py", line 339, in kpts2ndarray
> return kpts2kpts(kpts, atoms=atoms).kpts
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/calculators/calculator.py", line 329, in kpts2kpts
> return KPoints(monkhorst_pack(size) + offsets)
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/ase/dft/kpoints.py", line 17, in monkhorst_pack
> kpts = np.indices(size).transpose((1, 2, 3, 0)).reshape((-1, 3))
> File "/shared/apps/.intel/2019/python/3.7.2/lib/python3.7/site-packages/numpy/core/numeric.py", line 1703, in indices
> dimensions = tuple(dimensions)
> TypeError: 'int' object is not iterable
kpoints needs to be three numbers or a dictionary.
Best regards
Ask
>
>
> And here is the calculation script.
>
>
> from ase.io import read, write
> from gpaw import GPAW, PW
> #import gpaw_functions_dev as gf
> from ase.parallel import parprint
> from ase.optimize.bfgs import BFGS
> import numpy as np
>
> # ionic, cell, full relaxation, iterative relaxation
>
>
>
> # script related
> verbose = True
>
> # GPAW parameters
> filename = "BPOSCAR"
> kden = 5
> kpden = {"size": kden}
> encut = 500
> eigensolver = "rmm-diis"
> relal = "BFGS"
> swidth = 0.04
> xc = "PBE"
> fmax = 0.01
>
> # output
> fout = "relaxed_atoms"
>
> # Read structure
> atoms = read(filename, format="vasp")
>
> # calculator
> calc = GPAW(mode=PW(ecut=encut),
> xc=xc,
> kpts=kpden,
> eigensolver=eigensolver,
> occupations={"name": "fermi-dirac", "width": swidth},
> txt="rel-ions.txt")
>
> atoms.set_calculator(calc)
> # first_ionic
> #gf.optimize(atoms, reltype="ions", relaxalgorithm=relal, fmax=fmax)
> rel_ions = BFGS(atoms, logfile="rel-ionic.log")
> rel_ions.run(fmax=fmax)
>
> Also, the structure file is attached. I have no idea about the cause of this error.
>
>
> Best Regards,
> Ali
>
>
>
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
More information about the gpaw-users
mailing list