You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the Step6 tutorial crashes when running step6_part5.py with the following traceback:
Traceback (most recent call last):
File "/home/hpleva/httk/src/httk/db/filteredcollection.py", line 925, in __getattr__
typex = typedict[name]
KeyError: 'formula_symbols'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "step6_part5.py", line 28, in <module>
search.add_all(search_struct.formula_symbols.is_in('O', 'Ca', 'Ti'))
File "/home/hpleva/httk/src/httk/db/filteredcollection.py", line 961, in __getattr__
raise Exception("Field "+name+" does not exist:"+str(e))
Exception: Field formula_symbols does not exist:'formula_symbols'
This happens, because in step6_part4.py we save UnitcellStructure (instead of Structure) in the database, which does not have the "formula_symbols" property.
If I modify scripts step6_part4.py and step6_part5.py so that Structure is used instead of UnitcellStructure, I get further, but encounter another problem in step6_part5.py:
Traceback (most recent call last):
File "step6_part5.py", line 40, in <module>
pd = StructurePhaseDiagram.create(structures, energies)
File "/home/hpleva/httk/src/httk/atomistic/structurephasediagram.py", line 73, in create
pd = setup_phasediagram(structures, energies)
File "/home/hpleva/httk/src/httk/atomistic/structurephasediagram.py", line 101, in setup_phasediagram
formula = struct.uc_formula
AttributeError: 'Structure' object has no attribute 'uc_formula'
The Structure class no longer has the "uc_formula" property, because it was removed in an old commit.
If I copy-paste the "uc_formula" back in the Structure class from an old commit, everything works and I the phase diagram figure is produced.
Should the Step6 tutorial be changed so that it uses Structure instead of the UnitcellStructure? The "3_phasediagram_pymatgen.py" example uses Structure, which points to the direction that the step6_part4.py and step6_part5.py scripts should be updated.
Should the setup_phasediagram() function not try to access the "uc_formula" property of a structure, or should the Structure class still contain the "uc_formula" property?
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up. I'm not sure how this bug happened without me noticing at some point.
The swap of UnitcellStructure instead of Structure was done to avoid the need for a symmetry finder to be installed to run the tutorial. It would be good if we can keep that.
As far as I recall uc_formula was removed, because it is the same thing as formula. And replacing uc_formula with formula in the code that breaks seems to come with no risk, since it is only used to label the phase diagram.
Should the Step6 tutorial be changed so that it uses Structure instead of the UnitcellStructure? The "3_phasediagram_pymatgen.py" example uses Structure, which points to the direction that the step6_part4.py and step6_part5.py scripts should be updated.
For now it probably should, so that this tutorial step does not break. In the longer run, we need to check that we have enough functionality in httk so that this example can run without an external symmetry finder.
Should the setup_phasediagram() function not try to access the "uc_formula" property of a structure, or should the Structure class still contain the "uc_formula" property?
No, this seems a bug; I believe the access should have been replaced with formula when uc_formula was removed.
Received over email.
Running the Step6 tutorial crashes when running step6_part5.py with the following traceback:
During handling of the above exception, another exception occurred:
This happens, because in step6_part4.py we save UnitcellStructure (instead of Structure) in the database, which does not have the "formula_symbols" property.
If I modify scripts step6_part4.py and step6_part5.py so that Structure is used instead of UnitcellStructure, I get further, but encounter another problem in step6_part5.py:
The Structure class no longer has the "uc_formula" property, because it was removed in an old commit.
If I copy-paste the "uc_formula" back in the Structure class from an old commit, everything works and I the phase diagram figure is produced.
The text was updated successfully, but these errors were encountered: