Questions on Monte Carlo methods, methods that require the repeated generation of (pseudo-, quasi-)random numbers for computing their results.

learn more… | top users | synonyms

1
vote
1answer
77 views

Efficiently rotate vector in 2D (and 3D)

I need to efficiently rotate a 2D (and 3D) vector in a CUDA kernel. I was thinking about generating random unitary rotation matrices. I don't need to know the angle, it just has to be randomly ...
9
votes
3answers
228 views

Parallel Mersenne Twister for Monte Carlo

Recently, I came across a comment claiming that almost all researchers doing Monte Carlo methods are doing it wrong. It went on to elaborate that merely choosing different seeds for different ...
0
votes
0answers
27 views

Choosing Size of “Bin” in Umbrella Sampling Simulation of Ising Model

I'm studying Monte Carlo simulation techniques with 2-dimensional Ising model. It was easy to write a code simulating 2D Ising model, based on Metropolis algorithm. However, when it comes to concepts ...
2
votes
1answer
48 views

Use of Metropolis-Hasting algorithm for gathering statistics

I understand how MH work, I'm able to use it to simulate e.g. 2D Ising model. What I don't understand is what you actually take average of. When I run the simulation, it reaches equlibrium after some ...
3
votes
1answer
64 views

Efficient Quadrature Methods for Indicator Functions?

I am looking to numerically solve many different integrals where the integrand is simply the indicator function for a region (i.e. 1 on the region, 0 outside. This is for measuring areas). The ...
2
votes
1answer
60 views

Monte Carlo Metropolis method - trial step algorithm

I'm working on a Magnetization simulation and writing an algorithm using the metropolis method. I am using a change in energy and a Boltzmann distribution, but, my question is about the trial step. ...
5
votes
1answer
92 views

Convergence of Monte Carlo integration

In my research, one of the steps is to choose a numerical method to estimate $\int_a^b f(t)dt$, where $f$ is Lipschitz continuous but not differentiable. For simplicity, I used midpoint rule but the ...
2
votes
2answers
113 views

How to choose the number of random points in Monte Carlo simulations?

