mec07 / PyLATO

Noncollinear Magnetic Tight Binding code
GNU General Public License v2.0
3 stars 2 forks source link

Hamiltonian set to `collinear` does not work #8

Open mec07 opened 5 years ago

mec07 commented 5 years ago

There is a problem when we try to use the collinear Hamiltonian. The error is that it cannot find an appropriate model.

This means that we need to decide on the appropriate model (probably TBexp.py).

I'm also a little confused about why we are adding in noncollinear des terms (what is des?) to the collinear Fock matrix in pylato/hamiltonian.py. I think @mb4512 wrote this originally, do you recall, Max?

horsfielda commented 5 years ago

You should be able to use any model provided it has a value of Stoner I defined. TBexp.json includes this value (5.0).

des is the onsite shift due spin and charge. I agree with you, the way it is added looks wrong: it looks non-collinear.

On Sat, 24 Nov 2018, Marc Coury wrote:

There is a problem when we try to use the collinear Hamiltonian. The error is that it cannot find an appropriate model.

This means that we need to decide on the appropriate model (probably TBexp.py).

I'm also a little confused about why we are adding in noncollinear des terms (what is des?) to the collinear Fock matrix in pylato/hamiltonian.py. I think @mb4512 wrote this originally, do you recall, Max?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mec07/PyLATO/issues/8

mec07 commented 5 years ago

Ahhh it turns out that I was getting this error because I had:

{
  "model": "TBcanonical",
  "Hamiltonian": "collinear",
...
}

in the JobDef.json. That causes the clash. If I instead put:

{
  "model": "TBhydrocarbons",
  "Hamiltonian": "collinear",
...
}

then it works.

This is really confusing behaviour and needs to be sorted out so that either you get a meaningful error message or it's super clear in the example JobDef.json.

OK, thanks for clarifying what des means. Do you know what it actually stands for? I think that we should rename this variable, what would you call it, @horsfielda ?

horsfielda commented 5 years ago

des stands for shift (d as in dy/dx) in onsite energy (e) due to spin (s).

How about onsiteShiftSpin for a new name?

On Sat, 24 Nov 2018, Marc Coury wrote:

Ahhh it turns out that I was getting this error because I had:

{
 "model": "TBcanonical",
 "Hamiltonian": "collinear",
...
}```
in the `JobDef.json`. That causes the clash. If I instead put:

{ "model": "TBhydrocarbons", "Hamiltonian": "collinear", ... }


then it works.

This is really confusing behaviour and needs to be sorted out so that either 
you get a meaningful error message or it's super clear in the example 
`JobDef.json`.

OK, thanks for clarifying what `des` means. Do you know what it actually 
stands for? I think that we should rename this variable, what would you call 
it, @horsfielda ?

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/mec07/PyLATO/issues/8#issuecomment-441383847
mec07 commented 5 years ago

Right, I see.

For python we need to move to snake case for variable names (if we want to be able to take advantage of static analysis tools), so let's call it onsite_shift_spin.

Thanks! :)

mec07 commented 5 years ago

hmm... actually how about: spin_onsite_energy_shift? That's slightly clearer

horsfielda commented 5 years ago

Looks good

Sent from my BlackBerry DTEK50 From: notifications@github.com Sent: 24 November 2018 6:24 p.m. To: PyLATO@noreply.github.com Reply to: reply@reply.github.com Cc: a.horsfield@imperial.ac.uk; mention@noreply.github.com Subject: Re: [mec07/PyLATO] Hamiltonian set to collinear does not work (#8)

hmm... actually how about: spin_onsite_energy_shift? That's slightly clearer

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mec07/PyLATO/issues/8#issuecomment-441386423, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKiIk8mefP3Mhiq0f0jmx6yUm1E2IOh2ks5uyY7MgaJpZM4YxV9l.