dipc-cc / hubbard

Python tools for mean-field Hubbard models
https://dipc-cc.github.io/hubbard/
GNU Lesser General Public License v3.0
21 stars 8 forks source link

Added comments #75

Closed zerothi closed 3 years ago

zerothi commented 3 years ago

I changed a few things here and there and added some comments.

Instead of doing import hubbard.hamiltonian as hh ; hh.HubbardHamiltonian it may be easier to just do import hubbard as hubb (or whatever name you prefer) and the just hubb.HubbardHamiltonian. The abstraction of having the double nested levels is a bit confusing. The same goes for many of the other imports, i.e. use hubb.plot.BandStructure instead and same for density. It clarifies where the routines belong. (note to self, I also need to clean this up in my own tutorials ;))

But all looks good, I changed all all imports of the Hamiltonian to the above suggestion. But please adjust.

Note that the notebooks are not cleaned.... Yet ;)

sofiasanz commented 3 years ago

Thank you both very much for your comments! Indeed I also find a polarized solution as Thomas does after running it in my laptop. In commit d4f8a20 I fixed some typos (as the one that Thomas mentioned on #71) and other minor things as cleaning all outputs in the notebooks. I also added more content in excersice MFH_03 (mainly more explanation). I will keep working on them, but I guess that so far you like more or less the idea :)

zerothi commented 3 years ago

Great! Thanks! Note my comment on the import line in MFH_01?

I retried the plotting of the plot, and now I consistenly get what you show. I don't know if I accidentially hit a random case that leads to an unpolarized state.. Weird. Well, that is the case for random stuff.

Before merging, perhaps you should do git rebase tutorial to squash my commit (removes the output from a commit). :)

Looks good!

sofiasanz commented 3 years ago

Oh I didn't see your comment, I think hubb is OK, I don't have any other suggestion for the moment ;) Thanks!

Before merging, perhaps you should do git rebase tutorial to squash my commit (removes the output from a commit)

I did this but nothing happened, since there are no changes in the tutorials branch, no? Maybe I don't understand what you mean :-S

sofiasanz commented 3 years ago

Shall I merge this branch into tutorials so we can follow the discussion there?

zerothi commented 3 years ago

Oh I didn't see your comment, I think hubb is OK, I don't have any other suggestion for the moment ;) Thanks!

Before merging, perhaps you should do git rebase tutorial to squash my commit (removes the output from a commit)

I did this but nothing happened, since there are no changes in the tutorials branch, no? Maybe I don't understand what you mean :-S

You should do something like this:

git rebase -i tutorials

and then squash all commits in between.

zerothi commented 3 years ago

Otherwise I can do it tomorrow, if you want? But perhaps this is a good git exercise? ;) Do everything locally and don't push until you are fully aware of the implications :)

sofiasanz commented 3 years ago

I will do it later! I have to look into this interactive rebase mode since I've never done it ;)

sofiasanz commented 3 years ago

Hi Nick, I squashed the commits together in 77e8690. Is this what you meant? Nice learning about this options! ;-)

zerothi commented 3 years ago

exactly correct ;)

These squash's are quite handy for testing stuff out (i.e. having output in notebooks etc)