diff --git a/Modules/Ensemble.py b/Modules/Ensemble.py index 7c8f8c38..4babd0ab 100644 --- a/Modules/Ensemble.py +++ b/Modules/Ensemble.py @@ -235,10 +235,6 @@ def __init__(self, dyn0, T0, supercell = None, **kwargs): self.supercell_structure = super_struct self.itau = itau + 1 - # To avoid to recompute each time the same variables store something usefull here - self.q_start = np.zeros( (self.N, Nsc * 3)) - self.current_q = np.zeros( (self.N, Nsc * 3)) - self.q_opposite_index = None # Store also the displacements @@ -709,11 +705,6 @@ def load(self, data_dir, population, N, verbose = False, load_displacements = Tr self.rho = np.ones(self.N, dtype = np.float64) - t1 = time.time() - #self.q_start = CC.Manipulate.GetQ_vectors(self.structures, dyn_supercell, self.u_disps) - t2 = time.time() - #self.current_q = self.q_start.copy() - p_count = np.sum(self.stress_computed.astype(int)) if p_count > 0: self.has_stress = True @@ -832,11 +823,6 @@ def load_from_calculator_output(self, directory, out_ext = ".pwo", timer=None): self.rho = np.ones(self.N, dtype = np.float64) - t1 = time.time() - # self.q_start = CC.Manipulate.GetQ_vectors(self.structures, dyn_supercell, self.u_disps) - t2 = time.time() - # self.current_q = self.q_start.copy() - if count_stress == self.N: self.has_stress = True else: @@ -1797,21 +1783,13 @@ def update_weights_fourier(self, new_dynamical_matrix, newT, timer=None): - # Convert the q vectors in the Hartree units - #old_q = self.q_start * np.sqrt(np.float64(2)) * __A_TO_BOHR__ - #new_q = self.current_q * np.sqrt(np.float64(2)) * __A_TO_BOHR__ - - - #t1 = time.time() - #self.rho = SCHAModules.stochastic.get_gaussian_weight(new_q, old_q, new_a, old_a) - #t2 = time.time() - if __DEBUG_RHO__: print( " ==== [UPDATE RHO DEBUGGING] ==== ") print( " INPUT INFO: ") np.savetxt("rho_%05d.dat" % self.__debug_index__, self.rho) print( " rho saved in ", "rho_%05d.dat" % self.__debug_index__) + # Get the two covariance matrix t1 = time.time() Y_qspace_new = julia.Main.get_upsilon_fourier( @@ -2020,15 +1998,6 @@ def update_weights(self, new_dynamical_matrix, newT, update_q = False, timer=Non - # Convert the q vectors in the Hartree units - #old_q = self.q_start * np.sqrt(np.float64(2)) * __A_TO_BOHR__ - #new_q = self.current_q * np.sqrt(np.float64(2)) * __A_TO_BOHR__ - - - #t1 = time.time() - #self.rho = SCHAModules.stochastic.get_gaussian_weight(new_q, old_q, new_a, old_a) - #t2 = time.time() - if __DEBUG_RHO__: print( " ==== [UPDATE RHO DEBUGGING] ==== ") print( " INPUT INFO: ") @@ -3121,9 +3090,6 @@ def get_average_stress(self): # #n_modes = len(w) -# # Convert the q vector into Ha units -# q_new = np.array(self.current_q, dtype = np.float64) * np.sqrt(2) * __A_TO_BOHR__ - # # Get the ityp variable # #ityp = self.current_dyn.structure.get_atomic_types()