Closed lbluque closed 4 years ago
@tchen0965 @juliayang @zjadidi please have a look at this and make sure it has not affected you.
I am working on fixing this asap.
@lbluque looks like the second assertion for subspace1 failed :(
Let us know if we can help you anything!
Thanks @juliayang! That's what I suspected. I already committed a fix to my fork, but need to write some tests to check this going forward.
For now you can force the second assert statement and result consistency using the temporary fix I suggested above.
fix added in #90
Orthonormalizing the site basis sets in a clusterspace is not recorded when saving the objects as mson dicts, so when reloaded the basis sets are not orthonormal.
Expected Behavior
The state of a cluster subspace should be saved completely to faithfully recreate the exact same object from a dictionary.
Current Behavior
Since the
SiteBasis
class is not MSONable, the exact state of the basis sets is not completely saved when saving aClusterSubspace
.Possible Solution
Either make the
SiteBasis
class MSOnable and save its full state, or create boolean flags as attributes to keep track of changes, specifically orthonormalizing. As a quick and dirty fix users can simply "remember" if the were using an orthonormal set and then set the basis accordingly (this should NOT be a long term solution and the issue should be fixed in the source code asap):Steps to Reproduce
ClusterSubspace
withorthonormal=True
assert subspace.basis_orthonormal # this is good assert subspace1.basis_orthonormal # this is not good!