Skip to content

Instantly share code, notes, and snippets.

@schneiderfelipe
Created June 13, 2018 21:09
Show Gist options
  • Save schneiderfelipe/8e0293e0646fcaa572aa034478148dfd to your computer and use it in GitHub Desktop.
Save schneiderfelipe/8e0293e0646fcaa572aa034478148dfd to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import numpy as np
from matplotlib import pyplot as plt
def dihedral_pot(phi, v_barrier=1., n=3., phase=0., divider=1.):
return v_barrier * (1. + np.cos(n * phi - phase)) / divider
phi = np.linspace(0., 2. * np.pi, num=50)
energy = dihedral_pot(phi) + dihedral_pot(phi, n=1.)
plt.plot(phi, energy, 'b--')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment