ensemble_hic/backbone_prior.py
def _single_structure_log_prob(self, structure, ll, ul):
        """Evaluates log-probability for a single structure

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

        :param ll: lower distance limits for consecutive beads
        :type ll: :class:`numpy.ndarray`

        :param ul: upper distance limits for consecutive beads
        :type ul: :class:`numpy.ndarray`

        :returns: (unnormalized) log-probability
        :rtype: float
        """

        x = structure.reshape(-1, 3)
        k_bb = self['k_bb'].value

        d = np.sqrt(np.sum((x[1:] - x[:-1]) ** 2, 1))
        
        u_viols = d > ul
        l_viols = d < ll
        delta = ul - ll

        return -0.5 * k_bb * (  np.sum((d[u_viols] - ul[u_viols]) ** 2 ) \
                              + np.sum((ll[l_viols] - d[l_viols]) ** 2))
Evaluates log-probability for a single structure

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

        :param ll: lower distance limits for consecutive beads
        :type ll: :class:`numpy.ndarray`

        :param ul: upper distance limits for consecutive beads
        :type ul: :class:`numpy.ndarray`

        :returns: (unnormalized) log-probability
        :rtype: float
        
Evaluates log-probability for a single structure
Evaluates log - probability for a single structure
def _single_structure_log_prob(self, structure, ll, ul):
        x = structure.reshape(-1, 3)
        k_bb = self['k_bb'].value
        d = np.sqrt(np.sum((x[1:] - x[:-1]) ** 2, 1))
        u_viols = d > ul
        l_viols = d < ll
        delta = ul - ll
        return -0.5 * k_bb * (  np.sum((d[u_viols] - ul[u_viols]) ** 2 ) \
                              + np.sum((ll[l_viols] - d[l_viols]) ** 2))
def _single_structure_log_prob ( self , structure , ll , ul ) : x = structure . reshape ( - 1 , 3 ) k_bb = self [ 'k_bb' ] . value d = np . sqrt ( np . sum ( ( x [ 1 : ] - x [ : - 1 ] ) ** 2 , 1 ) ) u_viols = d > ul l_viols = d < ll delta = ul - ll return - 0.5 * k_bb * ( np . sum ( ( d [ u_viols ] - ul [ u_viols ] ) ** 2 ) + np . sum ( ( ll [ l_viols ] - d [ l_viols ] ) ** 2 ) )
Evaluates log-probability for a single structure
Evaluates log - probability for a single structure
"""Evaluates log-probability for a single structure

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

        :param ll: lower distance limits for consecutive beads
        :type ll: :class:`numpy.ndarray`

        :param ul: upper distance limits for consecutive beads
        :type ul: :class:`numpy.ndarray`

        :returns: (unnormalized) log-probability
        :rtype: float
        """
None
float
self
structure
coordinates of a single structure
coordinates of a single structure
ll
lower distance limits for consecutive beads
lower distance limits for consecutive beads
ul
upper distance limits for consecutive beads
upper distance limits for consecutive beads