I have no background in chemistry.

But, I have a good background in mathematics and computer programming.

I have planned to simulate the collision of two simple molecules $\ce{Br2}$ and $\ce{H2}$ just for fun and using state space and Ordinary Differential Equation (ODE) to simulate.

I have considered 24 states for simulations of their collision. The state vector is X, and the state space representation is:


Atom numbering

1: Br
2: Br
3: H
4: H

The 24 states for vector X are:

x1, x2, x3:  position of atom 1 in x, y, z axis
x4, x5, x6:  position of atom 2 in x, y, z axis
x7, x8, x9:  position of atom 3 in x, y, z axis
x10,x11,x12: position of atom 4 in x, y, z axis
x13,x14,x15: velocity of atom 1 in x, y, z axis
x16,x17,x18: velocity of atom 2 in x, y, z axis
x19,x20,x21: velocity of atom 3 in x, y, z axis
x22,x23,x24: velocity of atom 4 in x, y, z axis

To make a simulation, I need to know two things:

  1. Are the mentioned states enough to describe the entire system? Are there more states to be added?
  2. What are the forces applied to each atom at each moment?

$\frac{d x_1}{d t}=x4$ (derivative of position is velocity)

$\frac{d x_4}{d t}=\frac1{m_{Br}}(???????)$ (derivative of velocity is acceleration)


1 Answer 1


There are two types of molecular simulation (in a broad sense), namely
1) Monte Carlo simulation
2) Molecular dynamics simulation
And they can be mixed together to give rise to new algorithm. According to your problem statement I am assuming you are trying to use molecular dynamics simulation. There are lots of things you should consider for your simulation system. According to your problem statement your atoms have position and velocity, but the problem is when they will collide each other they will loose energy and will come to a halt after few time steps. Either you can use thermostat to keep the temperature constant (Anderson thermostat and Nose-Hoover thermostat), or you can use constant pressure molecular dynamics simulation. For a beginner I would like Anderson thermostat as this is very simple technique. Then you have to use Newton's second law to determine the force and velocity on each atoms. After that you can use numerical integration technique to find new position based on F=ma formulation. Now you will repeat this task to get the trajectory of individual atoms.

If you want to find the diffusion coefficient of atoms, you can use lattice gas models or Ising models based on random Monte Carlo movement. I wrote a python code for finding diffusion coefficient. Also you can use Markov Chain Monte Carlo (MCMC) method to determice the stochastic evolution of the system.

For your better understanding I would suggest to use Understanding Molecular Simulation by Daan Frenkel & Berend Smit

  • $\begingroup$ Thanks a lot. Is Monte Carlo used on atoms? I mean for 4 atoms is Monte Carlo necessary too? My aim is not to simulate a mass of atoms despite I know that is the applicable approach. In addition, are orbitals or their interactions considered? And is there any sample code in this field to give me some intuition? $\endgroup$
    – ar2015
    Commented Jan 19, 2016 at 22:36
  • $\begingroup$ Please see the attached URL for example code: cchem.berkeley.edu/chem195/files.html acclab.helsinki.fi/~knordlun $\endgroup$ Commented Jan 20, 2016 at 2:20
  • $\begingroup$ Usually ab Initio calculations are carried out separately. Because doing molecular simulation with on the fly ab Initio techniques is not worth the time and effort. However Monte Carlo or molecular dynamics techniques are being used to explore the potential energy surface but that's different story. $\endgroup$ Commented Jan 20, 2016 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.