Posts Tagged ‘mw’

9 Highlights of 2012

January 3rd, 2013 by Cynthia McIntyre

It was a great year for the Concord Consortium!

  1. We won a Smaller Business Association of New England (SBANE) Innovation Award!
  2. Next-Generation Molecular Workbench interactives starred in the MIT MOOC (Massive Open Online Course) “Introduction to Solid State Chemistry” through a new collaboration with edX.
  3. Chad Dorsey described our vision of deeply digital education at the national Cyberlearning Research Summit.
  4. Six new projects were funded by the National Science Foundation: InquirySpace, Understanding Sub-Microscopic Interactions, High-Adventure Science: Earth’s Systems and Sustainability, GeniVille, Graph Literacy, and Sensing Science.
  5. The What Works Clearinghouse (WWC), a federally funded organization that scans educational research for high-quality studies, recognized our Technology Enhanced Elementary and Middle School Science (TEEMSS) software and materials.
  6. The Concord Consortium Collection was accessioned into the National Science Digital Library (NSDL).
  7. Our debut webcast featured Chad Dorsey, speaking about the scientific and engineering practices of the Next Generation Science Standards and our free, technology-based activities.
  8. We had two fabulous Google Summer of Code students.
  9. Our staff population increased by 10%, thanks to our new Software Portfolio and Project Manager Jen Goree, Web Developer Parker Morse, and Software Developer Tom Dyer, who just started (technically in 2013, but we’re so excited, we’ve included him on this 2012 list)!

2013 promises to be another great year! Follow us on Facebook, Twitter, Google+, and subscribe to our mailing list to receive print or email news updates.

Optimizing short-range and long-range atomic interactions

November 29th, 2012 by Piotr Janik

[Editor's note: Piotr Janik (janikpiotrek@gmail.com) was a Google Summer of Code 2012 student at the Concord Consortium and is now a consultant working on our Next-Generation Molecular Workbench.]

Some time ago we described the core engine used in Molecular Workbench and our attempts to speed it up. At that time we focused mainly on the low-level optimization connected with reducing the number of necessary multiplications. This promising early work encouraged us to think even more about performance.

We next reviewed existing algorithms in the core of the molecular dynamics engine. To make a long story short, atoms interact with each other using two kinds of forces:

  • Lennard-Jones forces (repulsion and short-range attraction)
  • Coulomb forces (electrostatic and long-range attraction)

Atomic interactions are pairwise, meaning that we have to calculate forces between each pair of atoms while using the basic, naive algorithm. Having n atoms, we must perform about n^2/2 calculations. “The Big O” notation can be used and the computational complexity can be described as O(N^2), which means that the execution time of calculations grows very fast as the number of atoms used in the simulation increases. This is definitely an unwanted effect, but fortunately there are ways to reduce the complexity.

Solutions are different for short-range and long-range forces, so let’s start with short-range. “Short-range” means that atoms interact only while they are quite close to each other. Let’s use rCut as a symbol for the interaction maximum distance. So, one obvious optimization would be to limit calculations to pairs of atoms that are closer to each other than rCut. How? There are two popular approaches—cell lists and Verlet (neighbor) list algorithms.

The cell lists algorithm is based on the concept that we can divide the simulation area into smaller boxes or cells. Each cell dimension is equal to the maximum range of interaction between atoms—rCut. So, while calculating interactions for a given atom, it’s enough to take into account only atoms from the same box and its closest neighbors. Atoms in other boxes are too far to interact with this atom. This is both simple and effective, reducing computational complexity to O(N)! Note that it’s C * O(N) with a pretty significant C, unfortunately.

However, while calculating interactions between atoms in neighboring cells, still only 16% of atoms that we take into account are interacting! This is a waste of resources and where we find room for further optimizations. So, what about creating a list for each atom, which contains only atoms actually interacting with it? This Verlet or neighbor list algorithm as it’s called works well. The only problem is that we have to be smart about updating these lists, as atoms constantly change their position and, thus, their “neighborhood.” We can slightly extend these lists to also include some atoms outside the area of interaction. So each list should include atoms closer than rCut + d from the given atom, where d defines a buffer area size. Because of that, lists need to be updated only when the maximum displacement of some atom, measured since the moment of the previous lists update, is bigger than d. If it’s smaller, neighbor lists are still valid. Lists can be updated using the normal, naive algorithm (which still leaves the complexity O(N^2)), or even better, using the cell lists algorithm presented above! This ensures complexity O(N) and greatly reduces inefficiencies of the cell lists approach.

We’re also working on long-range forces optimization. Since we can no longer use the assumption that atoms interact only when they are close to each other, we can’t rely on the optimization strategies above. The algorithms are now more complicated. The problem of the electrostatic interaction is akin to a problem of gravitational interactions (called N-body problem), popular in astrophysics. One of the most common algorithms for speed-up of such calculations is the Barnes-Hut algorithm. We tried to implement it, but the overhead connected with creating additional data structures was bigger than potential performance gains. The reason is that the number of charged atoms we use in our models is too small to see the advantage of such an approach. As a result, we left our naive algorithms for long-range interactions, which perform better due to their simplicity.

However, we successfully implemented both short-range optimizations in Next-Generation Molecular Workbench and the results are spectacular. The speed-up varies from 20% for really small models (where the number of atoms is less than 50) to 700% for bigger ones (where the number of atoms is about 250). This is the really significant improvement and made complex models usable. As you can see, conceptual, algorithmic optimizations really matter!

We’re still thinking about further optimizations, both low level and algorithmic. Stay tuned as the Next-Generation MW is getting more and more computational power!

Exhibit Booth at BCCE Conference and free MW buttons

August 10th, 2012 by Dan Damelin

Just got back from the Biennial Conference on Chemical Education (BCCE 2012), where I participated in a symposium titled “Web-Based Resources for Chemical Education.” About 60 people attended to learn about Molecular Workbench and other online tools and resources. One of the audience questions was about future availability of Molecular Workbench on the iPad and other tablets. Our latest work on the HTML5/JavaScript next-generation MW project, generously funded by Google.org, will address exactly this. We’ll be bringing much of the Java-based Classic MW to the browser, so that any device running a modern Web browser will be able to run our newest interactives and activities.

I didn’t get to attend many of the other sessions at BCCE because much of my time was spent staffing Concord Consortium’s exhibit booth to disseminate our free software. Jeanne Hurtz and I spoke with hundreds of people who stopped by our booth to hear about the current MW capabilities and see a next-generation MW model running on a tablet. We gave away about 350 MW buttons, but have a few left. If you’d like one of your own, please stop by our office at 25 Love Lane in Concord, MA, to pick one up!

It was great to share the excitement of MW’s potential and versatility with so many new people. We heard from many (surprised) guests at our booth: “This is free?”  Yes! And so is the button.