Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hamiltonian components to the ModelMethod #105

Open
ndaelman-hu opened this issue Aug 9, 2024 · 3 comments
Open

Add Hamiltonian components to the ModelMethod #105

ndaelman-hu opened this issue Aug 9, 2024 · 3 comments
Assignees
Labels
new feature New feature or request question Further information is requested
Milestone

Comments

@ndaelman-hu
Copy link
Collaborator

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.

@ndaelman-hu ndaelman-hu added the new feature New feature or request label Aug 9, 2024
@ndaelman-hu ndaelman-hu added this to the 0.1.0 milestone Aug 9, 2024
@ndaelman-hu ndaelman-hu self-assigned this Aug 9, 2024
@ndaelman-hu ndaelman-hu added the question Further information is requested label Aug 9, 2024
@JosePizarro3
Copy link
Collaborator

JosePizarro3 commented Aug 9, 2024

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.

@ndaelman-hu
Copy link
Collaborator Author

ndaelman-hu commented Aug 22, 2024

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.

problem statement

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?

solution 1

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

  1. via (py)docs.
  2. via the code, i.e. typing system or interfaces.

solution 2

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?

@JFRudzinski
Copy link
Collaborator

@ndaelman-hu @EBB2675 Can we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants