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

Sublattice magnetization #594

Open
bonfus opened this issue Apr 9, 2021 · 5 comments
Open

Sublattice magnetization #594

bonfus opened this issue Apr 9, 2021 · 5 comments

Comments

@bonfus
Copy link

bonfus commented Apr 9, 2021

Hi there, I've been playing with Spirit APIs for a while, but I haven't found a good way to define sublattice magnetization.

My setup looks like this

basis
8
0.0 0.5 0.25
0.5 0.0 0.25
0.0 0.5 0.75
0.5 0.0 0.75
0.0 0.0 0.0
0.5 0.5 0.5
0.0 0.0 0.5
0.5 0.5 0.0

mu_s 0.1 0.1 0.1 0.1 3.5 3.5 3.4 3.4

n_defects 268
4 0 0 0 -1
5 0 0 0 -1
4 0 0 1 -1
5 0 0 1 -1
4 0 0 2 -1
...

I wanted to use system.get_spin_directions but it reports all spin, including those of defects, and they are all different from 0.
I also tried to identify the atoms with mu_s, but this also doesn't work.

What is the best way to achieve a definition of sublattice magnetization?

@sqml-ust
Copy link

sqml-ust commented May 2, 2021

I am also looking for a way to create a ferrimagnetic system, which is related to this question. I hope that someone can address this issue. Thanks.

@MSallermann
Copy link
Member

Hi sorry for the late reply.
If I understand you correctly, you want to read out the spin directions belonging to a specific basis atom. Is that right?
I would suggest to index the spin directions with the corresponding stride and offset.
The linear index is computed as
idx = i + N_basis * (a + Na * (b + Nb * c)),
where i is the index of the basis atom in the cell and N_basis is the number of basis atoms etc...

Using numpy arrays, you can write

spins = np.array(system.get_spin_directions(p_state))
spins_0 = spins[0::8]  #Spins on sublattice 0
spins_1 = spins[1::8]
#...
spins_7 = spins[7::8]

@sqml-ust
Copy link

sqml-ust commented May 3, 2021

@MSallermann Sorry for bothering you. I would like to clarify my question. My question is whether it is possible to define different mu_s for different atoms or (atomistic) spins. This feature is important for a ferrimagnetic system. I appreciate your attention. Thank you.

@MSallermann
Copy link
Member

@sqml-ust It is possible to define a different mu_s for every spin in the basis cell. This is done by the syntax already used in the original issue.
You can always enlarge the basis cell (and adjust the interaction pairs accordingly), to accommodate the structure you need.
If you need more flexibility, you can also use the defects feature and define mu_s on a per site level: https://spirit-docs.readthedocs.io/en/latest/core/docs/Input.html#disorder-and-defects-a-name-defects-a.
I understand that this is not the most user friendly part of spirit. In the not-too-distant future I plan to make these type of "filters" scriptable and much more flexible.
If you have further questions, feel free to open another issue.

@GPMueller
Copy link
Member

@bonfus to clarify this point you raised

it reports all spin, including those of defects, and they are all different from 0

I see why this is confusing... This is intentional, however, as the spins are represented by normal vectors, irrespective of their magnetization value. Even if mu_s=0 or atom_type<0 (i.e. defect) for a given atom, you will get a normalized vector from system.get_spin_directions.

Note also this bug: #527, i.e. you should calculate the magnetization yourself, using the spin_directions and your mu_s and atom_type values, instead of using quantities.get_magnetization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants