Closed Lazersmoke closed 9 months ago
Overall this looks good to me. There is a failing test on line 6 of test_correlations.jl due to I
not being defined?
sc = dynamical_correlations(sys; Δt = 0.1, ωmax = 10.0, nω=100, observables = [:A => I(2), :B => I(2)])
Lets discuss at the meeting: Are these the correct correlations to be computing? I think that they are but I'm still in the process of verifying this myself. In particular, how are correlations at negative times to be treated (currently, see below, all correlations are at positive times)? This can be very relevant for glassy systems.
Ok, status update on this PR:
2pi
in LSWT which needs to be put somewhere/documented. Since the classical code is changing to allow for asymmetric correlations, the FFT factor is also changed, and I don't know how to verify these are compatible in the correct wayThose bolded points should be addressed before merging.
changes to BandStructure
, which I need as hooks for susceptibility code, but which are also relevant here due to the 2pi
factor change (which is conceptually about what are the semantics of BandStructure
/"the residues")
Base.map
instance for BandStructure
. I want to export the BandStructure
type because it's so user-friendly. Objections?intensities_band_structure
function, which does the same thing as intensities_bands
but returns the result in terms of BandStructure
instead of ad-hoc listsOther stuff that's in this PR due to churn but is helpful and should stay:
plot_band_intensities
function, which does what the FeI2 tutorial does with the colored lines.kT
spin wave interface, which is not yet implemented but has interplay with the changes in this PRThis is ready to merge in my opinion!
If this works like we're hoping then we can get rid of process_trajectory
kwarg, e.g., these docs.
- `process_trajectory`: Specifies a function that will be applied to the sample
trajectory before correlation analysis. Current options are `:none` and
`:symmetrize`. The latter will symmetrize the trajectory in time, which can
be useful for removing Fourier artifacts that arise when calculating the
correlations.
After the Zoom call, my understanding is that the normalization of LSWT intensities is exactly unchanged, but we need to verify the normalization of intensities from classical dynamics. Specifically, is there a test of the sum rule? Also, if the overall scaling factor is changing anywhere for intensities, we need to document this as a breaking change in versions.md
Thanks for making all these revisions. I'll spend some time with this tomorrow (run some tests, make sure I understand more of the details). This seems like a neat approach.
Closing in favor of #217
Out of equilibrium, correlations <A(t) B(0)> and <B(t) A(0)> are different; https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.131.077101
This PR adds support for asking Sunny for these asymmetric correlations. In the LSWT case, this does nothing because the Sab tensor is explicitly symmetric there (for now).
In the classical case, this PR makes two changes:
:all_available
is allowed, which is documented and comes with flavor text explaining the order of the correlations within the vector of correlations that is returned. This is mainly to allow users to ask for (Sx,Sy) and (Sy,Sx) correlations easily without requiring a custom intensity formula and without computing all 9 correlations. By default now, all 9 3x3 dipole-dipole correlations are computed, since they are generally different. Having an asymmetric Sab tensor means that you are out of equilibrium, and is one way to recognize that Langevin didn't do what you wantedThere is a test now which compares the new method of correlation calculation to an FFT-less reference computation.