10
$\begingroup$

I am looking for a nice 2D function which has two minima and one saddle point, and ideally a curved reaction path which I can use to draw contour plots on matplotlib. I will use these contour plots in presentations, poster etc. to demonstrate transition state finding methods, and the intrinsic reaction coordinate etc.

I have been using Muller-Brown potential before (which has been used for testing IRC algorithsm before), but it has an intermediate minimum which makes this complicated. (Plot shown below, with red dot being highest saddle point)

muller-brown-surface

Are there similar 2D potential energy surfaces which have only one TS and two minima that could be used to explain saddle points, and other such concepts easily?

$\endgroup$
2
  • $\begingroup$ Can't you use two gaussians or sine functions? Just cut them off at the valley. $\endgroup$ Commented Mar 25 at 15:02
  • 1
    $\begingroup$ @HemanthHaridas Could you post an answer with an example of such function? I am not that well-versed in math behind plotting - so I am not really sure what those functions would look like. $\endgroup$
    – S R Maiti
    Commented Mar 26 at 11:22

2 Answers 2

6
$\begingroup$

I would suggest using the egg holder function which is defined by the following formula

$ f(x) = -(x_2+47)sin\left(\sqrt{\left| x_2+\frac{x_1}{2} + 47 \right|}\right) - x_1sin\left(\sqrt{\left| x_1-(x_2 + 47) \right|}\right) $

This is a function that has multiple minima (hence the name egg holder function) and has a contour plot that looks like this enter image description here

I generated this plot using the following code

import numpy as np
import matplotlib.pyplot as plt


def eggholder(x1: float, x2: float)->float:
        term1   =       np.sqrt(np.abs(x2 + 0.5*x1 + 47))
        term2   =       np.sqrt(np.abs(x1 - (x2 + 47)))
        return (-1 * (x2+47) * np.sin(term1)) - (x1 * np.sin(term2))

x1      =       np.arange(-512, 513, 1)
x2      =       np.arange(-512, 513, 1)

X1, X2  =       np.meshgrid(x1, x2)
Z       =       np.zeros(X1.shape)

for index1, x in enumerate(x1):
        for index2, y in enumerate(x2):
                Z[index1][index2]       =       eggholder(x1 = x, x2 = y)

plt.contour(X1, X2, Z)
plt.colorbar()
plt.show()

You can modify the bounds to zoom in on a particular region and identify the minima and saddle points.

The advantage of this function is that it has a lot of minima and saddle points, and you can technically generate any combination of them.

$\endgroup$
6
$\begingroup$

EDIT:

Turns out it can be extremely simple to do. Here are the ingredients:

Component Expression
Curved minimum energy path
(path follows $y = 0.4 (x^2 - 4x)$)
$[y - 0.4(x^2-4x)]^2$
Ridge (runs down $x = 0$) to make saddle point $-x^2$
Wrap it up in a quartic $0.1(x^4+y^4)$
And tilt it so the minima have more similar depth $-0.5x$

Here's what you get. On left, just the constructed saddle point in the middle of the MEP; on right, two minima thanks to the wrapping quartic.

On left, just the constructed saddle point in the middle of the MEP; on right, two minima thanks to the wrapping quartic.

You can make some nightmare fuel energy landscapes with this approach, such as:

$E(x,y) = [y- (\tanh(3x) - 0.5 x)]^2 - x^2 + 0.2 (x^4 + y^4)$

Good luck, have fun.

enter image description here


Original post:

Inspired by Susi Lehtola's answer, here's a straightforward function:

$z = (x-1)^4 + (y-1)^4 + (x+1)^4 + (y+1)^4 - 20(x-y)^2 + 60x$

The ingredients are:

  • Adding two quadratic forms gives another quadratic form, and quadratic forms never have saddle points. But quartic functions can have saddle points. Indeed, they are the stereotypical smooth 1D two-well functions!
  • So start with two quartics (on hindsight you could also use one).
  • Insert a quadratic "ridge" (in this case the $(x-y)^2$ term) to induce a saddle point
  • And tilt the whole thing (the $x$ term) to push the saddle point off the line between both minima.

The derivatives are easily calculated as is the minimum energy path -- not just for this particular function but for any combination of quartics, ridges and slopes.

The resulting plot:

contour plot of quartic listed in question

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .