Closed stestoll closed 2 years ago
Alternative (suggested by @cetait): Use a single function with an (optional) parameter specifying the interaction:
ham(Sys)
ham(Sys,B)
ham(Sys,"ez")
ham(Sys,"ez",e)
ham(Sys,"nz")
ham(Sys,"nz",n)
ham(Sys,"oz")
ham(Sys,"oz",o)
ham(Sys,"zf")
ham(Sys,"zf",e)
ham(Sys,"hf")
ham(Sys,"hf",[e n])
ham(Sys,"ee")
ham(Sys,"ee",[e1 e2])
ham(Sys,"nq")
ham(Sys,"nq",n)
ham(Sys,"nn")
ham(Sys,"nn",[n1 n2])
ham(Sys,"so")
ham(Sys,"so",[e o])
ham(Sys,"cf")
ham(Sys,"cf",o)
ham(Sys,"ezho")
ham(Sys,"ezho",o)
ham(Sys,"ezho",o,lB)
ham(__,"sparse")
Functions that return Hamiltonians are not systematically named; this should be improved. Proposal:
ham
- total Hamiltonian (instead ofsham
- since orbital terms can be included, it's not clean to call this a spin Hamiltonian)ham_ez
- electron Zeeman (instead ofzeeman
with appropriate indices)ham_nz
- nuclear Zeeman (instead ofzeeman
with appropriate indices)ham_oz
- orbital Zeeman (instead ofzeeman
with appropriate indices)ham_zf
- zero-field term (instead ofzfield
)ham_ee
- electron-electron (instead ofeeint
)ham_nn
- nucleus-nucleus (instead ofnnint
)ham_hf
- hyperfine (instead ofhfine
)ham_nq
- nuclear quadrupole (instead ofnquad
)ham_so
- spin-orbit (instead ofsoint
)ham_ez_ho
- high-order Zeeman (instead ofzeemanho
)ham_cf
- crystal field (instead ofcrystalfield
)Most of these functions (except
zeeman
) are currently only called insham
.Pros:
zeeman
into three functions, allowing simple access to electron, nuclear, and orbital Zeeman separately.ham
is a nicer word thansham
Cons:
hf
vshfine
.