Skip to content

Commit 77df470

Browse files
authored
Merge branch 'develop' into ucell18
2 parents f2cd110 + 79e054e commit 77df470

File tree

108 files changed

+3558
-4344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3558
-4344
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,7 @@ Warning: this function is not robust enough for the current version. Please try
20602060
- **Type**: int
20612061
- **Availability**: numerical atomic orbital basis
20622062
- **Description**: Include V_delta label for DeePKS training. When `deepks_out_labels` is true and `deepks_v_delta` > 0, ABACUS will output h_base.npy, v_delta.npy and h_tot.npy(h_tot=h_base+v_delta).
2063-
Meanwhile, when `deepks_v_delta` equals 1, ABACUS will also output v_delta_precalc.npy, which is used to calculate V_delta during DeePKS training. However, when the number of atoms grows, the size of v_delta_precalc.npy will be very large. In this case, it's recommended to set `deepks_v_delta` as 2, and ABACUS will output psialpha.npy and grad_evdm.npy but not v_delta_precalc.npy. These two files are small and can be used to calculate v_delta_precalc in the procedure of training DeePKS.
2063+
Meanwhile, when `deepks_v_delta` equals 1, ABACUS will also output v_delta_precalc.npy, which is used to calculate V_delta during DeePKS training. However, when the number of atoms grows, the size of v_delta_precalc.npy will be very large. In this case, it's recommended to set `deepks_v_delta` as 2, and ABACUS will output phialpha.npy and grad_evdm.npy but not v_delta_precalc.npy. These two files are small and can be used to calculate v_delta_precalc in the procedure of training DeePKS.
20642064
- **Default**: 0
20652065

20662066
### deepks_out_unittest
@@ -2446,10 +2446,11 @@ These variables are relevant when using hybrid functionals.
24462446
### exx_ccp_rmesh_times
24472447

