import tabulate scripts for table files

This commit is contained in:
Axel Kohlmeyer
2022-12-16 01:11:52 -05:00
parent 2e4f419e19
commit 2de997b52d
7 changed files with 443 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/usr/bin/env python3
from tabulate import AngleTabulate
################################################################################
import math
def harmonic_energy(theta):
k = 100.0
thetazero = 120.0
# the force constant in LAMMPS is in energy per radians^2 so convert from degrees to radians
deg2rad = math.pi / 180.0
t = (theta - thetazero) * deg2rad
f = k * t * t
return f
################################################################################
if __name__ == "__main__":
atable = AngleTabulate(harmonic_energy, units='real')
atable.run('HARM')