Closed cortner closed 3 years ago
the last commit provides a seemingly working version of the symmetry needed for the magnetism project. More tests to perform, but maybe ready soon to merge and tag so we can start implementing the corresponding model.
This now seems to be all working ok - tests pass. I'd be grateful though if somebody would be willing to review this:
@bs544 -> Do you agree that the following test correctly captures the symmetry you envisioned?
ord = 5
maxdeg = 7
basis = SymmetricBasis(φ, B1p, O3(:lr, :mr) ⊗ O3(:ls, :ms), ord, maxdeg; Deg = D)
@show length(basis)
for ntest = 1:30
cfg = ACEConfig(rand(MagState, nX))
Qr = ACE.Random.rand_rot() * ACE.Random.rand_refl()
Qs = ACE.Random.rand_rot() * ACE.Random.rand_refl()
cfg_rs = ACEConfig( shuffle( [MagState(rr = Qr * X.rr, ss = Qs * X.ss) for X in cfg] ) )
B = evaluate(basis, cfg)
B_rs = evaluate(basis, cfg_rs)
print_tf(@test(B ≈ B_rs))
end
@MatthiasSachs and/or @zhanglw0521 would you be willing to look at symmbasis.jl
, especially this part
# loop through AA basis, but skip most of them ...
for (iAA, AA) in enumerate(AAspec)
# determine whether we need to compute coupling coefficients for this
# basis function or whether it will be included in a different
# coco computation?
if !is_refbasisfcn(symgrp, AA)
continue
end
# compute the cocos
U, AAcols = coupling_coeffs(symgrp, AA, rotc)
and then the file symmetrygroups
where this is implemented, in order to familiarize yourselves with this - but again if you have any thoughts on this I'd be grateful.
@bs544 -> Do you agree that the following test correctly captures the symmetry you envisioned?
@cortner yes, without spin orbit coupling the energy should be invariant to the rotation and inversion of each of the spins and positions.
This PR will enable us to have 1p basis functions with multple Ylm components and put in place the infrastructure to decide how to symmetrize in those cases. E.g. If I have
then it depends on whether or not the rotation of
rr1, rr2
are coupled or not how to symmetrize. An application is magnetism where spin-orbit coupling is usually very weak i.e. one can symmetrize overO3 otimes O3
and make only a very small modelling error.CC: @MatthiasSachs and @zhanglw0521 -> it would be useful if you familiarize yourself and let me know if you have comments.
CC: @bs544 -> it will probably be a few more days, but once this is done, we have fix the
ACEmag
repository and start implementing a correct model for magnetism. I will initially only implementO3O3
i.e.r, s
are NOT coupled, but it should be relatively straightforward to also include spin-orbit coupling if this is of interest. In fact this is the more canonical symmetry from my perspective and I want to get it done soon-ish anyhow.