Skip to content

Commit

Permalink
Fewer digits in print_site
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarros committed Sep 12, 2024
1 parent 407f1cc commit 7db732d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Symmetry/Printing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function print_site(cryst, i; R=Mat3(I), ks=[2,4,6], io=stdout)
# Tolerance below which coefficients are dropped
atol = 1e-12
# How many digits to use in printing coefficients
digits = 14
digits = 12

R = convert(Mat3, R) # Rotate to frame of R
basis = basis_for_symmetry_allowed_couplings(cryst, Bond(i, i, [0,0,0]))
Expand Down
24 changes: 12 additions & 12 deletions test/test_symmetry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -352,22 +352,22 @@ end
@test capt.output == """
Atom 1
Type 'A', position [0, 0, 0], multiplicity 1
Allowed g-tensor: [ A 0.99477085418143B 0.9973854270966B
0.99477085418143B A+0.0052086199122802B B
0.9973854270966B B A+0.010458363505807B]
Allowed g-tensor: [ A 0.994770854181B 0.997385427097B
0.994770854181B A+0.00520861991228B B
0.997385427097B B A+0.0104583635058B]
Allowed anisotropy in Stevens operators:
c₁*(0.49738542709071𝒪[2,-2]+𝒪[2,-1]+0.0013090089249443𝒪[2,0]+0.9973854270966𝒪[2,1]-0.00130215497807𝒪[2,2]) +
c₂*(-0.99217670017751𝒪[4,-3]-0.28721519673245𝒪[4,-2]+0.14172382109594𝒪[4,-1]+0.00044802021878118𝒪[4,0]+0.14135327383353𝒪[4,1]+0.00075192934459334𝒪[4,2]+𝒪[4,3]) + c₃*(0.0052360356057008𝒪[4,-4]+0.0015196331083189𝒪[4,-2]-0.0059996651928777𝒪[4,-1]+0.19999762948495𝒪[4,0]-0.0059839786308337𝒪[4,1]-3.9783992635333e-06𝒪[4,2]+𝒪[4,4]) +
c₄*(0.0052360356057007𝒪[6,-4]-0.010471999248475𝒪[6,-3]+0.0034538955142365𝒪[6,-2]+0.003527316243365𝒪[6,-1]-0.047617714632395𝒪[6,0]+0.0035180938178929𝒪[6,1]-9.042297969866e-06𝒪[6,2]+0.0105545708205𝒪[6,3]+𝒪[6,4]) + c₅*(𝒪[6,-5]-0.27082816027091𝒪[6,-3]+0.23926075574551𝒪[6,-2]+0.062498439695819𝒪[6,-1]+9.2324524923331e-05𝒪[6,0]+0.062335032968886𝒪[6,1]-0.00062638462484365𝒪[6,2]+0.27296363664099𝒪[6,3]+0.98699496268155𝒪[6,5]) + c₆*(𝒪[6,-6]+0.72731757693131𝒪[6,-3]-0.094716945779704𝒪[6,-2]+0.7272375592746𝒪[6,-1]+0.0010894295936808𝒪[6,0]+0.72533614365779𝒪[6,1]+0.00024796895071185𝒪[6,2]-0.7330524661597𝒪[6,3]-0.0078541431289843𝒪[6,6])
c₁*(0.497385427091𝒪[2,-2]+𝒪[2,-1]+0.00130900892494𝒪[2,0]+0.997385427097𝒪[2,1]-0.00130215497807𝒪[2,2]) +
c₂*(-0.992176700178𝒪[4,-3]-0.287215196732𝒪[4,-2]+0.141723821096𝒪[4,-1]+0.000448020218781𝒪[4,0]+0.141353273834𝒪[4,1]+0.000751929344593𝒪[4,2]+𝒪[4,3]) + c₃*(0.0052360356057𝒪[4,-4]+0.00151963310832𝒪[4,-2]-0.00599966519288𝒪[4,-1]+0.199997629485𝒪[4,0]-0.00598397863083𝒪[4,1]-3.97839926353e-06𝒪[4,2]+𝒪[4,4]) +
c₄*(0.0052360356057𝒪[6,-4]-0.0104719992485𝒪[6,-3]+0.00345389551424𝒪[6,-2]+0.00352731624337𝒪[6,-1]-0.0476177146324𝒪[6,0]+0.00351809381789𝒪[6,1]-9.04229796987e-06𝒪[6,2]+0.0105545708205𝒪[6,3]+𝒪[6,4]) + c₅*(𝒪[6,-5]-0.270828160271𝒪[6,-3]+0.239260755746𝒪[6,-2]+0.0624984396958𝒪[6,-1]+9.23245249233e-05𝒪[6,0]+0.0623350329689𝒪[6,1]-0.000626384624844𝒪[6,2]+0.272963636641𝒪[6,3]+0.986994962682𝒪[6,5]) + c₆*(𝒪[6,-6]+0.727317576931𝒪[6,-3]-0.0947169457797𝒪[6,-2]+0.727237559275𝒪[6,-1]+0.00108942959368𝒪[6,0]+0.725336143658𝒪[6,1]+0.000247968950712𝒪[6,2]-0.73305246616𝒪[6,3]-0.00785414312898𝒪[6,6])
Atom 2
Type 'B', position [1/2, 1/2, 0], multiplicity 3
Allowed g-tensor: [ A B 0.9973854270966D-0.99738542709661E
B A+0.0052359997183134B D-E
0.9973854270966D+0.9973854270966E D+E C]
Allowed g-tensor: [ A B 0.997385427097D-0.997385427097E
B A+0.00523599971831B D-E
0.997385427097D+0.997385427097E D+E C]
Allowed anisotropy in Stevens operators:
c₁*𝒪[2,0] + c₂*(𝒪[2,-1]+0.9973854270966𝒪[2,1]) + c₃*(𝒪[2,-2]-0.0026179998591567𝒪[2,2]) +
c₄*𝒪[4,0] + c₅*(𝒪[4,-1]+0.9973854270966𝒪[4,1]) + c₆*(𝒪[4,-2]-0.0026179998591571𝒪[4,2]) + c₇*(-0.99217670017751𝒪[4,-3]+𝒪[4,3]) + c₈*(0.0052360356057𝒪[4,-4]+𝒪[4,4]) +
c₉*𝒪[6,0] + c₁₀*(𝒪[6,-1]+0.9973854270966𝒪[6,1]) + c₁₁*(𝒪[6,-2]-0.002617999859157𝒪[6,2]) + c₁₂*(-0.99217670017751𝒪[6,-3]+𝒪[6,3]) + c₁₃*(0.0052360356056999𝒪[6,-4]+𝒪[6,4]) + c₁₄*(𝒪[6,-5]+0.98699496268155𝒪[6,5]) + c₁₅*(𝒪[6,-6]-0.007854143128983𝒪[6,6])
c₁*𝒪[2,0] + c₂*(𝒪[2,-1]+0.997385427097𝒪[2,1]) + c₃*(𝒪[2,-2]-0.00261799985916𝒪[2,2]) +
c₄*𝒪[4,0] + c₅*(𝒪[4,-1]+0.997385427097𝒪[4,1]) + c₆*(𝒪[4,-2]-0.00261799985916𝒪[4,2]) + c₇*(-0.992176700178𝒪[4,-3]+𝒪[4,3]) + c₈*(0.0052360356057𝒪[4,-4]+𝒪[4,4]) +
c₉*𝒪[6,0] + c₁₀*(𝒪[6,-1]+0.997385427097𝒪[6,1]) + c₁₁*(𝒪[6,-2]-0.00261799985916𝒪[6,2]) + c₁₂*(-0.992176700178𝒪[6,-3]+𝒪[6,3]) + c₁₃*(0.0052360356057𝒪[6,-4]+𝒪[6,4]) + c₁₄*(𝒪[6,-5]+0.986994962682𝒪[6,5]) + c₁₅*(𝒪[6,-6]-0.00785414312898𝒪[6,6])
"""
end

Expand Down

0 comments on commit 7db732d

Please sign in to comment.