From fd574d5b4b6d346332678e28170c480dcd9c007c Mon Sep 17 00:00:00 2001 From: Wei Bin How Date: Fri, 5 Apr 2024 18:03:50 +0200 Subject: [PATCH] Fixed lint issues --- examples/dos-align/dos-align.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/dos-align/dos-align.py b/examples/dos-align/dos-align.py index 1e73b376..15f62000 100644 --- a/examples/dos-align/dos-align.py +++ b/examples/dos-align/dos-align.py @@ -135,7 +135,7 @@ total_edos.append(e_dos) total_edos = torch.vstack(total_edos) -total_edos = ((total_edos.T * normalization).T) +total_edos = (total_edos.T * normalization).T print(f"The final shape of all the DOS in the dataset is: {list(total_edos.shape)}") @@ -240,7 +240,8 @@ def edos_derivative(x, eigenenergies, normalization): dfn_dos_E = ( torch.sum( torch.exp(-0.5 * ((x - eigenenergies.view(-1, 1)) / sigma) ** 2) - * (-1 * ((x - eigenenergies.view(-1, 1)) / sigma) ** 2), dim=0 + * (-1 * ((x - eigenenergies.view(-1, 1)) / sigma) ** 2), + dim=0, ) * normalization ) @@ -872,7 +873,7 @@ def train_model(model_to_train, fixed_DOS, structure_splines, spline_positions, # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Average Hartree Energy Reference -# +# for i in total_edos_H[train_index]: plt.plot(x_dos_H, i, color="C0", alpha=0.6) @@ -905,5 +906,5 @@ def train_model(model_to_train, fixed_DOS, structure_splines, spline_positions, plt.xlabel("Energy [eV]") plt.ylabel("DOS") print("The DOS alignment is better under the optimized energy reference") -print ("The difference will increase with more training epochs") +print("The difference will increase with more training epochs") # %%