Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge recent changes on master #2

Merged
merged 84 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
e1dd489
add comments in LOOPcell and LOOP_ions
mohanchen Mar 25, 2021
c655c9c
update ions.cpp output in cell-relax
dyzheng Mar 26, 2021
999e871
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
mohanchen Mar 27, 2021
81fbd6b
add comments in ORB_nonlocal
mohanchen Mar 27, 2021
34be14f
add comment in gint_k
mohanchen Mar 28, 2021
80af4bc
fixed bug in SOC and banned hpseps+gamma_only line
dyzheng Mar 30, 2021
610cfe0
add comments in LCAO_gen_fixedH
mohanchen Mar 30, 2021
b687b4c
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
mohanchen Mar 30, 2021
bc6b231
modify h_psi to make it able to calculate all bands in one time
Qianruipku Mar 31, 2021
04c6fe2
add ORB_api in src_external
mohanchen Mar 31, 2021
2afd4c7
update ORB_api and modifies related files in ABACUS
mohanchen Apr 1, 2021
ea3584c
1. add OpenMP in PW_Basis::setup_structure_factor
PeizeLin Apr 1, 2021
f497f5a
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
PeizeLin Apr 1, 2021
bc6f3ab
fix a bug in schmit_orth which results from commit e647aa9
Qianruipku Apr 1, 2021
36df797
update ORB files
mohanchen Apr 1, 2021
6964564
delete usage of tools.h in ORB_gaunt_table
mohanchen Apr 1, 2021
19bcaef
1. delete unnecessary header files included in class Sph_Bessel_Recur…
PeizeLin Apr 2, 2021
d774dfd
Merge
Qianruipku Apr 2, 2021
52f65dc
Merge pull request #12 from mohanchen/master
mohanchen Apr 2, 2021
de5e673
add lat0 parameter in ORB_control::set_orb_tables subroutine to minim…
mohanchen Apr 2, 2021
6350821
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
mohanchen Apr 2, 2021
22f6ceb
modify ORB_table_beta.cpp and ORB_table_beta.h
mohanchen Apr 2, 2021
164762a
set ntype as an input parameter
mohanchen Apr 3, 2021
3135222
keep eliminating global variables in ORB files
mohanchen Apr 3, 2021
d262d73
keep eliminating global variables in ORB
mohanchen Apr 3, 2021
8b6d0f1
add math_integral class
mohanchen Apr 3, 2021
df89607
delete SimpsonIntegrals in Mathzone, use the one in src_global/math_i…
mohanchen Apr 3, 2021
8c01a63
some files haven't be successfully submitted in reading descriptor
maki49 Apr 3, 2021
04671f6
Merge pull request #13 from maki49/master
mohanchen Apr 3, 2021
74162cb
make Exx_Abfs::Lmax as an input for ORB module
mohanchen Apr 3, 2021
aba7fa1
fix a bug in h_psi for NSPIN!=4
Qianruipku Apr 3, 2021
4c6ff81
out lcao-line descriptor
maki49 Apr 3, 2021
571b31a
Merge pull request #14 from mohanchen/master
mohanchen Apr 3, 2021
1784c3d
Merge pull request #15 from maki49/master
mohanchen Apr 3, 2021
36c2c1a
add new input parameter read_file_dir
dyzheng Apr 3, 2021
4682505
eliminate inclusion of global files in ORB* files
mohanchen Apr 5, 2021
722437d
add __NORMAL option in complex to avoid linking to lapack in some cases
mohanchen Apr 5, 2021
75db64f
update matrix to make connecting to lapack unnecessary
mohanchen Apr 5, 2021
0c44bde
update of ORB files
mohanchen Apr 6, 2021
74efacf
optimize src_lcao/LCAO_gen_fixedH.cpp
mohanchen Apr 6, 2021
a87b95f
delete useless variable itia* in ORB_read
mohanchen Apr 6, 2021
b46d52d
Merge pull request #16 from YuLiu98/master
mohanchen Apr 6, 2021
70bcce0
delete nkb variable in ORB_read, the variable has been defined in ppc…
mohanchen Apr 6, 2021
07c6f8b
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
mohanchen Apr 6, 2021
220a616
add GRID_api in src_external
mohanchen Apr 6, 2021
78e59d5
fixed bug in cell-relax, start refactor after_vc part
dyzheng Apr 6, 2021
5cc163b
Merge pull request #1 from abacusmodeling/master
YuLiu98 Apr 6, 2021
7151cb7
fix a segfault in src_lcao/LCAO_gen_fixedH.cpp
mohanchen Apr 6, 2021
64605ac
Merge pull request #17 from YuLiu98/master
mohanchen Apr 6, 2021
2fb5533
delte NEW_DM global variable, use INPUT.new_dm instead, this will be …
mohanchen Apr 6, 2021
73631b3
add some comments in ylm and ORB_gen_tables
mohanchen Apr 6, 2021
3866959
fixed a bug in FORCE&&STRESS, but this part still puzzling
dyzheng Apr 7, 2021
e86582b
refactor some repete codes in Unitcell
dyzheng Apr 7, 2021
2e0ca29
update grid base
mohanchen Apr 8, 2021
5a9e616
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
mohanchen Apr 8, 2021
ee20bf1
seems a bug in src_lcao/LCAO_gen_fixedH.cpp when multiple cores are p…
YuLiu98 Apr 8, 2021
dc11cac
Merge pull request #18 from YuLiu98/master
mohanchen Apr 8, 2021
896c599
1. add BSSE for lcao
PeizeLin Apr 8, 2021
80491f3
Merge branch 'bsse'
PeizeLin Apr 8, 2021
a150a46
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
mohanchen Apr 9, 2021
f312d8f
fixed nspin=2 bug
dyzheng Apr 9, 2021
90cf8ab
fix bugs in lcao-line descriptor
maki49 Apr 10, 2021
bb6b769
Merge pull request #19 from maki49/master
mohanchen Apr 11, 2021
2e306ab
updates of ORB codes
mohanchen Apr 11, 2021
b462c01
fix ORB_gen_tables conflicts
mohanchen Apr 11, 2021
17ab4b8
revert
maki49 Apr 11, 2021
fe36788
Merge pull request #21 from maki49/master
mohanchen Apr 11, 2021
7622d73
fix a bug about no initialization of variable
mohanchen Apr 12, 2021
2d8b148
DFT+U stress
80610702-git Apr 14, 2021
e2db1f0
Delete lscc.f
80610702-git Apr 14, 2021
664bafc
Merge pull request #22 from 80610702-git/master
dyzheng Apr 14, 2021
5d8b838
Revert "DFT+U"
dyzheng Apr 16, 2021
2df94b5
Merge pull request #24 from abacusmodeling/revert-22-master
dyzheng Apr 16, 2021
deb8acf
fix a bug when the pseudopotential dir is incorrect
mohanchen Apr 16, 2021
ddfc1d0
delete ucell.lmax in ORB*
mohanchen Apr 16, 2021
ef9654e
set ORB parameters in ORB codes, not through global variables
mohanchen Apr 16, 2021
b50c6cc
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
mohanchen Apr 17, 2021
d4705f2
1. fix bug of flag_empty_element
PeizeLin Apr 17, 2021
fa5207c
Merge branch 'master' of https://github.com/abacusmodeling/abacus-dev…
PeizeLin Apr 17, 2021
0815376
1. delete testing header file
PeizeLin Apr 17, 2021
5a6a849
fixed bug of relax
dyzheng Apr 20, 2021
e2149c1
1. add Matrix3::Zero()
PeizeLin Apr 21, 2021
ddfbcf7
1. fix bug in Vdwd2::cal_stress()
PeizeLin Apr 21, 2021
397f78c
DFT+U (#25)
80610702-git Apr 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ABACUS.develop/examples/H2O-deepks-lcao/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ mixing_beta 0.4
out_band 0
out_descriptor 1
lmax_descriptor 2
newdm 1
4 changes: 4 additions & 0 deletions ABACUS.develop/examples/H2O-deepks-lcao/STRU
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ NUMERICAL_ORBITAL
H_gga_8au_60Ry_2s1p.orb
O_gga_7au_60Ry_2s2p1d.orb

NUMERICAL_DESCRIPTOR
jle.orb


LATTICE_CONSTANT
10

Expand Down
3 changes: 2 additions & 1 deletion ABACUS.develop/source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ memory.o\
print_info.o\
mathzone.o\
mathzone_add1.o\
math_integral.o\
integral.o \
poission.o \
polint.o \
Expand Down Expand Up @@ -153,6 +154,7 @@ LCAO_matrix.o\
LCAO_nnr.o \
LCAO_diago.o\
LCAO_evolve.o\
LCAO_descriptor.o\
ylm.o\
FORCE_STRESS.o\
FORCE_gamma.o\
Expand Down Expand Up @@ -262,7 +264,6 @@ variable_cell.o\
dftu.o\
dftu_yukawa.o\
dftu_relax.o\
lscc.o\

OBJS_COMMON=atom_spec.o \
unitcell.o \
Expand Down
26 changes: 1 addition & 25 deletions ABACUS.develop/source/README
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@

Currently we are working on optimizing the code structure of ABACUS,
implementing new functions, and adding more autotests.

-- mohan 2021-02-11

URGENT:

Ask Xiaohui Liu: all functions named with 'after_vc' should be reconstructed.
The 'FINAL_SCF' global varialble should be removed.
(condition: need to reconstruct these codes within a given time)

Ask Xiaohui Liu and Daye Zheng: We need test examples.

Ask Fuxiang He: we need to remove all TDDFT-related global variables
in global_variable.h, we need TDDFT examples.
(condition: need to reconstruct these codes within a given time)

Ask Daye Zheng: MD, force, stress modules need reconstruction

NEED TO DO:

Ask Xiaohui: we need to remove DQ and NQX in global_variable.h,
but the NQX is computed in ./src_pw/pseudopot_cell_vnl.cpp

Ask Peize: exx_lip.h and related Exx codes

QUESTION:

* in pw_basis.cpp, why ggwfc2=ggwfc if gamma_only is used?
37 changes: 29 additions & 8 deletions ABACUS.develop/source/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ void Input::Default(void)
atom_file = "";//xiaohui modify 2015-02-01
kpoint_file = "";//xiaohui modify 2015-02-01
pseudo_dir = "";
read_file_dir = "auto";
pseudo_type = "auto"; // mohan add 2013-05-20 (xiaohui add 2013-06-23)
wannier_card = "";
latname = "test";
Expand Down Expand Up @@ -359,7 +360,7 @@ void Input::Default(void)
kernel_type="rpa";
eels_method=0;
absorption_method=0;
system="bulk";
system_type="bulk";
eta=0.05;
domega=0.01;
nomega=300;
Expand Down Expand Up @@ -456,7 +457,7 @@ void Input::Default(void)

cell_factor = 1.2; //LiuXh add 20180619

newDM=1; // Shen Yu add 2019/5/9
new_dm=1; // Shen Yu add 2019/5/9
mulliken=0;// qi feng add 2019/9/10

//---------------------------------------------------------- //Peize Lin add 2020-04-04
Expand Down Expand Up @@ -949,6 +950,10 @@ bool Input::Read(const string &fn)
{
read_value(ifs, restart_mode);
}
else if (strcmp("read_file_dir", word) == 0)
{
read_value(ifs, read_file_dir);
}
else if (strcmp("start_wfc", word) == 0)
{
read_value(ifs, start_wfc);
Expand Down Expand Up @@ -1404,7 +1409,7 @@ bool Input::Read(const string &fn)
}
else if (strcmp("system", word) == 0)
{
read_value(ifs, system);
read_value(ifs, system_type);
}
else if (strcmp("eta", word) == 0)
{
Expand Down Expand Up @@ -1657,7 +1662,7 @@ bool Input::Read(const string &fn)
}
else if (strcmp("newdm", word) == 0)
{
read_value(ifs, newDM);
read_value(ifs, new_dm);
}
//----------------------------------------------------------------------------------
// Xin Qu added on 2020-10-29 for DFT+U
Expand Down Expand Up @@ -2040,6 +2045,7 @@ void Input::Bcast()
Parallel_Common::bcast_double( mixing_gg0 ); //mohan add 2014-09-27

Parallel_Common::bcast_string( restart_mode );
Parallel_Common::bcast_string( read_file_dir);
Parallel_Common::bcast_string( start_wfc );
Parallel_Common::bcast_int( mem_saver );
Parallel_Common::bcast_int( printe );
Expand Down Expand Up @@ -2161,7 +2167,7 @@ void Input::Bcast()
Parallel_Common::bcast_string( kernel_type );
Parallel_Common::bcast_int( eels_method );
Parallel_Common::bcast_int( absorption_method );
Parallel_Common::bcast_string( system );
Parallel_Common::bcast_string( system_type );
Parallel_Common::bcast_double( eta );
Parallel_Common::bcast_double( domega );
Parallel_Common::bcast_int( nomega );
Expand Down Expand Up @@ -2259,7 +2265,7 @@ void Input::Bcast()

//Parallel_Common::bcast_int( epsilon0_choice );
Parallel_Common::bcast_double( cell_factor); //LiuXh add 20180619
Parallel_Common::bcast_int( newDM ); // Shen Yu add 2019/5/9
Parallel_Common::bcast_int( new_dm ); // Shen Yu add 2019/5/9
Parallel_Common::bcast_bool( restart_save ); // Peize Lin add 2020.04.04
Parallel_Common::bcast_bool( restart_load ); // Peize Lin add 2020.04.04

Expand Down Expand Up @@ -2646,7 +2652,8 @@ void Input::Check(void)
else if (ks_solver == "hpseps")
{
#ifdef __MPI
ofs_warning << "It's a good choice to use hpseps!" << endl;
ofs_warning << "It's not a good choice to use hpseps!" << endl;
if(gamma_only) WARNING_QUIT("Input","hpseps can not be used for gamma_only.");
#else
WARNING_QUIT("Input","hpseps can not be used for series version.");
#endif
Expand Down Expand Up @@ -2814,7 +2821,7 @@ void Input::Check(void)
// pengfei 2016-12-14
if(spectral_type!="None")
{
if( system!="bulk" && system!="surface")
if( system_type!="bulk" && system_type!="surface")
{
WARNING_QUIT("Input","system must be bulk or surface");
}
Expand Down Expand Up @@ -2936,6 +2943,20 @@ void Input::Check(void)
}
}
}

