def yield_pair_energies(self, index1, index2):
d_1 = <NUM_LIT:1>/self.distances[index1, index2]<EOL>if self.charges is not None:<EOL><INDENT>c1 = self.charges[index1]<EOL>c2 = self.charges[index2]<EOL>yield c1*c2*d_1, <NUM_LIT:1><EOL><DEDENT>if self.dipoles is not None:<EOL><INDENT>d_3 = d_1**<NUM_LIT:3><EOL>d_5 = d_1**<NUM_LIT:5><EOL>delta = self.deltas[index1, index2]<EOL>p1 = self.dipoles[index1]<EOL>p2 = self.dipoles[index2]<EOL>yield d_3*np.dot(p1, p2), <NUM_LIT:1><EOL>yield -<NUM_LIT:3>*d_5, np.dot(p1, delta)*np.dot(delta, p2)<EOL>if self.charges is not None:<EOL><INDENT>yield c1*d_3, np.dot(p2, delta)<EOL>yield c2*d_3, np.dot(p1, -delta)<EOL><DEDENT><DEDENT>
Yields pairs ((s(r_ij), v(bar{r}_ij))