Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
dyzheng committed Jul 28, 2022
2 parents 383283f + ada36f1 commit 3c5e85b
Show file tree
Hide file tree
Showing 17 changed files with 269 additions and 204 deletions.
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Bug Report
description: Create a report for problems with ABACUS
labels: Bug
assignees:
- dyzheng
body:
- type: textarea
attributes:
label: Describe the bug
description: |
A clear and concise description of what the bug is. The bug may results in:
- abnormal interruption of the program,
- systematic or randomized numerical error, or
- relatively low efficiency.
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: |
A clear and concise description of what you expected to happen.
- type: textarea
attributes:
label: To Reproduce
description: |
Steps to reproduce the behavior:
1. [e.g. clone the source code from ...]
2. [e.g. configure CMake with options ...]
3. [e.g. build ABACUS with ...]
4. [e.g. run ABACUS with ...]
It is recommended to attach your calculation case here for the developers to reproduce the bug.
- type: textarea
attributes:
label: Environment
description: |
- OS: [e.g. Ubuntu 20.04]
- Compiler: [e.g. gcc 5.1.0]
- Dependencies: [e.g. Intel MKL, OpenBLAS]
- type: textarea
attributes:
label: Additional Context
description: |
Add any other context about the problem here.
- type: markdown
attributes:
value: >
Thanks for contributing 🎉!
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/feature-request.md

This file was deleted.

33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature Request
description: Suggest something more for ABACUS to do
labels: Feature
assignees:
- mohanchen

body:
- type: textarea
attributes:
label: Background
description: |
A clear and concise description of why this new feature is important.
validations:
required: true

- type: textarea
attributes:
label: Describe the solution you'd like
description: |
A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
attributes:
label: Additional Context
description: |
Add any other context or screenshots about the feature request here.
- type: markdown
attributes:
value: >
Thanks for contributing 🎉!
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/functionality-request.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/help-wanted.md

This file was deleted.

18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/help-wanted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Help Wanted
description: For general questions or assistance.
labels: Help wanted
assignees:
- caic99

body:
- type: textarea
attributes:
label: Details
description: |
Want to use ABACUS for certain system? Facing problems when installing ABACUS? Don't know how to choose a good parameter? Feel free to reach us, and we'll do our best to help!
validations:
required: true
- type: markdown
attributes:
value: >
Thanks for contributing 🎉!
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/software-enhancements.md

This file was deleted.

27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/software-enhancements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Software Enhancements
description: Suggest an idea to make ABACUS more robust and organized
labels: Refactor
assignees:
- caic99

body:
- type: textarea
attributes:
label: Describe Current Status and Possible Solution
description: |
A clear and concise description of why this enhancement is important.
Describing the current situation of ABACUS is preferred.
If you have some ideas about how to achieve it, please feel free to comment.
validations:
required: true

- type: textarea
attributes:
label: Additional Context
description: |
Add any other context or screenshots about the enhancement here.
- type: markdown
attributes:
value: >
Thanks for contributing 🎉!
2 changes: 1 addition & 1 deletion .github/workflows/static.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Static Analysis

on:
pull_request:
pull_request_target:

jobs:
clang-tidy:
Expand Down
3 changes: 1 addition & 2 deletions source/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2300,8 +2300,7 @@ void Input::Check(void)
if (!this->relax_nmax)
this->relax_nmax = 50;
}

else if (calculation == "nscf")
else if (calculation == "nscf" || calculation == "get_S")
{
GlobalV::CALCULATION = "nscf";
this->relax_nmax = 1;
Expand Down
83 changes: 48 additions & 35 deletions source/module_esolver/esolver_ks_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,52 +44,56 @@ namespace ModuleESolver
{
ESolver_KS::Init(inp,ucell);


#ifdef __MPI
if (GlobalV::CALCULATION == "nscf")
// if we are only calculating S, then there is no need
// to prepare for potentials and so on
if(GlobalV::CALCULATION!="calc_S")
{
switch (GlobalC::exx_global.info.hybrid_type)
#ifdef __MPI
if (GlobalV::CALCULATION == "nscf")
{
case Exx_Global::Hybrid_Type::HF:
case Exx_Global::Hybrid_Type::PBE0:
case Exx_Global::Hybrid_Type::SCAN0:
case Exx_Global::Hybrid_Type::HSE:
XC_Functional::set_xc_type(ucell.atoms[0].xc_func);
break;
switch (GlobalC::exx_global.info.hybrid_type)
{
case Exx_Global::Hybrid_Type::HF:
case Exx_Global::Hybrid_Type::PBE0:
case Exx_Global::Hybrid_Type::SCAN0:
case Exx_Global::Hybrid_Type::HSE:
XC_Functional::set_xc_type(ucell.atoms[0].xc_func);
break;
}
}
}
#endif

#ifdef __DEEPKS
//wenfei 2021-12-19
//if we are performing DeePKS calculations, we need to load a model
if (GlobalV::deepks_scf)
{
// load the DeePKS model from deep neural network
GlobalC::ld.load_model(INPUT.deepks_model);
}
//wenfei 2021-12-19
//if we are performing DeePKS calculations, we need to load a model
if (GlobalV::deepks_scf)
{
// load the DeePKS model from deep neural network
GlobalC::ld.load_model(INPUT.deepks_model);
}
#endif

// Initialize the local wave functions.
// npwx, eigenvalues, and weights
// npwx may change according to cell change
// this function belongs to cell LOOP
GlobalC::wf.allocate_ekb_wg(GlobalC::kv.nks);
// Initialize the local wave functions.
// npwx, eigenvalues, and weights
// npwx may change according to cell change
// this function belongs to cell LOOP
GlobalC::wf.allocate_ekb_wg(GlobalC::kv.nks);

// Initialize the FFT.
// this function belongs to cell LOOP
// Initialize the FFT.
// this function belongs to cell LOOP

// output is GlobalC::ppcell.vloc 3D local pseudopotentials
// without structure factors
// this function belongs to cell LOOP
GlobalC::ppcell.init_vloc(GlobalC::ppcell.vloc, GlobalC::rhopw);
// output is GlobalC::ppcell.vloc 3D local pseudopotentials
// without structure factors
// this function belongs to cell LOOP
GlobalC::ppcell.init_vloc(GlobalC::ppcell.vloc, GlobalC::rhopw);

// Initialize the sum of all local potentials.
// if ion_step==0, read in/initialize the potentials
// this function belongs to ions LOOP
int ion_step = 0;
GlobalC::pot.init_pot(ion_step, GlobalC::sf.strucFac);
ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT POTENTIAL");
// Initialize the sum of all local potentials.
// if ion_step==0, read in/initialize the potentials
// this function belongs to ions LOOP
int ion_step = 0;
GlobalC::pot.init_pot(ion_step, GlobalC::sf.strucFac);
ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT POTENTIAL");
} // end ifnot calc_S

//------------------init Basis_lcao----------------------
// Init Basis should be put outside of Ensolver.
Expand All @@ -98,6 +102,15 @@ namespace ModuleESolver
this->Init_Basis_lcao(this->orb_con, inp, ucell);
//------------------init Basis_lcao----------------------

if(GlobalV::CALCULATION=="get_S")
{
//pass Hamilt-pointer to Operator
this->UHM.genH.LM = this->UHM.LM = &this->LM;
//pass basis-pointer to EState and Psi
this->LOC.ParaV = this->LOWF.ParaV = this->LM.ParaV;
return;
}

//------------------init Hamilt_lcao----------------------
// * allocate H and S matrices according to computational resources
// * set the 'trace' between local H/S and global H/S
Expand Down
1 change: 1 addition & 0 deletions source/module_esolver/esolver_ks_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace ModuleESolver
void cal_Stress(ModuleBase::matrix& stress) override;
void postprocess() override;
void nscf() override;
void get_S();

protected:
virtual void beforescf(const int istep) override;
Expand Down
Loading

0 comments on commit 3c5e85b

Please sign in to comment.