Chemical refining of petroleum