Dear LAMMPS-users,

Can you explain to me please, how work fix ave/correlate? How it calculates correlation function, those formulas, that averaging it use, etc?

Best regards,

Sergey Klyavinek

DMCP MIPT

JIHT RAS

Dear LAMMPS-users,

Can you explain to me please, how work fix ave/correlate? How it calculates correlation function, those formulas, that averaging it use, etc?

Best regards,

Sergey Klyavinek

DMCP MIPT

JIHT RAS

Well, yeah, I saw it, but I asked about details of work of this function. How it calculates correlation functions, what averaging and formulas it use during the computation? I didn’t find some information in the Manuals about that.

Best regards,

Sergei Kliavinek

DMCP MIPT

JIHT RAS

Well, then you must be looking at a different page or didn’t read it completely, since it explains in detail what it computes and how it averages its data. So if you still have questions you need to be more specific.

How correlation functions work in general is something that you should look up in an MD or Statistical Mechanics text book. The LAMMPS manual is a manual not a tutorial or text book.

Axel.

I’m sorry, but you don’t understand, that I mean. I will be more accurate. How calculating correlation function realized in LAMMPS? For example, if we talk about the auto-correlation function of pressure - that makes code with the pressure? Just multiplies the pressure in the system at time T and 0? Or it calculates the pressure in different parts of the system, calculates the ACF, and then averaging it? How works averaging of ACF for different steps (Nfreq and 2*Nfreq, for example)? Exist lots of ways to realize this code, I’m interested in the realization in LAMMPS.

Best regards,

Sergei Kliavinek

DMCP MIPT

JIHT RAS

You are not paying attention. The fix takes “numbers” from compute styles, fix styles, variables and then processes them *exactly* as described. Nothing else. It is *NOT* a complete analysis tool but just does the bare autocorrelation as outlined in the manpage. The fix does not care where the data is coming from, so it is up to you what you compute and feed it. If you need to know how this is realized in detail, you have to look at the source code.

axel.

My question is exactly what is meant by the phrase “* exactly * as described”. Here is the following line in the code:

fix SS all ave / correlate s p $ d &

v_pxy v_pxz v_pyz type auto file S0St.dat ave running

What does this command do with v_pxy v_pxz v_pyz? What does a function look like that has v_pxy v_pxz v_pyz at the input and ACF values at the output? I know what ACF is in principle and what it means, I wonder how it is realized in LAMMPS. What does the formula inside LAMMPS look like that counts as ACF?

please read the section that starts with:

The Nevery, Nrepeat, and Nfreq arguments specify on…

that is the explanation. if that does not satisfy you, then I don’t know how else to explain it. because that is what happens.

v_pxy and so one are just numbers (a scalar to be precise), v_pxy refers to an (equal style) variable, how those come to be is explained in the documentation for the variable command.

same for items with c_xxx or f_xxx that refer to computes and fixes. those will all be updated/recomputed as needed and as explained in their respective documentations.

axel.

I’ll put it another way. How mathematically looks like formulae for calculating ACF inside the LAMMPS? Not a definition of ACF, how it realized exactly in LAMMPS, inside the code?

Sergey Klyavinek

DMCP MIPT

JIHT RAS

we are going in circles here. you keep asking essentially the same thing, which *is* explained in the section of the manual i pointed out to you. that *is* what LAMMPS is doing. i don’t know any other way of describing it.

and i keep telling you that if you want to know what is done at the source code level, you must read the source. i have nothing else to add here and will not respond unless you are actually asking for something new.

axel.