Analysis: order parameter for multi-orbital models
The analysis programs cov_tau.F90
and cov_eq.F90
compute susceptibilities and analog quantities, by taking the trace of the NorbxNorb matrix of correlations.
Analysis/cov_tau.F90: 176-180
do nt = 1,Lt_eff
do no = 1,Norb
bins(n,nt,nb-n_skip) = bins(n,nt,nb-n_skip) + OneBin(nt,no,no)
enddo
enddo
I think it would be useful to allow for a generic linear combination of the correlation matrix instead of the trace. Relevant example: an antiferromagnetic model with unit cell of 2 elements, where you want to compute the correlations of AF order parameter defined as
O(site) = S(site, norb=1) - S(site, norb=2)
Then you need to write something like
do nt = 1,Lt_eff
bins(n,nt,nb-n_skip) = bins(n,nt,nb-n_skip) + OneBin(nt,1,1) - OneBin(nt,1,2) - OneBin(nt,2,1) + OneBin(nt,2,2)
enddo
One can solve the problem by creating a suitable observable in the Hamiltonian code. A more flexible possibility is to add an array parameter in the VAR_errors
that stores the desired "weights" for the susceptibilities. Something like
parameters:
&VAR_errors
weight(1,1) = 1.D0
weight(1,2) = -1.D0
weight(2,1) = -1.D0
weight(2,2) = 1.D0
cov_tau.F90:
do nt = 1,Lt_eff
do no = 1,Norb
do no1 = 1,Norb
bins(n,nt,nb-n_skip) = bins(n,nt,nb-n_skip) + OneBin(nt,no,no1) * weight(no, no1)
enddo
enddo
enddo
Array weight
should be initialized to an identity matrix in the analysis program, so to have a "fallback" case of the trace, with no input weights.
Waiting for your input on the matter.