Writing a harmonic potential
In this section, we will write a simple pairwise potential, that is, a harmonic potential, between two atoms.
A radially-symmetric harmonic potential tries to exert a force upon an atom pointed in the direction of the minimum energy location. The functional form of the harmonic potential, , is given by the following:
From the preceding equation, is the spring constant, is the equilibrium distance, and is the well-depth of this harmonic potential. The radial force from this potential, , is, therefore, given as follows:
Accordingly, the x, y, z force components of are calculated as follows:
- x-component, :
- y-component, :
- z-component, :
To implement this harmonic pair style, we choose a similar pair style and make modifications. Among the many choices available, we will choose Pair Morse
, which we analyzed earlier in Chapter 5, Understanding Pair Styles.
The following sections will...