ensemble_hic/rog_prior.py
def _single_structure_gradient(self, structure):
        """
        Evaluates the negative log-probability gradient 
        for a single structure

        :param structure: coordinates of a single structure
        :type structure: :class:`numpy.ndarray`

        :returns: gradient vector
        :rtype: :class:`numpy.ndarray`
        """
        X = structure.reshape(-1,3)
        r_gyr = radius_of_gyration(X)
        k = self['k_rog'].value
        target_rog = self['rog'].value
        
        return -k * (target_rog - r_gyr) * (X - X.mean(0)).ravel() / r_gyr / len(X)

        Evaluates the negative log-probability gradient 
        for a single structure

        :param structure: coordinates of a single structure
        :type structure: :class:`numpy.ndarray`

        :returns: gradient vector
        :rtype: :class:`numpy.ndarray`
        
Evaluates the negative log-probability gradient
for a single structure
Evaluates the negative log - probability gradient for a single structure
def _single_structure_gradient(self, structure):
        X = structure.reshape(-1,3)
        r_gyr = radius_of_gyration(X)
        k = self['k_rog'].value
        target_rog = self['rog'].value
        return -k * (target_rog - r_gyr) * (X - X.mean(0)).ravel() / r_gyr / len(X)
def _single_structure_gradient ( self , structure ) : X = structure . reshape ( - 1 , 3 ) r_gyr = radius_of_gyration ( X ) k = self [ 'k_rog' ] . value target_rog = self [ 'rog' ] . value return - k * ( target_rog - r_gyr ) * ( X - X . mean ( 0 ) ) . ravel ( ) / r_gyr / len ( X )
Evaluates the negative log-probability gradient
for a single structure
Evaluates the negative log - probability gradient for a single structure
"""
        Evaluates the negative log-probability gradient 
        for a single structure

        :param structure: coordinates of a single structure
        :type structure: :class:`numpy.ndarray`

        :returns: gradient vector
        :rtype: :class:`numpy.ndarray`
        """
None
:class:`numpy.ndarray`
self
structure
coordinates of a single structure
coordinates of a single structure