Skip to content

Problem with gbasis wrapper  #199

@JannisErhard

Description

@JannisErhard

Whenever I try to read scf data from ".molden" or ".fchk", I run into a problem with gbasis. It complains that "AttributeError: 'MolecularBasis' object has no attribute 'get_segmented'". I am actually working with atomdb but the source iof the problem seems to be gbasis.

I am using this code snipped to generate to dump scf data in a molden file

    mol = gto.Mole() 
    mol.build()
    mf = scf.RHF( mol )
    mf.scf()
    molden.from_scf(mf, f"{fname}.molden", ignore_h=True)

And I use this snippet to the read the file:

atomdb.compile(atnum, charge, mult, 0, 'hci', datapath=MYDATAPATH)

It prompts the error

Traceback (most recent call last):
  File "/scratch/jerhard/Benchmark_sto-3g/compile.py", line 69, in <module>
    wrap_compile(atnum, charges)
  File "/scratch/jerhard/Benchmark_sto-3g/compile.py", line 33, in wrap_compile
    atomdb.compile(atnum, charge, mult, 0, 'hci', datapath=MYDATAPATH)
  File "/home/jerhard/envs/AtomDB/atomdb/species.py", line 747, in compile
    species = submodule.run(elem, charge, mult, nexc, dataset, datapath)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jerhard/envs/AtomDB/atomdb/datasets/hci/run.py", line 128, in run
    obasis = from_iodata(scfdata)
             ^^^^^^^^^^^^^^^^^^^^
  File "/home/jerhard/envs/heat_bath_fci/gbasis/gbasis/wrappers.py", line 126, in from_iodata
    molbasis = mol.obasis.get_segmented()
               ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MolecularBasis' object has no attribute 'get_segmented'
``

I am actually not sure if this is a problem with atomdb, iodata or gbasis, but I have been digging for a while and trying an alternative path where I use the fchk format, corespondingly a different part of atomdb and I end up with the same error in gbasis. Since this is the strongest hint I have I thought it would be best to reach out here. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions