Skip to content

Commit 152c8c5

Browse files
Merge pull request #87 from SSCHAcode/newbranch
Newbranch
2 parents 3c1a9bc + 665425a commit 152c8c5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Modules/Ensemble.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,10 +1863,14 @@ def get_preconditioned_gradient(self, subtract_sscha = True, return_error = Fals
18631863
if np.prod(self.dyn_0.GetSupercell()) > 1:
18641864

18651865
# Perform the fourier transform
1866-
q_grad = CC.Phonons.GetDynQFromFCSupercell(grad, np.array(self.current_dyn.q_tot),
1866+
if return_error:
1867+
q_grad,q_grad_err = CC.Phonons.GetDynQFromFCSupercell(grad, np.array(self.current_dyn.q_tot),
1868+
self.current_dyn.structure, supercell_dyn.structure,fc2=grad_err)
1869+
else:
1870+
q_grad = CC.Phonons.GetDynQFromFCSupercell(grad, np.array(self.current_dyn.q_tot),
18671871
self.current_dyn.structure, supercell_dyn.structure)
1868-
q_grad_err = CC.Phonons.GetDynQFromFCSupercell(grad_err, np.array(self.current_dyn.q_tot),
1869-
self.current_dyn.structure, supercell_dyn.structure)
1872+
#q_grad_err = CC.Phonons.GetDynQFromFCSupercell(grad_err, np.array(self.current_dyn.q_tot),
1873+
# self.current_dyn.structure, supercell_dyn.structure)
18701874
else:
18711875
nat3, _ = grad.shape
18721876
q_grad = np.zeros( (1, nat3, nat3), dtype = np.double)

0 commit comments

Comments
 (0)