Open ndaelman-hu opened 2 months ago
ModelMethod
has a subsection called contributions
whose objective is precisely this one.
I like the idea of the "free text for formulas", and it is also in my mind to implement. Maybe we could implement something like latex_formula
and interface with some package to show full hamiltonians and their contributions in a future. This is something QMC and modeling people will be very interested of.
I like the idea of the "free text for formulas", and it is also in my mind to implement.
100 %
ModelMethod has a subsection called contributions whose objective is precisely this one.
@JosePizarro3 thank you for pointing this out. Indeed, I figured this out shortly after posting this issue.
Still, even when I already knew about PropertyContribution
, it was hard to find the connection on the ModelMethod
side.
@Bernadette-Mohr and @EBB2675 what are your perspectives, looking at this with a fresh pair of eyes?
I have 2 kinds of suggestions to clarify the connection. First, we should (on both ends) mention that there's a link. This can either be
Second, the structure differs between both ends. Not every PhysicalProperty
is a PropertyContribution
: you have (sum) total properties and then their terms. ModelMethod.contributions
, meanwhile, is self-referential, i.e. it contains other ModelMethod
.
Ideally, both would follow the same structure, though I understand that different considerations may be at play.
PhysicalProperty
's approach limits the nesting to only 1 layer, since more aren't necessary. ModelMethod
, conversely, allows methods that are standalone in some contexts to serve as building blocks in other, larger methods. This is relevant for hybrid DFs and lattice models for example.
Any opinions?
Add the method counterpart of
EnergyContribution
and make it so the latter can refer to it. The Hamiltonian terms will have name and formula (free text) sections. Constructing a formalized approach to writing formulas goes outside the scope of this issue / project.The need for Hamiltonian terms became evident from the #101, where Quick step is split by this distinction.