Ab initio based polarizable force field generation and application to liquid silica and magnesia.