TypeError: 'NoneType' object is not subscriptable (in monoclinic lattice)

Hi all,

I am trying to calculate an electronic band structure and I have encountered the NoneType error. I have read the previous topics on this error on this forum. However, my lattice is monoclinic and the fix described in a previous topic is for an orthorhombic lattice. I was wondering if there was a similar fix for a monoclinic lattice. Here is the trace I get while running abiopen.py 8atomes_bande_nso_GSR.nc --expose -sns=paper:

/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/pymatgen/symmetry/kpath.py:178: UserWarning: The input structure does not match the expected standard primitive! The path can be incorrect. Use at your own risk.
  warn(
Traceback (most recent call last):
  File "/home/laurent/env/abipy/abipy/bin/abiopen.py", line 387, in <module>
    sys.exit(main())
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/monty/functools.py", line 405, in wrapper
    sys.exit(main())
  File "/home/laurent/env/abipy/abipy/bin/abiopen.py", line 248, in main
    abifile = abilab.abiopen(options.filepath)
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/abilab.py", line 304, in abiopen
    return cls.from_file(filepath)
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/electrons/gsr.py", line 54, in from_file
    return cls(filepath)
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/electrons/gsr.py", line 61, in __init__
    self._ebands = r.read_ebands()
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/electrons/ebands.py", line 4088, in read_ebands
    kpoints=self.read_kpoints(),
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/core/kpoints.py", line 1731, in read_kpoints
    kpoint.set_name(structure.findname_in_hsym_stars(kpoint))
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/core/structure.py", line 1277, in findname_in_hsym_stars
    for star in self.hsym_stars:
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/monty/functools.py", line 238, in __get__
    value = self.__func(inst)
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/core/structure.py", line 1244, in hsym_stars
    return [kpoint.compute_star(self.abi_spacegroup.fm_symmops) for kpoint in self.hsym_kpoints]
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/monty/functools.py", line 238, in __get__
    value = self.__func(inst)
  File "/home/laurent/env/abipy/abipy/lib/python3.9/site-packages/abipy/core/structure.py", line 1196, in hsym_kpoints
    name2frac_coords = self.hsym_kpath.kpath["kpoints"]
TypeError: 'NoneType' object is not subscriptable

Here is the abinit input file for this structure:

#Lattice structure
 natom 18
 ntypat 2
 typat
 1 1 1
 1 1 1
 1 1 2
 2 2 2
 2 2 2
 2 2 2
 znucl 1 6
 acell    1.0    1.0    1.0
 rprim
    4.7810070953    0.0000000000    0.0000000000
   -2.3905039020   20.6925001670    0.0000000000
    0.0000000000    0.0000000000   37.7945224925

#Atomic positions    
 xred
       0.003496888905      0.006680219294      0.423648762388
       0.802206591636      0.609412514628      0.440566658623
       0.728514852652      0.461777838700      0.570316020799
       0.602596094569      0.204887682300      0.429684193353
       0.528890119464      0.057255771013      0.559433388316
       0.327628574819      0.659985317890      0.576351112179
       0.200992673316      0.406226456631      0.434897378559
       0.130109346398      0.260440599544      0.565102894076
       0.001222751299     -0.001216026743      0.478944028455
       0.936500865592      0.863460952152      0.496203019713
       0.798188553909      0.603118946409      0.495787062139
       0.730941598930      0.466747953274      0.514964352817
       0.600165564128      0.199917934567      0.485035803835
       0.532922946714      0.063546948613      0.504212925844
       0.394622071373      0.803204491687      0.503796321702
       0.329892273811      0.667881792651      0.521055896738
       0.198829732388      0.401478935827      0.490237466485
       0.132276166694      0.265187004965      0.509762713981

#Definition of the planewave basis set   
 ecut 45  

#Definition of the SCF procedure
 nstep 50
 
#Pseudo potentials
 pseudos "/home/laurentm/projects/rrg-cotemich-ac/laurentm/pseudos/H.psp8,/home/laurentm/projects/rrg-cotemich-ac/laurentm/pseudos/C.psp8" 

#Band structure calculation 
 getden_filepath "/home/laurentm/projects/rrg-cotemich-ac/laurentm/8atomes_kpoints_ns/8atomes_kpoints_nso_TIM16_DEN.nc"
 tolwfr 1e-20 
 iscf -2
 enunit 1
 ndivsm 10
 kptopt -4
 kptbounds
    +0.00000  +0.00000  +0.00000  # $\Gamma$
    +0.50663  -0.25000  +0.00000  # X
    +0.49337  +0.25000  +0.00000  # X_1
    +0.00000  +0.50000  +0.00000  # Y
    +0.00000  +0.00000  +0.00000  # $\Gamma$

I have tried to run calculation in another input file but I got the same result while trying to produce the band structure with AbiPy. I’ve also tried to update pymatgen and it didn’t solve the problem.

1 Like