bjmorgan / py-sc-fermi

py-sc-fermi is a materials modelling code for calculating self-consistent Fermi energies and defect concentrations under thermodynamic equilibrium (or quasi-equilibrium) given defect formation energies.
MIT License
25 stars 9 forks source link

'DefectSystem' object has no attribute 'concentration_dict' #36

Closed msehabibur closed 7 months ago

msehabibur commented 7 months ago

When I try to plot the concentration as a function of T, it shows the 'DefectSystem' object has no attribute 'concentration_dict'.

Screenshot 2024-03-22 at 10 18 47 AM
bjmorgan commented 7 months ago

@msehabibur It's not possible to see what the issue is from your code snippet. Can you post a fuller example that includes any previous references to the variable defect_system?

concentration_dict is a method, not an attribute, but the code above shouldn't give an AtttibuteError if defect_system is a DefectSystem object.

msehabibur commented 7 months ago
Screenshot 2024-03-22 at 10 45 10 AM
bjmorgan commented 7 months ago

@msehabibur how do you create and then reference the defect_system variable?

msehabibur commented 7 months ago
Screenshot 2024-03-22 at 11 04 43 AM
alexsquires commented 7 months ago

Could you confirm the version of py_sc_fermi you are using? For versions earlier than 2.0.0 the concentration_dict() method functionality is found under DefectSystem.as_dict()

msehabibur commented 7 months ago

I just updated the version, and the problem is solved! Thank you!

msehabibur commented 7 months ago

Completed