External field induced nonlinear molecular deformation and switching dynamics of nematic and smectic liquid crystals