def gradient_component(self, index1):
result = np.zeros(<NUM_LIT:3>, float)<EOL>for index2 in range(self.numc):<EOL><INDENT>if self.scaling[index1, index2] > <NUM_LIT:0>:<EOL><INDENT>for (se, ve), (sg, vg) in zip(self.yield_pair_energies(index1, index2), self.yield_pair_gradients(index1, index2)):<EOL><INDENT>result += (sg*self.directions[index1, index2]*ve + se*vg)*self.scaling[index1, index2]<EOL><DEDENT><DEDENT><DEDENT>return result<EOL>
Compute the gradient of the energy for one atom