Gravitational potential as a source of earthquake energy