ensemble_hic/backbone_prior.py
def _evaluate_gradient(self, structures):
        """Evaluates gradient of energy of a structure ensemble

        :param structures: coordinates of structure ensemble
        :type structures: :class:`numpy.ndarray`

        :returns: flattened gradient vector
        :rtype: :class:`numpy.ndarray`
        """
        grad = self._single_structure_gradient
        X = structures.reshape(self.n_structures, -1, 3)
        mr = self._mol_ranges
        ll, ul = self.lower_limits, self.upper_limits

        def ss_grad(x):
            return np.concatenate([grad(x[mr[i]:mr[i+1]], ll[i], ul[i])
                                   for i in range(len(mr) - 1)])

        return np.concatenate(map(lambda x: ss_grad(x), X))
Evaluates gradient of energy of a structure ensemble

        :param structures: coordinates of structure ensemble
        :type structures: :class:`numpy.ndarray`

        :returns: flattened gradient vector
        :rtype: :class:`numpy.ndarray`
        
Evaluates gradient of energy of a structure ensemble
Evaluates gradient of energy of a structure ensemble
def _evaluate_gradient(self, structures):
        grad = self._single_structure_gradient
        X = structures.reshape(self.n_structures, -1, 3)
        mr = self._mol_ranges
        ll, ul = self.lower_limits, self.upper_limits
        def ss_grad(x):
            return np.concatenate([grad(x[mr[i]:mr[i+1]], ll[i], ul[i])
                                   for i in range(len(mr) - 1)])
        return np.concatenate(map(lambda x: ss_grad(x), X))
def _evaluate_gradient ( self , structures ) : grad = self . _single_structure_gradient X = structures . reshape ( self . n_structures , - 1 , 3 ) mr = self . _mol_ranges ll , ul = self . lower_limits , self . upper_limits def ss_grad ( x ) : return np . concatenate ( [ grad ( x [ mr [ i ] : mr [ i + 1 ] ] , ll [ i ] , ul [ i ] ) for i in range ( len ( mr ) - 1 ) ] ) return np . concatenate ( map ( lambda x : ss_grad ( x ) , X ) )
Evaluates gradient of energy of a structure ensemble
Evaluates gradient of energy of a structure ensemble
"""Evaluates gradient of energy of a structure ensemble

        :param structures: coordinates of structure ensemble
        :type structures: :class:`numpy.ndarray`

        :returns: flattened gradient vector
        :rtype: :class:`numpy.ndarray`
        """
flattened gradient vector
flattened gradient vector
:class:`numpy.ndarray`
self
structures
coordinates of structure ensemble
coordinates of structure ensemble