Skip to content

Commit

Permalink
Flake8 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WardLT committed Oct 5, 2023
1 parent 0798f29 commit 2488d50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jitterbug/model/soap.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def calculate(self, atoms=None, properties=('energy', 'forces', 'energies'),
grad_outputs=torch.ones_like(pred_energy),
)[0] # Derivative of the energy with respect to the descriptors for each center
d_energy_d_center_d_pos = torch.einsum('ijkl,il->ijk', d_desc_d_pos, d_energy_d_desc) # Derivative for each center with respect to each atom
pred_forces = -d_energy_d_center_d_pos.sum(dim=0) * scale # Total effect on each center from each atom
pred_forces = -d_energy_d_center_d_pos.sum(dim=0) * scale # Total effect on each center from each atom

# Store the results
self.results['forces'] = pred_forces.detach().numpy()
Expand Down

0 comments on commit 2488d50

Please sign in to comment.