Releasing chemical energy in spatiallyprogrammed ferroelectrics