def energy(self):
result = <NUM_LIT:0.0><EOL>for index1 in range(self.numc):<EOL><INDENT>for index2 in range(index1):<EOL><INDENT>if self.scaling[index1, index2] > <NUM_LIT:0>:<EOL><INDENT>for se, ve in self.yield_pair_energies(index1, index2):<EOL><INDENT>result += se*ve*self.scaling[index1, index2]<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return result<EOL>
Compute the energy of the system