I'm looking for a software or software package (for example C/C++) that can simulate a lot (say thousands at least) of molecules in action (ie. in movement or attached to say static walls).

I have found several but they seems to be either 'gas only', 'water only', or not really scientific (a lot of small balls dodging around moved by an unique formula).

  • $\begingroup$ Actually, there is an entire scientific field concerned with this, called Molecular Dynamics (MD) < en.wikipedia.org/wiki/Molecular_dynamics >. You can do anything from Newtonian Dynamics (calculating collision angles, momentum transfer etc.) to complicated Monte Carlo algorithms. I believe there actually exists an algorithm that can do this in a time log(N) (N = number of molecules). Check the wikipedia entry for a list of algorithms. $\endgroup$ – Gerben May 24 '11 at 8:03
  • $\begingroup$ Thank you very much, I'll check out Molecular Dynamics and the link you provided :-) ps. Interesting read about Monte Carlo algorithms. $\endgroup$ – Valmond May 24 '11 at 12:02

It most certainly exist outside secret labs :) Like Gerben wrote, the fields are called molecular dynamics (MD) and quantum chemistry which, as computers grow faster, will be essential tools of nanotechnology and medicine.

Molecular Dynamics is currently implemented by making certain approximations in that electron motion is not explicitely modelled. In practice, empirical forcefields are matched to experimental data and molecules are essentially modelled by summing the forces on each atom and using $F=ma$, then integrating the acceleration over time.

It's far from perfect - you usually can't match all measurable physical properties of a medium like water at the same time with the same forcefields. You can't normally model shifts of covalent bonds either since that involves changing the molecular composition which breaks the forcefield definitions. On the other hand, the methods are relatively quick and you can easily simulate systems of hundreds of thousands of atoms over a timescale of at least nanoseconds (microseconds if you have access to a supercomputer :). To interpret results you need some understanding of the deficiencies of the algorithms though.

Some interesting large simulations to date was of the protein factory, the ribosome, probably the evolutionary oldest complex part of life, and of a complete virus, the Satellite Tobacco Mosaic Virus. Below is a snapshot of a simulation I did of ion-channels in a cell membrane, you see a drug molecule bound in white in the center: forest of ion channels

I would think that the most used (free) simulators are GROMACS and NAMD, with somewhat differing strengths but both are probably OK to start with. Usually paired with decent graphical tools to visualize what happens like PyMOL or VMD.

It's not particularly difficult to learn about this by writing your own simple simulator as well, if you're so inclined. In either case, simulating a 2x2x2 nm box of argon atoms or water-molecules for example illustrates many of the concepts.

Quantum Chemistry involves getting one step lower into the motion and shifts of the electrons. Thus you can simulate the breaking and bonding of covalent bonds and you don't have to rely on empirical forcefields for every molecule/atom you need in your simulation. However it's a lot slower computationally obviously (a factor of 100 at least? I'm not sure). You might use this to model in detail the mechanism of an active site in an enzyme for example.

The reason these are important fields for nanotech and medicine is that the simulations are the equivalents of the act of compiling and testing a program in computer software design, when it comes to designing new drugs and nano-scale machinery or materials. Essentially you want methods to test your ideas without manufacturing them first, and computer simulations take advantage of Moore's law which says that computing power doubles every 18 months...

| cite | improve this answer | |
  • $\begingroup$ Darn, you beat me to the punch. :D $\endgroup$ – Richard Terrett May 24 '11 at 9:11
  • $\begingroup$ I would like to add that the thing that makes QM calculations slow is the scaling of the algorithms involved, which can render calculations above a certain size infeasible on any conventional computer (some methods scale factorially with the number of electrons IIRC!). $\endgroup$ – Richard Terrett May 24 '11 at 9:18
  • $\begingroup$ hehe.. yes, there could be written so much on the subject and I had to stop somewhere. the scaling problem is a big problem even for Moore's law as (for MD) it starts at O(N^2) and even with O(N*logN) scaling, a 3D box increases its volume VERY fast :/ $\endgroup$ – BjornW May 24 '11 at 9:25
  • $\begingroup$ Oh thanks you both, I definitely got an answer for my question so I'll marked it as such, now I got a lot more information to dig through, I feel I'll be back for more :-) $\endgroup$ – Valmond May 24 '11 at 11:39
  • $\begingroup$ @Valmond, for some very cool M.D. papers, be sure to check out the publications coming from David Shaw's research group: (deshawresearch.com) $\endgroup$ – TheSheepMan Jul 30 '11 at 15:52

Simulating the time-evolution of thousands of molecules interacting is generally the domain of molecular dynamics. MD codes usually dramatically simplify calculation by modelling atoms classically, generally with predefined connectivity, heavy parameterisation and bonds modeled by harmonic potentials. Whilst such approaches can give decent results for things like protein conformations they completely neglect quantum mechanics and as such fail to describe chemical reactivity. If this is what you mean by 'not really scientific', well, unfortunately QM calculations are quite computationally expensive**.

Even MM calculations get computationally expensive, depending on the time step size, the specific level of theory used and the size, number and degrees of freedom of the molecules you're modelling, but it is certainly possible to do useful MM calculations on desktop computers (this is the whole basis of Folding@Home, which aggregates small jobs done by idle desktop computers around the world).

Two very well known FOSS MM codes are GROMACS and TINKER. GROMACS is now optionally GPU accelerated using CUDA, making it very, very fast even on desktop computers (if you have a decent GPU).

** There exist hybrid QM/MM methodologies that combine an embedded QM region in a MM calculation - these are usually for looking at things like explicit solvent effects on molecules of interest. There are also ab initio MD codes such as Car-Parinello molecular dynamics (CPMD) which go some way to bridging the QM/MM scale divide.

| cite | improve this answer | |
  • 1
    $\begingroup$ Could you define 'MM' in your post? (sorry if I just missed it) $\endgroup$ – user1247 Jun 22 '12 at 9:38
  • $\begingroup$ @user1247 - sorry, that's 'molecular mechanics' $\endgroup$ – Richard Terrett Jun 22 '12 at 11:09

LAMMPS is the software you are talking about. It effectively implements first principle MD of "old good cold war" type.

| cite | improve this answer | |

Appropriate package of molecular mechanics in a graphical environment is Abalone.

It supports a number of standard methods like molecular dynamics, optimization, plus such things as Hybrid Monte Carlo. Convenient graphical environment, several methods for models constructing. Runs quickly, especially when video card used as a calculation accelerator.

  • 1
    $\begingroup$ Perhaps if you explain the pros and cons of Abalone with a tiny bit more details, your answer will have a higher chance to be seen. $\endgroup$ – Ali Jul 16 '13 at 10:31

I will add another recommendation: CP2K. It is not written C/C++, it is written in Fortran; this might require a bit of time to adapt if you want to actually modify the code and have not encountered Fortran before.

However, CP2K can do both quantum and classical mechanics simulations, and it can scale well. For example, a presentation by Jürg Hutter from October 2007 describes two simulations that are close to your requirement in terms of number of atoms. First simulation is 512, 1024, or 2048 molecules of water, and second one is the DNA decamer in a water box with 4003 water molecules (over 12000 atoms in total) (presentation, slides 12 and 13).

Finally, though it depends heavily on timescale and level of theory you will use, ab initio molecular dynamics simulations of thousands of atoms will likely require a supercomputer.

  • $\begingroup$ Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. $\endgroup$ – Gonenc Aug 18 '15 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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