From 01aeefe2d63d09ce653fd4a905a4047989d5bba8 Mon Sep 17 00:00:00 2001 From: LUNASEA <33978601+maki49@users.noreply.github.com> Date: Thu, 23 May 2024 09:54:42 +0800 Subject: [PATCH] default and force set symmetry=0 with efield (#4209) --- docs/advanced/input_files/input-main.md | 1 + source/module_io/input.cpp | 5 +++++ source/module_io/input_conv.cpp | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index d1c996127d..6e58330990 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -461,6 +461,7 @@ These variables are used to control general system parameters. - 0: - if *[calculation](#calculation)==md/nscf/get_pchg/get_wf/get_S* or *[gamma_only](#gamma_only)==True*; - If (*[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*). Currently *symmetry==1* is not supported in EXX (exact exchange) calculation. + - If *[efield_flag](#efield_flag)==1* - 1: else ### symmetry_prec diff --git a/source/module_io/input.cpp b/source/module_io/input.cpp index f93e01659b..19bbe5deb8 100644 --- a/source/module_io/input.cpp +++ b/source/module_io/input.cpp @@ -3381,6 +3381,11 @@ void Input::Default_2(void) // jiyy add 2019-08-04 } } } + + if (efield_flag) + { + symmetry = "0"; + } } #ifdef __MPI void Input::Bcast() diff --git a/source/module_io/input_conv.cpp b/source/module_io/input_conv.cpp index 59d3a4a5c0..8f6aaf256a 100644 --- a/source/module_io/input_conv.cpp +++ b/source/module_io/input_conv.cpp @@ -507,6 +507,10 @@ void Input_Conv::Convert(void) elecstate::Efield::efield_pos_dec = INPUT.efield_pos_dec; elecstate::Efield::efield_amp = INPUT.efield_amp; + // efield does not support symmetry=1 + if (INPUT.efield_flag && INPUT.symmetry == "1") + ModuleSymmetry::Symmetry::symm_flag = 0; + //---------------------------------------------------------- // Yu Liu add 2022-09-13 //----------------------------------------------------------