geometric/internal.py
def calcHess(self, xyz, gradx, hessx):
        """
        Compute the internal coordinate Hessian. 
        Expects Cartesian coordinates to be provided in a.u.
        """
        xyz = xyz.flatten()
        q0 = self.calculate(xyz)
        Ginv = self.GInverse(xyz)
        Bmat = self.wilsonB(xyz)
        Gq = self.calcGrad(xyz, gradx)
        deriv2 = self.second_derivatives(xyz)
        Bmatp = deriv2.reshape(deriv2.shape[0], xyz.shape[0], xyz.shape[0])
        Hx_BptGq = hessx - np.einsum('pmn,p->mn',Bmatp,Gq)
        Hq = np.einsum('ps,sm,mn,nr,rq', Ginv, Bmat, Hx_BptGq, Bmat.T, Ginv, optimize=True)
        return Hq

        Compute the internal coordinate Hessian. 
        Expects Cartesian coordinates to be provided in a.u.
        
Compute the internal coordinate Hessian.
Expects Cartesian coordinates to be provided in a.u.
Compute the internal coordinate Hessian . Expects Cartesian coordinates to be provided in a . u .
def calcHess(self, xyz, gradx, hessx):
        xyz = xyz.flatten()
        q0 = self.calculate(xyz)
        Ginv = self.GInverse(xyz)
        Bmat = self.wilsonB(xyz)
        Gq = self.calcGrad(xyz, gradx)
        deriv2 = self.second_derivatives(xyz)
        Bmatp = deriv2.reshape(deriv2.shape[0], xyz.shape[0], xyz.shape[0])
        Hx_BptGq = hessx - np.einsum('pmn,p->mn',Bmatp,Gq)
        Hq = np.einsum('ps,sm,mn,nr,rq', Ginv, Bmat, Hx_BptGq, Bmat.T, Ginv, optimize=True)
        return Hq
def calcHess ( self , xyz , gradx , hessx ) : xyz = xyz . flatten ( ) q0 = self . calculate ( xyz ) Ginv = self . GInverse ( xyz ) Bmat = self . wilsonB ( xyz ) Gq = self . calcGrad ( xyz , gradx ) deriv2 = self . second_derivatives ( xyz ) Bmatp = deriv2 . reshape ( deriv2 . shape [ 0 ] , xyz . shape [ 0 ] , xyz . shape [ 0 ] ) Hx_BptGq = hessx - np . einsum ( 'pmn,p->mn' , Bmatp , Gq ) Hq = np . einsum ( 'ps,sm,mn,nr,rq' , Ginv , Bmat , Hx_BptGq , Bmat . T , Ginv , optimize = True ) return Hq
Compute the internal coordinate Hessian.
Compute the internal coordinate Hessian .
"""
        Compute the internal coordinate Hessian. 
        Expects Cartesian coordinates to be provided in a.u.
        """
self
xyz
gradx
hessx