Share Your Experience: Take the 2024 Developer Survey

# Tag Info

Accepted

### Parallel Mersenne Twister for Monte Carlo

Like you say, using the Mersenne Twister for parallel computations is almost always done incorrectly, as the correct method is tricky to implement. By far the easiest and best answer would be to move ...
• 2,493

### Implementation of Monte-Carlo Integration

From Wikipedia: The naive Monte Carlo approach is to sample points uniformly on Ω[...] There is an implicit assumption here that a uniform distribution on $\Omega$ exists. It is well-known that such ...
• 2,546
Accepted

### Why the magnetisation shows abrupt behaviour for this 3D ising spin system

Your lattice consists of 5 x 5 x 5 = 125 spins, so your number of Montecarlo steps to reach equilibrium should be >> 125, because you randomly picking a site and flipping it, so random numbers should ...
• 276

### Python implementations of Gillespie's direct method

As part of the lab the developed and maintains StochKit. I am happy to hear that it is highly recommended in the previous answers. However, I wanted to update everyone. There already is a python ...

### Mean-squared displacement in Monte Carlo studies

It is in some cases possible to map the dynamics obtained in MC simulations to other (more realistic) dynamics, especially for the case of dense colloidal suspensions. The following two papers talk ...
• 677
Accepted

### Mean-squared displacement in Monte Carlo studies

This is possible (see [1]) but uncommon, as it requires Monte Carlo moves that alter the current conformations by a very small perturbation. In that setting of "small" Metropolis MC moves, it is ...
• 3,994
Accepted

### Absence of Discontinuity in Specific Heat Plot Simulated by Ising Model

I sincerely thank @Daniel Shapero for directing me towards this answer. Discontinuity in the specific heat or susceptibility curves to be visible significantly, you should take much more finer ...
• 276
Accepted

### Use Monte Carlo integration to compute the volume and centre of mass in Python

Here is a corrected and slightly improved code, set up here for calculation of the full torus volume to verify the result. ...
• 2,545

• 2,155

### How to sample points in hyperbolic space?

I'm in the middle of doing this for myself. I think the most appropriate analogue to the Gaussian would be the heat kernel in hyperbolic space. Fortunately, this has been figured out before: https://...

### Simple Monte Carlo in C++, result dependent from seed

As noted in the comments by Kirill, the y-axes of the two plots are very different. And if they are rescaled accordingly, the boxes will certainly look very similar, if not identical. Therefore, it ...
• 8,672

### How to optimize sampling for global sensitivity analysis

What you're looking for goes under the name of quasi-Monte Carlo (QMC) sequences. Quasi Monte Carlo sequences are "more random than random", i.e. they fill high dimensional spaces better ...
• 12.3k

### Calculation of Mean Square Displacement for Brownian dynamics system with Lennard Jones interactions in python3

This will not an answer to your problem, more an excessive comment and few things you might consider, when writing such code even for self educational purpose. Constants You asked whether your ...
• 1,285
Accepted

### Automatic Differentiation In the Presence of Jump Points

Finite differences, when applied to a function from $\mathbb{R}$ to $\mathbb{R}$ with a discontinuity, will do a better job of capturing the nature of the derivative, which is no longer a function but ...
• 56

### Determining the importance of different parameters in a simulation

Optimal sampling will in general depend on one's objective. From the title it seems you are mainly interested in variable importance. This is typically one of the objectives of sensitivity analysis, ...
• 465

• 143

### Estimate information entropy through Monte Carlo sampling

If I understand what information you have available, what you want is not possible: the information available to you is not enough to determine the entropy. It's not even enough to approximate the ...
• 462

• 451
Accepted

### Different questions about "Inverse Physics problems"

As I understand, your ultimate goal is to solve an inverse problem (i.e., infer some parameters from given data / observations). To this end, you want to apply Bayesian Inference, which relates the ...
• 451

### Monte Carlo simulation of many-body wave function overlaps

You are right that $\psi_2^\ast\psi_1$ is not a probability distribution (not even a non-normalized one) because it is complex-valued and possibly negative. But $p(r)=|\psi_2(r)^\ast\psi_1(r)|$ can ...
• 55.7k
Accepted

### Is it possible to run a Metropolis Monte Carlo simulation in parallel?

In short, yes. Mathematically you are free to separate any integral into parts over the integration domain. If you later add the results of these integrations, then the partial sums add up to the same ...
• 2,935
Accepted

### Use of Metropolis-Hasting algorithm for gathering statistics

Your post actually contains two questions: 1) What should you calculate This first question will be answered by defining what you are studying. If it is the magnetic properties of your system (usual ...
• 323
Accepted

### Variational Monte Carlo: Variational energy is lower than ground state energy

The trial wavefunction, $\exp(-1.2r)$, does not respect the cusp condition - the derivatives of the wavefunction need to cancel the $1/r$ Coulomb term. Without a correct cusp condition, the local ...
Accepted

• 3,994