I am struggling with convergence criteria when performing a Monte carlo simulation on a uniform distribution. Any help would be much appreciated ! Say I want to sample uniformly a 1D interval (for ...
0
votes
1answer
82 views

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

I'm writing a VMC simulation for hydrogen and helium atoms, but in both my codes my variational energy for certain wavefunctions is not only statistically different from my expectation value, but it ...
1
vote
0answers
80 views

Maxwellian distribution of velocities with Shake algorithm present

I am writing a code to perform hybrid monte carlo molecular dynamics. To do this, I need to have a code to initialize the velocities of all particles according to a maxwell distribution. The code is ...
1
vote
0answers
41 views

Variational Monte Carlo to calculate local energy of hydrogen like ions in python

I'm writing up a code to calculate the local energy for electrons in hydrogen like ions for a given wavefunction. My code is giving me weird results, which leads me to believe something is wrong. ...
4
votes
1answer
54 views

Optimal partitioning of a graph

Consider a planar graph, where each node is associated with a weight. I would like to partition the graph such that the sum of the node weights in each group satisfy a minimum requirement. However, I ...
0
votes
0answers
72 views

Monte Carlo simulation

I am wondering if I am thinking correct about the following problem : ...
2
votes
1answer
142 views

Monte Carlo Double Integration Implementation

Am implementing a monte carlo integration routine to compute this double integral in eqn 0.3 of page 2 of this paper 'Mobius energy of knots and unknots', Annals of Mathematics, http://www.math.ucsb....
2
votes
1answer
85 views

Metropolis Monte Carlo integration of Area with unknown normalization

I probably miss something very basic. I don't see how to use Metropolis–Hastings algorithm for computation of integrals, if I don't know the volume of accessible phase space (i.e. proper normalization ...
3
votes
0answers
74 views

How to sample points in hyperbolic space?

Hyperbolic space in the Poincaré upper half space model looks like ordinary $\Bbb R^n$ but with the notion of angle and distance distorted in a relatively simple way. In Euclidean space I can sample a ...
0
votes
0answers
51 views

Monte Carlo sampling of particle system for velocity dependent potential

When sampling configurations of point particles in statistical mechanics by means of (Markov chain) Monte Carlo, we may work with a potential that only depends on the positions of the particles, and ...
7
votes
1answer
70 views

Choosing how many iterations to use in VEGAS

I'm using VEGAS integration, specifically the GSL implementation, for some QCD calculations, and I've been investigating the behavior of the algorithm for various numbers of iterations in an attempt ...
1
vote
0answers
57 views

Spin-spin correlation functions in the Ising Model Monte Carlo

I'm using the Metropolis algorithm for 2D up to 5D for the Ising Model and I want to compute the spin-spin correlation function. $$c(r)=<s_is_r>−〈s_i〉〈s_r 〉$$ but I'm not sure how to estimate $...
1
vote
1answer
23 views

Monte Carlo update based on sub-lattices

I would like to simulate a 2D classical spin system, whose interactions are only nearest neighbor, using Monte Carlo. I would like to use Metropolis for updating. I have seen that when updating one ...
1
vote
1answer
88 views

Parallel Monte Carlo simulation using PETSc

I am trying to do Monte Carlo simulation for a large problem which requires eigensolution of a matrix for each sample. The matrix itself is quite large so much so that I want the eigensolution itself ...
2
votes
1answer
94 views

What are the tradeoffs of using statically allocated arrays vs. pointers and dynamic allocation? [closed]

I am learning Monte Carlo simulation by C++. I begin with reading codes (from the internet and text books) of the 2D Ising model and the XY model. I find some people define spins simply by a two ...
3
votes
0answers
76 views

Tracking the speed of 2D oscillations on a lattice

I wrote a Monte Carlo simulation of the 2D Lotka-Volterra model on a discrete lattice (with periodic boundary conditions). A video that I produced (which images the system after some number of monte ...
0
votes
0answers
43 views

Monte Carlo simulation of a spin model and kinetic term

I have some C code simulating the following spin model (XY model) $$ H = - J \sum_{\langle ij \rangle} cos \left( \theta_i - \theta_j \right) $$ Now I'd want to extend my code to include a "kinetic ...
3
votes
1answer
108 views

Monte Carlo Simulation - Random Number Motivation

For Monte Carlo simulations, or any other numerical methods that rely heavily on the quality of the pseudo-random numbers generated (i.e even/desired distribution on a certain domain) for that matter, ...
2
votes
1answer
160 views

Are there companies which create commercial molecular dynamics / monte carlo simulations? [closed]

I would like to know if there is a commercialization of simulations? Or is it only in academic usage?
0
votes
1answer
69 views

How to get values from the loop in MATLAB?

Could you tell me please how to obtain separate values of "pi" depending on the value of N (code below)? For example If I write "pi1" I will get a value of "pi" for N(1) where N(1)=100. If I write "...
3
votes
1answer
64 views

Extract the correlation matrix from Monte Carlo data

I am writing my undergrad thesis on the harmonic oscillator on a lattice. So far I have implemented the Metropolis Monte Carlo algorithm to generate trajectories $x_j$ for $0 \leq j < N$, where $N$ ...
0
votes
1answer
118 views

optimizing a discontinous function

I am trying to maximize the following function (variable:\theta, a vector ($\theta_1$,...,$\theta_K$). most likely K <=5 $F(\theta, c_0, c_1) = P_{\theta}(T_0 > c_0, \max T_i >c_1, \min T_i &...
6
votes
1answer
1k views

Quasi Monte Carlo in Matlab

I want to use Quasi Monte Carlo to try and improve the convergence of a simulation I am running. The random numbers are simply to produce the observation errors for a standard linear regression model,...
10
votes
2answers
244 views

Regarding automatic differentiation, is source-code-transformation (STC) more efficient than operator-overloading (OO)?

We are working on a Bayesian model for a space-time process, and are using a No-U-Turn sampler (NUTS) that requires a model for the log-probability and it's gradient with respect to the model ...
7
votes
1answer
88 views

Shall I derandomize a randomized algorithm in real application?

In general (and in real application), suppose I am using a randomized algorithm (e.g. Use MCMC to sample from a distribution and then compute $E(f(x))$ for some function $f$) Assume my algorithm will ...
9
votes
2answers
225 views

suggestion for managing simulation runs?

This questions may be a bit off-topic in comp-sci. if it is needed please suggest where does it fit with. The question is regarding on how to manage all the simulation runs efficiently. let's say, ...
5
votes
1answer
150 views

Generation of variable with given auto-correlation function

How can I generate realizations of random complex variable x(t) with given auto-correlation function C(s), defined by C(s) = < x(s)x(0) > and obeying the condition C(-s) = C^*(s) ? Any link ...
3
votes
3answers
132 views

Separation of degrees of freedom in Monte Carlo simulation

My question is probably very simple and deals with separation of degrees of freedom in a Monte Carlo Brownian dynamics simulation. Dealing with a particle in an external potential, I want to simulate ...
5
votes
3answers
729 views

How to sample numerically from an arbitrary smooth distribution?

I'm given a smooth probability density function via its values on a reasonable fine grid. I assume that cubic spline interpolation (or cubic spline interpolation of the logarithm of the density) will ...
3
votes
0answers
67 views

Stochastic Collocation for time evolving ODE

For an Stochastic Differential Equation, e.g., $$ \frac{du}{dt} = \alpha*\sin(u*t) $$ where $\alpha$ is normally distributed with nonzero mean, I am trying to use a stochastic collocation approach ...
10
votes
2answers
227 views

Numerical method for equation solving that works on stochastically computed functions

There are many well known numerical methods for solving equations of the type $$ f(x) = 0, \quad x \in \mathbb{R}^n,$$ e.g. bisection method, Newton's method, etc. In my application $f(x)$ is ...
0
votes
2answers
267 views

What is local Monte Carlo simulation?

"The traditional local Monte Carlo method is simple, extremely general, and versatile." -Wang Swendsen, 2002 What does 'local' Monte Carlo mean ? Is there anything called 'global' Monte Carlo?
9
votes
2answers
345 views

Confusion about Quantum Monte Carlo

My question is about extracting observables from QMC methods, as described in this reference. I understand the formal derivation of various QMC methods like Path Integral Monte Carlo. However, at the ...
4
votes
2answers
200 views

Convergence tests in Markov Chain Monte Carlo

For a relatively simple Markov chain Monte Carlo process, such as using Metropolis to find calculate thermal averages for an Ising model, how is it possible to determine whether quantities have ...
3
votes
1answer
121 views

Is using Monte Carlo method a good approach for solving Boltzmann equation?

I'm trying to solve for electron and hole distribution function using Boltzmann equation with various scattering mechanisms. Since I land up with an integro-differential equation, analytical solution ...
2
votes
1answer
100 views

What FCIQMC codes are out there?

Full configuration interaction quantum Monte Carlo seems like it is poised to overtake DFT in some applications pretty soon. I am curious if there is any freely available implementation of the method,...
1
vote
1answer
58 views

DIST strings - Monte Carlo Simulation

I recently read something that talks about DIST distribution strings. It appears to be a way to take a long string of previously generated numbers and somehow compress them into a string that can ...
5
votes
3answers
267 views

Monte Carlo approximation of PI

I'm trying to understand how to compute the value of Pi by means of the Monte Carlo simulation. I have a circle inside a square where the sides of the square are tangent to the circle. As data I have ...
11
votes
4answers
725 views

Parallel (GPU) algorithms for asynchronous cellular automata

I have a collection of computational models that could be described as asynchronous cellular automata. These models resemble the Ising model, but are slightly more complicated. It seems as if such ...
4
votes
3answers
148 views

nuclear reaction fluid modelling

I'm pretty ignorant regarding the dark arts of numerical codes and modelling, but i'm interested in trying to pursue it for a particular pet project. It regards modelling of nuclear reactions like ...
7
votes
2answers
103 views

Approximation of partial derivative of a function of stochastic variable

Let $X_t$ be an Ito process $$ dX_t=a(X_t,t)dt + b(X_t,t)dW_t $$ where $W_t$ is a Wiener process. A numerical approximations of the solution of this equations is proposed by Milstein: $$ X_T=X_t+...
5
votes
1answer
371 views

index representation of the diamond lattice

For a kinetic Monte Carlo simulation of solids that crystallize in the diamond lattice structure, I need some efficient representation of the diamond lattice as integer(s), to store it in some array-...
8
votes
1answer
203 views

Rebinning algorithm in VEGAS

I am trying to understand the rebinning algorithm of the VEGAS (original publication (preprint from LKlevin) and implementation notes) Monte Carlo integration. I will try to explain first what I think ...