7
$\begingroup$

The radial distribution function is defined as:

$$g(r)=\frac{dn}{4\pi r^{2} dr \rho}.\tag{1}$$

Why, in the calculation, do you divide twice by the number of molecules? What I mean is something like the following:

G(R) = G(R)/REAL(N)/REAL(N)/REAL(CONFIG)
G(R) = G(R)*BOX/(4.0D0*PI*R**2*BIN)

I get that you need to divide by the number of molecules because that's built into the definition of the number density $\rho$, but I don't get why you need to divide twice by the number of molecules.

$\endgroup$
4
  • 3
    $\begingroup$ It's because you are generating the average RDF for all atoms in the system for all configurations considered - the extra 1/(number of atoms * number of configs) factor comes from that averaging. $\endgroup$
    – Ian Bush
    Nov 10 '21 at 8:23
  • $\begingroup$ Could you define the variables of your formula (CONFIG, BIN, etc.) and explicit where this formula is coming from? $\endgroup$
    – Hebo
    Nov 10 '21 at 11:32
  • 2
    $\begingroup$ +1. But do you have any answer to Hebo's question? We generally close abandoned questions after a couple weeks if it looks like the OP is no longer interested (i.e. not answering follow-up questions). This has led to our (small) unanswered queue being very manageable, and therefore when people look at the unanswered queue, instead of there being a mountain of work to do, there is a much more "doable" list of tasks. We close abandoned questions so that we can focus more on the questions that really matter to people! $\endgroup$ Nov 18 '21 at 0:39
  • $\begingroup$ This question has been closed as it seems to be abandoned. It can be reopened if someone wants to add an answer or the OP addresses questions/suggestions in the comments. $\endgroup$
    – Tyberius
    Jan 10 at 22:10