24482448
- **Type**: Real
2449-
- **Description**: This parameter determines how many times larger the radial mesh required for calculating Columb potential is to that of atomic orbitals. For HSE, setting it to 1 is enough. But for PBE0, a much larger number must be used.
2449+
- **Description**: This parameter determines how many times larger the radial mesh required for calculating Columb potential is to that of atomic orbitals. The value should be at least 1. Reducing this value can effectively increase the speed of self-consistent calculations using hybrid functionals.
24502450
- **Default**:
2451-
- 1.5: if *[dft_functional](#dft_functional)==hse*
2452-
- 5: else
2451+
- 5: if *[dft_functional](#dft_functional)==hf/pbe0/scan0/muller/power/wp22*
2452+
- 1.5: if *[dft_functional](#dft_functional)==hse/cwp22*
2453+
- 1: else
24532454

24542455
### exx_distribute_type
24552456

@@ -2488,6 +2489,7 @@ These variables are relevant when using hybrid functionals.
24882489
- **Description**:
24892490
- True: Enforce LibRI to use `double` data type.
24902491
- False: Enforce LibRI to use `complex` data type.
2492+
Setting it to True can effectively improve the speed of self-consistent calculations with hybrid functionals.
24912493
- **Default**: depends on the [gamma_only](#gamma_only) option
24922494
- True: if gamma_only
24932495
- False: else

examples/lr-tddft/lcao_H2O/INPUT

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ orbital_dir ../../../tests/PP_ORB
66
calculation scf
77
nbands 23
88
symmetry -1
9+
nspin 2
910

1011
#Parameters (2.Iteration)
1112
ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
@@ -30,6 +31,7 @@ xc_kernel lda
3031
lr_solver dav
3132
lr_thr 1e-2
3233
pw_diag_ndim 2
34+
# lr_unrestricted 1 ### use this to do TDUKS calculation for closeshell systems (openshell system will force TDUKS)
3335

3436
esolver_type ks-lr
3537
out_alllog 1
@@ -39,6 +41,7 @@ out_alllog 1
3941
nvirt 19
4042
abs_wavelen_range 40 180
4143
abs_broadening 0.01
44+
abs_gauge length
4245

4346
### [1] Energy cutoff determines the quality of numerical quadratures in your calculations.
4447
### So it is strongly recommended to test whether your result (such as converged SCF energies) is

examples/lr-tddft/lcao_Si2/INPUT

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ pseudo_dir ../../../tests/PP_ORB
55
orbital_dir ../../../tests/PP_ORB
66
calculation scf
77
nbands 23
8-
symmetry 0
8+
symmetry -1
9+
nspin 2
910

1011
#Parameters (2.Iteration)
1112
ecutwfc 60 ###Energy cutoff needs to be tested to ensure your calculation is reliable.[1]
@@ -37,6 +38,8 @@ out_alllog 1
3738

3839
nvirt 19
3940
abs_wavelen_range 100 175
41+
abs_broadening 0.01 # in Ry
42+
abs_gauge velocity ### velocity gauge is recommended for periodic systems
4043

4144

4245
### [1] Energy cutoff determines the quality of numerical quadratures in your calculations.

source/Makefile.Objects

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,12 @@ OBJS_CELL=atom_pseudo.o\
190190
update_cell.o\
191191

192192
OBJS_DEEPKS=LCAO_deepks.o\
193-
deepks_fgamma.o\
194-
deepks_fk.o\
193+
deepks_force.o\
195194
LCAO_deepks_odelta.o\
196195
LCAO_deepks_io.o\
197196
LCAO_deepks_mpi.o\
198197
LCAO_deepks_pdm.o\
199-
LCAO_deepks_psialpha.o\
198+
LCAO_deepks_phialpha.o\
200199
LCAO_deepks_torch.o\
201200
LCAO_deepks_vdelta.o\
202201
deepks_hmat.o\
@@ -369,7 +368,6 @@ OBJS_MD=fire.o\
369368

370369
OBJS_NEIGHBOR=sltk_atom.o\
371370
sltk_atom_arrange.o\
372-
sltk_atom_input.o\
373371
sltk_grid.o\
374372
sltk_grid_driver.o\
375373

@@ -733,6 +731,7 @@ OBJS_TENSOR=tensor.o\
733731
xc_kernel.o\
734732
pot_hxc_lrtd.o\
735733
lr_spectrum.o\
734+
lr_spectrum_velocity.o\
736735
hamilt_casida.o\
737736
esolver_lrtd_lcao.o\
738737

source/module_basis/module_nao/two_center_bundle.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class TwoCenterBundle
1212
public:
1313
TwoCenterBundle() = default;
1414
~TwoCenterBundle() = default;
15+
TwoCenterBundle& operator=(TwoCenterBundle&&) = default;
1516

1617
// NOTE: some variables might be set only on RANK-0
1718
void build_orb(int ntype, const std::string* file_orb0);

source/module_cell/module_neighbor/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ add_library(
33
OBJECT
44
sltk_atom.cpp
55
sltk_atom_arrange.cpp
6-
sltk_atom_input.cpp
76
sltk_grid.cpp
87
sltk_grid_driver.cpp
98
)

source/module_cell/module_neighbor/sltk_atom.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
/*** Constructors and destructor ***/
55
FAtom::FAtom()
66
{
7-
d_x = 0.0;
8-
d_y = 0.0;
9-
d_z = 0.0;
10-
type = 0;
7+
x = 0.0;
8+
y = 0.0;
9+
z = 0.0;
10+
type = 0;
1111
natom = 0;
1212
}

source/module_cell/module_neighbor/sltk_atom.h

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,26 @@
1010
// the type and the index,
1111
class FAtom
1212
{
13-
private:
14-
double d_x;
15-
double d_y;
16-
double d_z;
17-
std::vector<FAtom *> adjacent;
13+
public:
14+
double x;
15+
double y;
16+
double z;
1817

1918
int type;
2019
int natom;
2120

2221
int cell_x;
2322
int cell_y;
2423
int cell_z;
25-
public:
26-
//==========================================================
27-
// Default Constructor and deconstructor
28-
//==========================================================
2924

3025
FAtom();
3126
FAtom(const double& x_in, const double& y_in, const double& z_in,
3227
const int& type_in, const int& natom_in,
3328
const int& cell_x_in, const int& cell_y_in, const int& cell_z_in)
3429
{
35-
d_x = x_in;
36-
d_y = y_in;
37-
d_z = z_in;
30+
x = x_in;
31+
y = y_in;
32+
z = z_in;
3833
type = type_in;
3934
natom = natom_in;
4035
cell_x = cell_x_in;
@@ -43,27 +38,7 @@ class FAtom
4338
}
4439
~FAtom()
4540
{
46-
adjacent.clear();
47-
}
48-
49-
void addAdjacent(FAtom& atom_in)
50-
{
51-
adjacent.push_back( &atom_in);
5241
}
53-
const std::vector<FAtom *>& getAdjacent() const { return adjacent; }
54-
void clearAdjacent() { adjacent.clear(); }
55-
//==========================================================
56-
// MEMBER FUNCTION :
57-
// EXPLAIN : get value
58-
//==========================================================
59-
const double& x() const { return d_x; }
60-
const double& y() const { return d_y; }
61-
const double& z() const { return d_z; }
62-
const int& getType() const { return type;}
63-
const int& getNatom() const { return natom;}
64-
const int& getCellX() const { return cell_x; }
65-
const int& getCellY() const { return cell_y; }
66-
const int& getCellZ() const { return cell_z; }
6742
};
6843

6944
#endif

0 commit comments

Comments
 (0)