def get_potential_energy(self, a):
        """Calculate potential energy."""
        e = 0.0
        for c in self.calcs:
            e += c.get_potential_energy(a)
        return e
def get_potential_energy ( self , a ) : e = 0.0 for c in self . calcs : e += c . get_potential_energy ( a ) return e
Calculate potential energy.