Shortest Path from contour plot?

Putting this in general usage, because I’m applying it to chemistry, but shortest path is a frequent problem.

I have a 2D potential energy surface of a molecule as two of its axes rotate, formatted for a contour plot. I am looking to find the least-energetic path between two points.

Here’s a segment of the array:

 0.494  0.938  2.252
 0.605  1.465  3.177
 0.937  2.15   4.163
 1.41   2.88   5.072
 1.931  3.541  5.777
 2.396  4.02   6.168
 2.714  4.233  6.19
 2.834  4.162  5.865
 2.756  3.845  5.261
 2.522  3.344  4.465
 2.18   2.73   3.568
 1.787  2.079  2.659
 1.404  1.465  1.823
 1.083  0.947  1.119
 0.862  0.561  0.579
 0.754  0.323  0.216
 0.755  0.228  0.027
 0.853  0.265  0.0

Each of these is an energy. I’m looking for the barrier to conversion between the 0.0 position and the 0.494 position.

Hi welcome to the forum!

Your problem is not clear to me. What do you mean by “least energetic path”? Do I need to add up the values along the path? What “moves” are allowed?
Perhaps you could provide a small example with solution?

You can essentially think of it as a topographic map, where each number is an elevation. To get from one node to the next, you need to spend energy that’s the difference between the two nodes (climb uphill). Moving down releases energy and is always preferred (climb downhill). Moving in any direction is allowed (including diagonal), and I have empirical evidence the molecules do go from the 0.494 position to the 0.0 position.

Check the package StringMethod.jl, and the example provided at the bottom of its doc’s page.

3 Likes