exa-analytics / exatomic

A unified platform for theoretical and computational chemists
https://exa-analytics.github.io/exatomic
Apache License 2.0
19 stars 12 forks source link

Adding molecular orbitals example in docs failing #224

Closed herbertludowieg closed 2 years ago

herbertludowieg commented 3 years ago

Describe the bug Examples on the documentation to add molecular orbitals to a universe are failing with KeyError: 'Level shell not found'

To Reproduce I'm using the examples in the docs.

from exatomic.base import resource
from exatomic import gaussian, molcas, nwchem

# gaussian example
fni = gaussian.Fchk(resource('g09-ch3nh2-631g.fchk')).to_universe()
fni.add_molecular_orbitals(vector=range(10))

# molcas example
mol = molcas.Output(resource('mol-uo2-anomb.out'))
orb = molcas.Orb(resource('mol-uo2-anomb.scforb'))
# Just attach it to the universe
# mol.momatrix = orb.momatrix
# mol.orbital = orb.orbital

# Alternatively there's a convenience method on molcas.Output
mol.add_orb(resource('mol-uo2-anomb.scforb'))  # adds momatrix and orbital
uni = mol.to_universe()
uni.add_molecular_orbitals(vector=range(40, 60))

# nwchem example
nw = nwchem.Output(resource('nw-ch3nh2-631g.out')).to_universe()
nw.add_molecular_orbitals(vector=range(20))

Additional context I'll try to go in and fix this when I have a chance to.

tjduigna commented 2 years ago

Closing this as a duplicate of #204 as I believe the pandas version incompatibility is the underlying cause of this issue.