molecule mymol {
 0 1
 symmetry c1
    N            0.000000042827     0.042320528608     0.000000000000
    H           -0.962919472381    -0.196005457377     0.000000000000
    H            0.481459438661    -0.196005395323     0.833910147352
    H            0.481459438661    -0.196005395323    -0.833910147352
}
set basis 6-311G
diedri=[135, 140, 145, 150, 155, 160, 165, 170, 175, 180]

PES = []

for phi in diedri:
  constr = "2 1 3 4 " + str(phi)
  set optking fixed_dihedral = $constr
  E = optimize('b3lyp')
  PES.append((phi, E))

for point in PES:
  print(" %5.1f%20.10f" % (point[0], point[1]))


