Closed kbarros closed 7 months ago
I think it is working as expected. Maybe Bhushan intended to call basis_for_exchange_on_bond
, which includes logic for performing transformations relative to a reference bond. See usage example below. The choice b_ref=nothing
refers to the reference bond that appears in print_symmetry_table
. To have discovered basis_for_exchange_on_bond
, one could inspect the code for print_bond
.
Beware: Any function that must be accessed as Sunny.*
(including these ones) is an internal function. Any code that uses these functions will easily break with new Sunny releases.
b = Bond(1, 1, [0, 1, 0])
basis = Sunny.basis_for_exchange_on_bond(cryst, b; b_ref=nothing) # Alternatively, b_ref=b
for (basis_matrix, letter) in zip(basis, 'A':'Z')
basis_strs = Sunny.coupling_basis_strings([(letter, basis_matrix)]; digits=3, atol=1e-8)
println(Sunny.formatted_matrix(basis_strs; prefix="Basis matrix: "))
end
#=
Basis matrix: [ (1/4)A -(√3/4)A 0
-(√3/4)A (3/4)A 0
0 0 0]
Basis matrix: [ (3/4)B (√3/4)B 0
(√3/4)B (1/4)B 0
0 0 0]
Basis matrix: [0 0 0
0 0 0
0 0 C]
Basis matrix: [ 0 0 -(√3/2)D
0 0 -(1/2)D
-(√3/2)D -(1/2)D 0]
=#
From Bhushan on Slack: