Open ndaelman-hu opened 1 month ago
@ladinesa brought this up in #129. I think he had a fix.
In any case, rank
needs to be clarified with the interoperability task force. @lauri-codes @markus1978 please, bear in mind our cases where rank is defined at parsing/normalization time, like it happens when a property is a tensor of order some degree of freedom n_xxx
(spin, orbitals, etc.). Maybe you have a better idea of how to define such properties with our current idea of rank
.
@ladinesa brought this up in #129. I think he had a fix.
In any case,
rank
needs to be clarified with the interoperability task force. @lauri-codes @markus1978 please, bear in mind our cases where rank is defined at parsing/normalization time, like it happens when a property is a tensor of order some degree of freedomn_xxx
(spin, orbitals, etc.). Maybe you have a better idea of how to define such properties with our current idea ofrank
.
Thx for brining up Alvin. I spoke with him and indeed has a quick workaround, but it comes with unacceptable losses in performance. He agrees that the solution should lie with PhyiscalProperty
.
Maybe you have a better idea of how to define such properties with our current idea of
rank
.
Well, I stated my opinion above. I'd need to understand better the aim to steer it by.
@ndaelman-hu yes, I also agree that it should be addressed within PhysicalProperty. I do not have any specific suggestions atm, I need to also look into it more.
Problem comes when defining the shape
of value, it will have troubles if you set the attribute of the same and it has a non-zero rank. So normalization cannot handle this, or at least, we should think on another way.
Problem comes when defining the
shape
of value, it will have troubles if you set the attribute of the same and it has a non-zero rank. So normalization cannot handle this, or at least, we should think on another way.
How about only enforcing shape
then? You can still extract this using normalization.
In the current scheme, the n_
quantities are more so "nice to have", but far from crucial. Hence, they do not warrant this check.
How about only enforcing
shape
then?
This is precisely what we want to avoid, because of the use of variables
.
Maybe these cases where rank
needs to have an n_xx
quantity defined should be moved into Variables
?
Maybe these cases where
rank
needs to have ann_xx
quantity defined should be moved intoVariables
?
That sounds better, yes. Still, why bother with n_
quantities to be set? You already have n_points
(again, provoking potential name clashes) in Variables
. You can just read the dimensionalities from there and compute shape
. Any section inheriting from Variables
should just populate n_points
.
Looking more at the PhysicalProperty
code, this seems to be exactly what validate_quantity_wrt_value
already does.
It appears that this decorator was implemented later on, as a generalization to n_
handling.
While testing
MappingAnnotation
, theValueError
inphysical_property.py
, line 257 gets raised due ton_bands = None
. I have 2 major issues with this check:n_
is inappropriate, as it lays claim to these naming formats, nor is this limitation ever documented. I would opt for a more flexible system of guarding quantities. Even if we stay with a reserved namespace, it should be chosen more specifically toPhysicalProperty
.@JFRudzinski could we reformulate this check to the requirements of physical property? Else, I recommend removal.