dembart / BVlain

The Bond valence site energy calculator
MIT License
10 stars 1 forks source link

'oxi_states' not identified #1

Closed bransom960 closed 1 year ago

bransom960 commented 1 year ago

I am running the tutorial example in jupyter and receive the error below. I did go back through and try to apply the BVanalyzer.get_oxi_state_decorated_structure() module from pymatgen by hand, but still received the same error. I also tried every option for 'oxi_check' in the read_file command. I'm not sure what else to do, I've tried other structures as well and always come to the same error.

from bvlain import Lain

f= 'LiFePO4.cif'#symmetrized structure from MP to match example calc = Lain(verbose = False) st = calc.read_file(f'./{f}') params = {'mobile_ion': 'Li1+','rcut': 10.0,'resolution': 0.2,'k': 100} = calc.bvse_distribution(**params) calc.percolation_analysis(encut = 5.0)

Screen Shot 2022-11-23 at 6 45 38 PM
dembart commented 1 year ago

Hi,

The error occurs when pymatgen converts Structure to ase.atoms. As I understand, the oxi_states are not inherited after conversion because of the old version of pymatgen. Try to update pymatgen to 2022.5.26 or higher. Please, write if it helps.

bransom960 commented 1 year ago

Yes, that was it, thank you.