Skip to content

Commit b9e6b3f

Browse files
author
wenfei-li
committed
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into develop
2 parents 8b2a4cb + f73db98 commit b9e6b3f

28 files changed

+2136
-2033
lines changed

docs/examples/phonopy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[back to main page](../../README.md)
44

55

6-
[Phonopy](https://github.com/phonopy/phonopy) is a powerful package to calculate phonon and related properties. It has provided interface with ABACUS. In the following, we take the FCC aluminum as an example:
6+
[Phonopy](https://github.com/phonopy/phonopy) (Note: please use the `develop` branch, rather than the `master` branch until the abacus interface has been merged into phonopy's `master` branch.) is a powerful package to calculate phonon and related properties. It has provided interface with ABACUS. In the following, we take the FCC aluminum as an example:
77

88

99
1. Prepare a 'setting.conf' with following tags:
@@ -39,4 +39,4 @@ PRIMITIVE_AXES = 0 1/2 1/2 1/2 0 1/2 1/2 1/2 0
3939
BAND= 1 1 1 1/2 1/2 1 3/8 3/8 3/4 0 0 0 1/2 1/2 1/2
4040
BAND_POINTS = 21
4141
BAND_CONNECTION = .TRUE.
42-
```
42+
```

docs/features.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,14 @@ ATOMIC_SPECIES
5050
Si 28.00 Si_ONCV_PBE-1.0.upf
5151
```
5252

53-
The user can download the pseudopotential files from our [website](http://abacus.ustc.edu.cn/pseudo.html).
53+
You can download the pseudopotential files from our [website](http://abacus.ustc.edu.cn/pseudo/list.htm).
5454

55-
For more information of different types of pseudopotentials, please visit the Quantum espresso [website](http://www.quantum-espresso.org/pseudopotentials/).
55+
There are pseudopotential files in these websites which are also supported by ABACUS:
56+
1. [Quantum ESPRESSO](http://www.quantum-espresso.org/pseudopotentials/).
57+
2. [SG15-ONCV](http://quantum-simulation.org/potentials/sg15_oncv/upf/).
58+
3. [DOJO](http://www.pseudo-dojo.org/).
59+
60+
If LCAO base is used, the numerical orbital files should match the pseudopotential files. The [official orbitals package](http://abacus.ustc.edu.cn/pseudo/list.htm) only matches SG15-ONCV pseudopotentials.
5661

5762
[back to top](#features)
5863

docs/input-main.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ This part of variables are used to control general system parameters.
158158
#### symmetry
159159

160160
- **Type**: Integer
161-
- **Description**: takes value 0 and 1, if set to 1, symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations.
161+
- **Description**: takes value 1, 0 and -1.
162+
- if set to 1, symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups only)
163+
- if set to 0, only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as one double weight k point.
164+
- if set to -1, any symmetry will not be considered.
162165
- **Default**: 0
163166

164167
#### kpar

source/input.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void Input::Default(void)
177177
ks_solver = "default"; // xiaohui add 2013-09-01
178178
search_radius = -1.0; // unit: a.u. -1.0 has no meaning.
179179
search_pbc = true;
180-
symmetry = false;
180+
symmetry = 0;
181181
init_vel = false;
182182
symmetry_prec = 1.0e-5; // LiuXh add 2021-08-12, accuracy for symmetry
183183
cal_force = 0;
@@ -2015,7 +2015,7 @@ void Input::Bcast()
20152015
Parallel_Common::bcast_double(search_radius);
20162016
Parallel_Common::bcast_bool(search_pbc);
20172017
Parallel_Common::bcast_double(search_radius);
2018-
Parallel_Common::bcast_bool(symmetry);
2018+
Parallel_Common::bcast_int(symmetry);
20192019
Parallel_Common::bcast_bool(init_vel); // liuyu 2021-07-14
20202020
Parallel_Common::bcast_double(symmetry_prec); // LiuXh add 2021-08-12, accuracy for symmetry
20212021
Parallel_Common::bcast_int(cal_force);
@@ -2451,7 +2451,7 @@ void Input::Check(void)
24512451
else if (calculation == "md" || calculation == "sto-md") // mohan add 2011-11-04
24522452
{
24532453
GlobalV::CALCULATION = calculation;
2454-
symmetry = false;
2454+
symmetry = 0;
24552455
cal_force = 1;
24562456
if (mdp.md_nstep == 0)
24572457
{

source/input.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ class Input
4646

4747
bool init_vel; // read velocity from STRU or not liuyu 2021-07-14
4848

49-
bool symmetry; // turn on symmetry or not
49+
/* symmetry level:
50+
-1, no symmetry at all;
51+
0, only basic time reversal would be considered;
52+
1, point group symmetry would be considered*/
53+
int symmetry;
5054
double symmetry_prec; // LiuXh add 2021-08-12, accuracy for symmetry
5155
int kpar; // ecch pool is for one k point
5256

source/input_conv.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ void Input_Conv::Convert(void)
373373

374374
if (GlobalC::exx_global.info.hybrid_type != Exx_Global::Hybrid_Type::No)
375375
{
376+
//EXX case, convert all EXX related variables
376377
GlobalC::exx_global.info.hybrid_alpha = INPUT.exx_hybrid_alpha;
377378
XC_Functional::get_hybrid_alpha(INPUT.exx_hybrid_alpha);
378379
GlobalC::exx_global.info.hse_omega = INPUT.exx_hse_omega;
@@ -406,6 +407,9 @@ void Input_Conv::Convert(void)
406407
Exx_Abfs::Jle::Lmax = INPUT.exx_opt_orb_lmax;
407408
Exx_Abfs::Jle::Ecut_exx = INPUT.exx_opt_orb_ecut;
408409
Exx_Abfs::Jle::tolerence = INPUT.exx_opt_orb_tolerence;
410+
411+
//EXX does not support any symmetry analyse, force symmetry setting to -1
412+
ModuleSymmetry::Symmetry::symm_flag = -1;
409413
}
410414
#endif
411415
#endif

source/module_elecstate/elecstate_lcao.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ void ElecStateLCAO::print_psi(const psi::Psi<double>& psi_in)
137137

138138
// output but not do "2d-to-grid" conversion
139139
double** wfc_grid = nullptr;
140+
#ifdef __MPI
140141
this->lowf->wfc_2d_to_grid(ElecStateLCAO::out_wfc_lcao, psi_in.get_pointer(), wfc_grid, this->ekb, this->wg);
142+
#endif
141143
return;
142144
}
143145
void ElecStateLCAO::print_psi(const psi::Psi<std::complex<double>>& psi_in)
@@ -159,7 +161,7 @@ void ElecStateLCAO::print_psi(const psi::Psi<std::complex<double>>& psi_in)
159161
{
160162
for (int iw = 0; iw < GlobalV::NLOCAL; iw++)
161163
{
162-
this->lowf->wfc_k_grid[ik][ib][iw] = psi(ib,iw);
164+
this->lowf->wfc_k_grid[ik][ib][iw] = psi_in(ib, iw);
163165
}
164166
}
165167
#endif

source/module_elecstate/test/updaterhok_pw_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct ENVPrepare
120120
std::string latname_;
121121
int ntype_;
122122
double pseudo_rcut_;
123-
bool symm_flag_;
123+
int symm_flag_;
124124
std::string kpoint_card_;
125125
int nspin_;
126126
bool gamma_only_;
@@ -155,7 +155,7 @@ struct ENVPrepare
155155
latname_ = "sc";
156156
ntype_ = 1;
157157
pseudo_rcut_ = 15.0;
158-
symm_flag_ = false;
158+
symm_flag_ = 0;
159159
kpoint_card_ = "./support/KPT";
160160
nspin_ = 1;
161161
gamma_only_ = false;

source/module_elecstate/test/updaterhok_pw_test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "module_pw/pw_basis_k.h"
2828
#include "src_parallel/parallel_pw.h"
2929

30-
bool ModuleSymmetry::Symmetry::symm_flag;
30+
int ModuleSymmetry::Symmetry::symm_flag;
3131

3232
LCAO_Orbitals::LCAO_Orbitals(){}
3333
LCAO_Orbitals::~LCAO_Orbitals(){}

source/module_esolver/esolver_ks_lcao_elec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ namespace ModuleESolver
516516
}
517517

518518
// add by jingan
519-
if (berryphase::berry_phase_flag && ModuleSymmetry::Symmetry::symm_flag == 0)
519+
if (berryphase::berry_phase_flag && ModuleSymmetry::Symmetry::symm_flag != 1)
520520
{
521521
berryphase bp(this->LOWF);
522522
bp.Macroscopic_polarization(this->psi);

0 commit comments

Comments
 (0)