Ejemplo n.º 1
0
 def get_normalmodes(self, coords):
     """return the squared normal mode frequencies and eigenvectors
     
     Notes
     -----
     This is usually used to compute the log product of the normal mode frequencies
     which is used to determine the free energy of a minimum in the harmonic
     superposition approximation.
     
     Returns
     -------
     freqs : array
         array of normal mode frequencies
     vecs : 2d array
         array of normal mode vectors.  `vecs[:,i]` is the vector for
         the the i'th frequency
     
     See Also
     --------
     pele.thermodynamics, get_log_product_normalmode_freq, get_metric_tensor 
     """
     mt = self.get_metric_tensor(coords)
     pot = self.get_potential()
     hess = pot.getHessian(coords)
     freqs, vecs = normalmodes(hess, mt)
     return freqs, vecs
Ejemplo n.º 2
0
 def get_normalmodes(self, coords):
     """return the squared normal mode frequencies and eigenvectors
     
     Notes
     -----
     This is usually used to compute the log product of the normal mode frequencies
     which is used to determine the free energy of a minimum in the harmonic
     superposition approximation.
     
     Returns
     -------
     freqs : array
         array of normal mode frequencies
     vecs : 2d array
         array of normal mode vectors.  `vecs[:,i]` is the vector for
         the the i'th frequency
     
     See Also
     --------
     pele.thermodynamics, get_log_product_normalmode_freq, get_metric_tensor 
     """
     mt = self.get_metric_tensor(coords)
     pot = self.get_potential()
     hess = pot.getHessian(coords)
     freqs, vecs = normalmodes(hess, mt)
     return freqs, vecs
Ejemplo n.º 3
0
 def get_normalmodes(self, coords):
     """return the squared normal mode frequencies and eigenvectors
     """
     mt = self.get_metric_tensor(coords)
     pot = self.get_potential()
     hess = pot.getHessian(coords)
     freqs, vecs = normalmodes(hess, mt)
     return freqs, vecs
Ejemplo n.º 4
0
def test_eigs():
    from pele.transition_states import findLowestEigenVector
    from pele.thermodynamics import normalmodes
    system = HeisenbergSystem(field_disorder=3.1, disorder=True)
    pot = system.get_potential()
    x = system.get_random_configuration()
    x = system.get_random_minimized_configuration().coords
    ret = findLowestEigenVector(x, pot, orthogZeroEigs=None)
    hess = pot.getHessian(x)
    freq, modes = normalmodes(hess, metric=None)
    print("lowest eig from hess", freq[0])
    print("lowest eig from RR  ", ret.eigenval)
Ejemplo n.º 5
0
def test_eigs():
    from pele.transition_states import findLowestEigenVector
    from pele.thermodynamics import normalmodes
    system = HeisenbergSystem(field_disorder=3.1, disorder=True)
    pot = system.get_potential()
    x = system.get_random_configuration()
    x = system.get_random_minimized_configuration().coords
    ret = findLowestEigenVector(x, pot, orthogZeroEigs=None)
    hess = pot.getHessian(x)
    freq, modes = normalmodes(hess, metric=None)
    print "lowest eig from hess", freq[0]
    print "lowest eig from RR  ", ret.eigenval
Ejemplo n.º 6
0
 def _calculate_normalmodes(self):
     """
     compute the normal modes
     """
     if self._use_hessian_eigs():
         pot = self.system.get_potential()
         hess = pot.getHessian(self.coords)
         freq, mode = normalmodes(hess, metric=None)
     else:
         freq, mode = self.system.get_normalmodes(self.coords)
     mode=np.real(mode.transpose())
     
     self.normalmodes = []
     #self.normalmodes.append((fre[0], m.flatten()))
     for f, m in zip(freq, mode):
         self.normalmodes.append((f, m)) #np.dot(metric, m)))