Skip to content

Commit 2be60bd

Browse files
Merge branch 'master' into new/flare-interface
2 parents 8b0aa21 + 2b36ab1 commit 2be60bd

1 file changed

Lines changed: 1 addition & 35 deletions

File tree

Modules/Ensemble.py

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,6 @@ def __init__(self, dyn0, T0, supercell = None, **kwargs):
259259
self.supercell_structure = super_struct
260260
self.itau = itau + 1
261261

262-
# To avoid to recompute each time the same variables store something usefull here
263-
self.q_start = np.zeros( (self.N, Nsc * 3))
264-
self.current_q = np.zeros( (self.N, Nsc * 3))
265-
266262
self.q_opposite_index = None
267263

268264
# Store also the displacements
@@ -733,11 +729,6 @@ def load(self, data_dir, population, N, verbose = False, load_displacements = Tr
733729
self.rho = np.ones(self.N, dtype = np.float64)
734730

735731

736-
t1 = time.time()
737-
#self.q_start = CC.Manipulate.GetQ_vectors(self.structures, dyn_supercell, self.u_disps)
738-
t2 = time.time()
739-
#self.current_q = self.q_start.copy()
740-
741732
p_count = np.sum(self.stress_computed.astype(int))
742733
if p_count > 0:
743734
self.has_stress = True
@@ -856,11 +847,6 @@ def load_from_calculator_output(self, directory, out_ext = ".pwo", timer=None):
856847

857848
self.rho = np.ones(self.N, dtype = np.float64)
858849

859-
t1 = time.time()
860-
# self.q_start = CC.Manipulate.GetQ_vectors(self.structures, dyn_supercell, self.u_disps)
861-
t2 = time.time()
862-
# self.current_q = self.q_start.copy()
863-
864850
if count_stress == self.N:
865851
self.has_stress = True
866852
else:
@@ -1821,21 +1807,13 @@ def update_weights_fourier(self, new_dynamical_matrix, newT, timer=None):
18211807

18221808

18231809

1824-
# Convert the q vectors in the Hartree units
1825-
#old_q = self.q_start * np.sqrt(np.float64(2)) * __A_TO_BOHR__
1826-
#new_q = self.current_q * np.sqrt(np.float64(2)) * __A_TO_BOHR__
1827-
1828-
1829-
#t1 = time.time()
1830-
#self.rho = SCHAModules.stochastic.get_gaussian_weight(new_q, old_q, new_a, old_a)
1831-
#t2 = time.time()
1832-
18331810
if __DEBUG_RHO__:
18341811
print( " ==== [UPDATE RHO DEBUGGING] ==== ")
18351812
print( " INPUT INFO: ")
18361813
np.savetxt("rho_%05d.dat" % self.__debug_index__, self.rho)
18371814
print( " rho saved in ", "rho_%05d.dat" % self.__debug_index__)
18381815

1816+
18391817
# Get the two covariance matrix
18401818
t1 = time.time()
18411819
Y_qspace_new = julia.Main.get_upsilon_fourier(
@@ -2044,15 +2022,6 @@ def update_weights(self, new_dynamical_matrix, newT, update_q = False, timer=Non
20442022

20452023

20462024

2047-
# Convert the q vectors in the Hartree units
2048-
#old_q = self.q_start * np.sqrt(np.float64(2)) * __A_TO_BOHR__
2049-
#new_q = self.current_q * np.sqrt(np.float64(2)) * __A_TO_BOHR__
2050-
2051-
2052-
#t1 = time.time()
2053-
#self.rho = SCHAModules.stochastic.get_gaussian_weight(new_q, old_q, new_a, old_a)
2054-
#t2 = time.time()
2055-
20562025
if __DEBUG_RHO__:
20572026
print( " ==== [UPDATE RHO DEBUGGING] ==== ")
20582027
print( " INPUT INFO: ")
@@ -3145,9 +3114,6 @@ def get_average_stress(self):
31453114

31463115
# #n_modes = len(w)
31473116

3148-
# # Convert the q vector into Ha units
3149-
# q_new = np.array(self.current_q, dtype = np.float64) * np.sqrt(2) * __A_TO_BOHR__
3150-
31513117
# # Get the ityp variable
31523118
# #ityp = self.current_dyn.structure.get_atomic_types()
31533119

0 commit comments

Comments
 (0)