const string ss = "test -d " + read_file_dir;
if(read_file_dir=="auto")
{
global_readin_dir = global_out_dir;
}
else if( system( ss.c_str() ))
{
WARNING_QUIT("Input","please set right files directory for reading in.");
}
else
{
global_readin_dir = read_file_dir + '/';
}

return;
}
Expand Down
5 changes: 3 additions & 2 deletions ABACUS.develop/source/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Input
string suffix; // suffix of out put dir
string atom_file; // file contains atomic positions -- xiaohui modify 2015-02-01
string pseudo_dir; // directory of pseudopotential
string read_file_dir; // directory of files for reading
string pseudo_type; // the type of pseudopotential, mohan add 2013-05-20, ABACUS supports
// UPF format (default) and vwr format. (xiaohui add 2013-06-23)
string kpoint_file; // file contains k-points -- xiaohui modify 2015-02-01
Expand Down Expand Up @@ -296,7 +297,7 @@ class Input
int absorption_method; // 0: vasp's method 1: pwscf's method
//int epsilon_choice; // 0: hilbert_transform method; 1: standard method
string kernel_type; // the kernel type: rpa, tdlda ...
string system; // bulk or surface
string system_type; // bulk or surface
double eta; // unit(Ry)
double domega; // unit(Ry)
int nomega;
Expand Down Expand Up @@ -398,7 +399,7 @@ class Input
// 2: use new DM algorithm and only show key debug information
// 3: use new DM algorithm and show all detail debug information
//==========================================================
int newDM;
int new_dm;

