PythonWaveFunctionGaussianIons

From QMC

Jump to: navigation, search
def WaveFunction(self,coords):
#we could make this more general by using loops but since we call it a lot and 
#python does bounds checking it would be slow down the code
    i1=self.ions[0]
    i2=self.ions[1]
    e1=coords[0]
    e2=coords[1]
    diff1=i1-e1
    diff2=i2-e2
    dist1_squared=numpy.dot(diff1,diff1)
    dist2_squared=numpy.dot(diff2,diff2)
    return math.exp(-alpha*(dist1_squared+dist2_squared))