def doverlap(self,other,dir): "Overlap of func with derivative of another" dSij = 0. l = other.powers[dir] ijk_plus = list(other.powers) ijk_plus[dir] += 1 ijk_plus = tuple(ijk_plus) for ipbf in self.prims: for jpbf in other.prims: dSij += 2*jpbf.exp*ipbf.coef*jpbf.coef*\ ipbf.norm*jpbf.norm*\ overlap(ipbf.exp,ipbf.powers,ipbf.origin, jpbf.exp,ijk_plus,jpbf.origin) if l>0: ijk_minus = list(other.powers) ijk_minus[dir] -= 1 ijk_minus = tuple(ijk_minus) for ipbf in self.prims: for jpbf in other.prims: dSij -= l*ipbf.coef*jpbf.coef*\ ipbf.norm*jpbf.norm*\ overlap(ipbf.exp,ipbf.powers,ipbf.origin, jpbf.exp,ijk_minus,jpbf.origin) return self.norm*other.norm*dSij
def doverlap(self,other,dir): "Overlap of func with derivative of another" dSij = 0. l = other.powers()[dir] ijk_plus = list(other.powers()) ijk_plus[dir] += 1 ijk_plus = tuple(ijk_plus) for ipbf in self._prims: for jpbf in other._prims: dSij += 2*jpbf.exp()*ipbf.coef()*jpbf.coef()*\ ipbf.norm()*jpbf.norm()*\ overlap(ipbf.exp(),ipbf.powers(),ipbf.origin(), jpbf.exp(),ijk_plus,jpbf.origin()) if l>0: ijk_minus = list(other.powers()) ijk_minus[dir] -= 1 ijk_minus = tuple(ijk_minus) for ipbf in self._prims: for jpbf in other._prims: dSij -= l*ipbf.coef()*jpbf.coef()*\ ipbf.norm()*jpbf.norm()*\ overlap(ipbf.exp(),ipbf.powers(),ipbf.origin(), jpbf.exp(),ijk_minus,jpbf.origin()) return self.norm()*other.norm()*dSij
def overlap(self,other): "Compute overlap element with another PGBF" #print self._normalization,other._normalization,\ # self._exponent,self._powers,self._origin,\ # other._exponent,other._powers,other._origin return self._normalization*other._normalization*\ overlap(self._exponent,self._powers,self._origin, other._exponent,other._powers,other._origin)
def doverlap_num(self, other, dir): "Overlap of func with derivative of another: numeric approximation" dSij = 0. delta = 0.001 # arbitrary shift amount origin_plus = list(other.origin) origin_plus[dir] += delta origin_plus = tuple(origin_plus) origin_minus = list(other.origin) origin_minus[dir] -= delta origin_minus = tuple(origin_minus) for ipbf in self.prims: for jpbf in other.prims: dSij += 0.5 * ipbf.coef * jpbf.coef * ipbf.norm * jpbf.norm * ( overlap(ipbf.exp, ipbf.powers, ipbf.origin, jpbf.exp, ipbf.powers, origin_plus) - overlap(ipbf.exp, ipbf.powers, ipbf.origin, jpbf.exp, ipbf.powers, origin_plus)) / delta return self.norm * other.norm * dSij
def doverlap_num(self,other,dir): "Overlap of func with derivative of another: numeric approximation" dSij = 0. delta = 0.001 # arbitrary shift amount origin_plus = list(other.origin) origin_plus[dir] += delta origin_plus = tuple(origin_plus) origin_minus = list(other.origin) origin_minus[dir] -= delta origin_minus = tuple(origin_minus) for ipbf in self.prims: for jpbf in other.prims: dSij += 0.5*ipbf.coef*jpbf.coef*ipbf.norm*jpbf.norm*( overlap(ipbf.exp,ipbf.powers,ipbf.origin, jpbf.exp,ipbf.powers,origin_plus) -overlap(ipbf.exp,ipbf.powers,ipbf.origin, jpbf.exp,ipbf.powers,origin_plus) )/delta return self.norm*other.norm*dSij
def overlap(self,other): "Compute overlap element with another PGBF" return self.norm*other.norm*\ overlap(self.exp,self.powers,self.origin, other.exp,other.powers,other.origin)
def overlap(self, other): "Compute overlap element with another PGBF" return self.norm*other.norm*\ overlap(self.exp,self.powers,self.origin, other.exp,other.powers,other.origin)