//==========================================================
// DFT+U Xin Qu added on 2020-10-29
Expand Down
17 changes: 10 additions & 7 deletions ABACUS.develop/source/input_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void Input_Conv::Convert(void)
}
//chi0_hilbert.epsilon = INPUT.epsilon;
chi0_hilbert.kernel_type = INPUT.kernel_type;
chi0_hilbert.system = INPUT.system;
chi0_hilbert.system = INPUT.system_type;
chi0_hilbert.eta = INPUT.eta;
chi0_hilbert.domega = INPUT.domega;
chi0_hilbert.nomega = INPUT.nomega;
Expand Down Expand Up @@ -314,7 +314,7 @@ void Input_Conv::Convert(void)
{
//chi0_standard.epsilon = INPUT.epsilon;
chi0_standard.epsilon = true;
chi0_standard.system = INPUT.system;
chi0_standard.system = INPUT.system_type;
chi0_standard.eta = INPUT.eta;
chi0_standard.domega = INPUT.domega;
chi0_standard.nomega = INPUT.nomega;
Expand Down Expand Up @@ -397,6 +397,8 @@ void Input_Conv::Convert(void)
#endif
}
else{
delete[] soc.m_loc;
soc.m_loc = new Vector3<double> [INPUT.ntype];
LSPINORB = false;
NONCOLIN = false;
DOMAG = false;
Expand Down Expand Up @@ -578,7 +580,7 @@ void Input_Conv::Convert(void)

ppcell.cell_factor = INPUT.cell_factor; //LiuXh add 20180619

NEW_DM=INPUT.newDM; // Shen Yu add 2019/5/9
// NEW_DM=INPUT.new_dm; // Shen Yu add 2019/5/9

//----------------------------------------------------------
// main parameters / electrons / spin ( 2/16 )
Expand Down Expand Up @@ -625,10 +627,11 @@ void Input_Conv::Convert(void)
//----------------------------------------------------------
// About LCAO
//----------------------------------------------------------
ORB.ecutwfc = INPUT.lcao_ecut;
ORB.dk = INPUT.lcao_dk;
ORB.dR = INPUT.lcao_dr;
ORB.Rmax = INPUT.lcao_rmax;
// mohan add 2021-04-16
// ORB.ecutwfc = INPUT.lcao_ecut;
// ORB.dk = INPUT.lcao_dk;
// ORB.dR = INPUT.lcao_dr;
// ORB.Rmax = INPUT.lcao_rmax;

// mohan add 2021-02-16
berryphase::berry_phase_flag = INPUT.berry_phase;
Expand Down
10 changes: 9 additions & 1 deletion ABACUS.develop/source/run_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ void Run_lcao::lcao_line(void)

// * reading the localized orbitals/projectors
// * construct the interpolation tables.
hm.orb_con.set_orb_tables();
hm.orb_con.set_orb_tables(
UOT,
ORB,
INPUT.lcao_ecut,
INPUT.lcao_dk,
INPUT.lcao_dr,
INPUT.lcao_rmax,
ucell.lat0,
Exx_Abfs::Lmax);

// * allocate H and S matrices according to computational resources
// * set the 'trace' between local H/S and global H/S
Expand Down
63 changes: 63 additions & 0 deletions ABACUS.develop/source/src_external/GRID_api/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is the Makefile of ABACUS-ORB API

include Makefile.system
include Makefile.Objects

VPATH=../../src_global\
:../../src_lcao\
:./\

#==========================
# Define HONG
#==========================
HONG= -DMETIS -DMKL_ILP64

#==========================
# OPTIMIZE OPTIONS
#==========================
OPTS_GDB = -g -W

#==========================
# OBJECTS NEEDED
#==========================
#FP_OBJS_0=$(OBJS_ORBITAL)\
#$(OBJS_GLOBAL)\
#main.o\

FP_OBJS_0=main.o\
$(OBJS_TRY)\
$(OBJS_ORBITAL)\

FP_OBJS=$(patsubst %.o, ${OBJ_DIR}/%.o, ${FP_OBJS_0})
PDIAG_OBJS=$(patsubst %.o, ${OBJ_DIR}/%.o, ${OBJS_PDIAG})
PDIAG_MR=$(patsubst %.o, ${OBJ_DIR}/%.o, ${PDIAG_MR_0})

#==========================
# MAKING OPTIONS
#==========================
fp_mpi :
@ make init
@ make -j $(NP) serial2

init :
@ if [ ! -d $(OBJ_DIR) ]; then mkdir $(OBJ_DIR); fi
@ if [ ! -d $(OBJ_DIR)/README ]; then echo "This directory contains all of the .o files" > $(OBJ_DIR)/README; fi
@ if [ ! -d ../bin ]; then mkdir ../bin; fi

serial : ${FP_OBJS} ${HEADERS}
${CPLUSPLUS} ${OPTS} $(FP_OBJS) ${LIBS} -o ${VERSION}.x

serial2 : ${FP_OBJS}
${CPLUSPLUS} ${OPTS} $(FP_OBJS) ${LIBS} -o ${VERSION}.x

#==========================
# rules
#==========================
${OBJ_DIR}/%.o:%.cpp
${CPLUSPLUS_MPI} ${OPTS} ${OPTS_MPI} -c ${HONG} $< -o $@
${OBJ_DIR}/%.o:%.f
${FORTRAN} -c ${HONG} $< -o $@

.PHONY:clean
clean:
@ if [ -d $(OBJ_DIR) ]; then rm -rf $(OBJ_DIR); fi
26 changes: 26 additions & 0 deletions ABACUS.develop/source/src_external/GRID_api/Makefile.Objects
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# This is a test makefile for Electronic-structure
#
# This particular makefile defines all the executables and objects
# files needed, who they depend on, and the compilation defaults.#
# The file makefile.local is included below.
# That file defines the actual commands to use to run the C++
# compiler, library options and directories, etc., all of which are
# machine specific and depend on the local installation. Hence the name.
#

VERSION= ABACUS-GRID
HEADERS= *.h

OBJS_TRY=math_integral.o\
complexarray.o\
complexmatrix.o\
matrix.o\

OBJS_GRID=grid_base.o\
grid_base_beta.o\
grid_bigcell.o\
grid_meshball.o\
grid_meshk.o\
grid_technique.o\

14 changes: 14 additions & 0 deletions ABACUS.develop/source/src_external/GRID_api/Makefile.system
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
include Makefile.vars

#==========================
# LIBS and INCLUDES
#==========================
LIBS = -lifcore -lm -lpthread

INCLUDES = -I. -Icommands

#==========================
# OPTIMIZE OPTIONS
#==========================
OPTS = ${INCLUDES} -Ofast -std=c++11 -simd -march=native -m64 -Werror -Wall -pedantic -g
#OPTS_MPI = -cxx=${CPLUSPLUS}
Loading