Nearest-neighbour interaction contribution to the change in system energy if this jump were accepted.

        Args:
            None

        Returns:
            (Float): delta E (nearest-neighbour)
966250
def nearest_neighbour_delta_E( self ):
        
        delta_nn = self.final_site.nn_occupation() - self.initial_site.nn_occupation() - 1 # -1 because the hopping ion is not counted in the final site occupation number
        return ( delta_nn * self.nearest_neighbour_energy )
391467
def feed(self, x):
        
        self._n += 1
        delta = x - self._mean
        self._mean += delta * (1.0 / self._n)
        delta2 = x - self._mean
        self._M2 += delta * delta2
973571
def energy(data):
    """"""
    data = np.mean(data, axis=1)
    return np.sum(data ** 2) / np.float64(len(data))
865207
def converged_electronic(self):
        
        final_esteps = self.ionic_steps[-1]["electronic_steps"]
        if 'LEPSILON' in self.incar and self.incar['LEPSILON']:
            i = 1
            to_check = set(['e_wo_entrp', 'e_fr_energy', 'e_0_energy'])
            while set(final_esteps[i].keys()) == to_check:
                i += 1
            return i + 1 != self.parameters["NELM"]
        return len(final_esteps) < self.parameters["NELM"]
732797
def get_interpolated_value(self, energy):
        
        f = {}
        for spin in self.densities.keys():
            f[spin] = get_linear_interpolated_value(self.energies,
                                                    self.densities[spin],
                                                    energy)
        return f
803085
def f0(E, fermi, T):
    
    return 1. / (1. + np.exp((E - fermi) / (_cd("Boltzmann constant in eV/K") * T)))
587647
def delta_nu(self, *args):
        
        return 134.88 * np.sqrt(self.mass(*args) / self.radius(*args)**3)
441526
def erank(self):
        
        r = self.r
        n = self.n
        d = self.d
        if d <= 1:
            er = 0e0
        else:
            sz = _np.dot(n * r[0:d], r[1:])
            if sz == 0:
                er = 0e0
            else:
                b = r[0] * n[0] + n[d - 1] * r[d]
                if d is 2:
                    er = sz * 1.0 / b
                else:
                    a = _np.sum(n[1:d - 1])
                    er = (_np.sqrt(b * b + 4 * a * sz) - b) / (2 * a)
        return er
839227
def entropy(self):
    
    if self.k < self.n:
      _, entropy = binaryEntropy(self.dutyCycle)
      return entropy
    else:
      return 0
310499
void computeSegmentEnergy( GrowQueue_I32 corners ) {
		if( energySegment.length < corners.size() ) {
			energySegment = new double[ corners.size() ];
		}

		for (int i = 0,j=corners.size()-1; i < corners.size(); j=i,i++) {
			energySegment[j] = computeSegmentEnergy(corners, j, i);
		}
	}
1031205
def read_energy_bounds(hdu):
    
    nebins = len(hdu.data)
    ebin_edges = np.ndarray((nebins + 1))
    try:
        ebin_edges[0:-1] = np.log10(hdu.data.field("E_MIN")) - 3.
        ebin_edges[-1] = np.log10(hdu.data.field("E_MAX")[-1]) - 3.
    except KeyError:
        ebin_edges[0:-1] = np.log10(hdu.data.field("energy_MIN"))
        ebin_edges[-1] = np.log10(hdu.data.field("energy_MAX")[-1])
    return ebin_edges
596969
def get_cutoff_energy(self):
        ''''''
        return Value(
            scalars=[Scalar(value=self.settings["kinetic-energy cutoff"])],
            units=self.settings['kinetic-energy cutoff units']
        )
1298051
def energy_minimum(self, x):
    
    E      = self.energy
    y_min  = self.find_energy_minimum(E, x)
    return y_min
1349549
def smoothness(self):
        
        energies = self.energies
        try:
            sp = self.spline()
        except:
            print("Energy spline failed.")
            return None
        spline_energies = sp(range(len(energies)))
        diff = spline_energies - energies
        rms = np.sqrt(np.sum(np.square(diff)) / len(energies))
        return rms
1324465
def energy(self):
        """"""
        e = 0
        for i in range(len(self.state)):
            e += self.distance_matrix[self.state[i-1]][self.state[i]]
        return e
487715
def Δk(self):
        
        Δc, Δv = self.Δc, self.Δv
        cos = self._energy.trig('cos θ')
        return lambda e: (1 / 2) * ((Δc + Δv) + (Δc - Δv) * cos(e))
81036
def F(self, **kwargs):
        '''
        
        '''
        Eg = self.Eg_Gamma_0(**kwargs)
        Delta_SO = self.Delta_SO(**kwargs)
        Ep = self.Ep(**kwargs)
        meff = self.meff_e_Gamma_0(**kwargs)
        return (1./meff-1-(Ep*(Eg+2.*Delta_SO/3.))/(Eg*(Eg+Delta_SO)))/2