MineralsCloud / qha

A Python package for calculating thermodynamic properties under quasi-harmonic approximation, using data from ab-initio calculations
https://mineralscloud.github.io/qha/
GNU General Public License v3.0
27 stars 13 forks source link

Change 'calculator.py' implementation #5

Closed singularitti closed 6 years ago

singularitti commented 6 years ago

The original implementation of QHACalculator and QHAMultiConfigCalculator in 'calculator.py' does not have good readability.

So I reimplement this part and rename QHACalculator to Calculator, QHASameVdosCalculator to SamePhDOSCalculator, DifferentPhDOSCalculator to DifferentPhDOSCalculator. Because we are definitely doing QHA, so there is no need to specify "QHA" again in their names, unlike phononpy's QHA class. The rewriting of SamePhDOSCalculator is still not finished, and I am still not satisfied with the volumes property in DifferentPhDOSCalculator class, but just leave them for later fixes.

There were some abuses of LazyProperty, and I have changed them, some indeed causes bugs because of the implementation of LazyProperty.

Note: This pull request should be checked again before merging! Since I have changed so much that there might be some bugs introduced.