Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range when running the Router #97

Open
ancarnevali opened this issue Mar 13, 2023 · 0 comments
Open

IndexError: list index out of range when running the Router #97

ancarnevali opened this issue Mar 13, 2023 · 0 comments

Comments

@ancarnevali
Copy link

Hi!
I am encountering a problem when running the BaTiO3 notebook.
After the imports, running

router = SynthesisRoutes(
    mp_id, 
    confine_to_icsd=True, 
    confine_to_stables=True, 
    explicit_includes=[TiO2_rutile,BaCO3_beta,TiO_ordered, BaTi2O5], 
    exclude_compositions=['BaTiO3'],
    allow_gas_release=True,
    confine_competing_to_icsd=False,
    add_elements=['C']
)

returns an IndexError with traceback:

IndexError                                Traceback (most recent call last)
      10 TiO2_rutile = 'mp-2657' # Additional relevant phase to explicitly include
      11 BaCO3_beta = 'mp-4559'  # Additional relevant phase to explicitly include
----> 13 router = SynthesisRoutes(
      14     mp_id, 
     15     confine_to_icsd=True, 
     16     confine_to_stables=True, 
     17     explicit_includes=[TiO2_rutile,BaCO3_beta,TiO_ordered, BaTi2O5], 
     18     exclude_compositions=['BaTiO3'],
     19     allow_gas_release=True,
     20     confine_competing_to_icsd=False,
     21     add_elements=['C']
     22 )

File .\site-packages\piro\route.py:129, in SynthesisRoutes.__init__(self, target_entry_id, confine_to_icsd, confine_to_stables, hull_distance, simple_precursors, explicit_includes, exclude_compositions, allow_gas_release, add_elements, flexible_competition, entries, epitaxies, similarities, sigma, transport_constant, custom_target_entry, confine_competing_to_icsd)
    126 else:
    127     self.elts = list(self.target_entry.composition.as_dict().keys())
--> 129 self.get_precursor_library()
    130 print("Precursor library ready.")
    131 self.epitaxies = (
    132     epitaxies
    133     if epitaxies
    134     else get_epitaxies(self.precursor_library, self.target_entry)
...
    194     return self.custom_target_entry
    195 else:
--> 196     return [e for e in self.entries if e.entry_id == self.target_entry_id][0]

IndexError: list index out of range

Any idea on how to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant