This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simple energy minimization program that uses steepest descent | |
# and a force field to minimize the energy of water in internal coordinates. | |
# Written by Jan H. Jensen, 2013 | |
def Eandg(rOH,thetaHOH): | |
"""" | |
Arguments: (internal coordinates of the water molecule) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/time.h> | |
#include <stdlib.h> | |
#include <iostream> | |
#include <math.h> | |
static unsigned int g_seed; | |
inline int fastrand() { | |
g_seed = (214013*g_seed+2531011); | |
return (g_seed>>16)&0x7FFF; |