forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 143
Update output filenames for PCHG #6299
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0cd7ba6
update PCHG
mohanchen ce17d48
update output file names of pchg
mohanchen 7ba579e
update reference data for PW tests
mohanchen cef6012
delete useless 074 example in 01_PW tests
mohanchen b776d4c
update result.ref
mohanchen 3c03ee6
update pchg output
mohanchen 115831a
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen 0e7c32d
delete a test in 01_PW
mohanchen d410b7f
add ctrl_output_fp files
mohanchen ec4d90c
update tests in 01_PW
mohanchen 4b0af7b
comment out a test in 11_PW_GPU
mohanchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
#include "module_io/ctrl_output_fp.h" // use ctrl_output_fp() | ||
|
||
namespace ModuleIO | ||
{ | ||
|
||
template <typename TK, typename TR> | ||
void ctrl_output_fp(UnitCell& ucell, | ||
elecstate::ElecStateLCAO<TK>* pelec, | ||
const int istep) | ||
{ | ||
ModuleBase::TITLE("ModuleIO", "ctrl_output_fp"); | ||
ModuleBase::timer::tick("ModuleIO", "ctrl_output_fp"); | ||
|
||
const bool out_app_flag = PARAM.inp.out_app_flag; | ||
const bool gamma_only = PARAM.globalv.gamma_only_local; | ||
const int nspin = PARAM.inp.nspin; | ||
const std::string global_out_dir = PARAM.globalv.global_out_dir; | ||
|
||
// 1) write charge density | ||
if (PARAM.inp.out_chg[0] > 0) | ||
{ | ||
for (int is = 0; is < PARAM.inp.nspin; is++) | ||
{ | ||
this->pw_rhod->real2recip(this->chr.rho_save[is], this->chr.rhog_save[is]); | ||
std::string fn =PARAM.globalv.global_out_dir + "/chgs" + std::to_string(is + 1) + ".cube"; | ||
ModuleIO::write_vdata_palgrid(Pgrid, | ||
this->chr.rho_save[is], | ||
is, | ||
PARAM.inp.nspin, | ||
istep, | ||
fn, | ||
this->pelec->eferm.get_efval(is), | ||
&(ucell), | ||
PARAM.inp.out_chg[1], | ||
1); | ||
|
||
if (XC_Functional::get_ked_flag()) | ||
{ | ||
fn =PARAM.globalv.global_out_dir + "/taus" + std::to_string(is + 1) + ".cube"; | ||
ModuleIO::write_vdata_palgrid(Pgrid, | ||
this->chr.kin_r_save[is], | ||
is, | ||
PARAM.inp.nspin, | ||
istep, | ||
fn, | ||
this->pelec->eferm.get_efval(is), | ||
&(ucell)); | ||
} | ||
} | ||
} | ||
|
||
|
||
// 2) write potential | ||
if (PARAM.inp.out_pot == 1 || PARAM.inp.out_pot == 3) | ||
{ | ||
for (int is = 0; is < PARAM.inp.nspin; is++) | ||
{ | ||
std::string fn =PARAM.globalv.global_out_dir + "/pots" + std::to_string(is + 1) + ".cube"; | ||
|
||
ModuleIO::write_vdata_palgrid(Pgrid, | ||
this->pelec->pot->get_effective_v(is), | ||
is, | ||
PARAM.inp.nspin, | ||
istep, | ||
fn, | ||
0.0, // efermi | ||
&(ucell), | ||
3, // precision | ||
0); // out_fermi | ||
} | ||
} | ||
else if (PARAM.inp.out_pot == 2) | ||
{ | ||
std::string fn =PARAM.globalv.global_out_dir + "/pot_es.cube"; | ||
ModuleIO::write_elecstat_pot( | ||
#ifdef __MPI | ||
this->pw_big->bz, | ||
this->pw_big->nbz, | ||
#endif | ||
fn, | ||
istep, | ||
this->pw_rhod, | ||
&this->chr, | ||
&(ucell), | ||
this->pelec->pot->get_fixed_v(), | ||
this->solvent); | ||
} | ||
|
||
|
||
// 3) write ELF | ||
if (PARAM.inp.out_elf[0] > 0) | ||
{ | ||
this->chr.cal_elf = true; | ||
Symmetry_rho srho; | ||
for (int is = 0; is < PARAM.inp.nspin; is++) | ||
{ | ||
srho.begin(is, this->chr, this->pw_rhod, ucell.symm); | ||
} | ||
|
||
std::string out_dir =PARAM.globalv.global_out_dir; | ||
ModuleIO::write_elf( | ||
#ifdef __MPI | ||
this->pw_big->bz, | ||
this->pw_big->nbz, | ||
#endif | ||
out_dir, | ||
istep, | ||
PARAM.inp.nspin, | ||
this->chr.rho, | ||
this->chr.kin_r, | ||
this->pw_rhod, | ||
this->Pgrid, | ||
&(ucell), | ||
PARAM.inp.out_elf[1]); | ||
} | ||
|
||
ModuleBase::timer::tick("ModuleIO", "ctrl_output_fp"); | ||
} | ||
|
||
} // End ModuleIO | ||
|
||
|
||
// For gamma only | ||
template void ModuleIO::ctrl_output_lcao<double, double>(UnitCell& ucell, | ||
const int istep); | ||
|
||
// For multiple k-points | ||
template void ModuleIO::ctrl_output_lcao<std::complex<double>, double>(UnitCell& ucell, | ||
const int istep); | ||
|
||
template void ModuleIO::ctrl_output_lcao<std::complex<double>, std::complex<double>>(UnitCell& ucell, | ||
const int istep); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef CTRL_OUTPUT_FP_H | ||
#define CTRL_OUTPUT_FP_H | ||
|
||
namespace ModuleIO | ||
{ | ||
template <typename TK, typename TR> | ||
void ctrl_output_fp(UnitCell& ucell, | ||
elecstate::ElecStateLCAO<TK>* pelec, | ||
const int istep); | ||
} | ||
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
etotref -197.1405644417787 | ||
etotref -197.1405644417785 | ||
etotperatomref -98.5702822209 | ||
BAND1_SPIN1_CHG.cube 2 | ||
BAND2_SPIN1_CHG.cube 2 | ||
BAND3_SPIN1_CHG.cube 2 | ||
BAND4_SPIN1_CHG.cube 2 | ||
pchgs1i1.cube 2 | ||
pchgs1i2.cube 2 | ||
pchgs1i3.cube 2 | ||
pchgs1i4.cube 2 | ||
pointgroupref T_d | ||
spacegroupref O_h | ||
nksibzref 1 | ||
totaltimeref 0.35 | ||
totaltimeref 0.36 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
etotref -211.8032873347874 | ||
etotref -211.8032873347996 | ||
etotperatomref -105.9016436674 | ||
BAND1_SPIN1_CHG.cube 2 | ||
BAND2_SPIN1_CHG.cube 2 | ||
BAND3_SPIN1_CHG.cube 2 | ||
BAND4_SPIN1_CHG.cube 2 | ||
pchgs1i1.cube 2 | ||
pchgs1i2.cube 2 | ||
pchgs1i3.cube 2 | ||
pchgs1i4.cube 2 | ||
pointgroupref T_d | ||
spacegroupref O_h | ||
nksibzref 3 | ||
totaltimeref 1.35 | ||
totaltimeref 0.46 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
etotref -211.8032873348292 | ||
etotref -211.8032873347996 | ||
etotperatomref -105.9016436674 | ||
BAND1_K1_SPIN1_CHG.cube 2 | ||
BAND1_K2_SPIN1_CHG.cube 2 | ||
BAND1_K3_SPIN1_CHG.cube 2 | ||
BAND2_K1_SPIN1_CHG.cube 2 | ||
BAND2_K2_SPIN1_CHG.cube 2 | ||
BAND2_K3_SPIN1_CHG.cube 2 | ||
BAND3_K1_SPIN1_CHG.cube 2 | ||
BAND3_K2_SPIN1_CHG.cube 2 | ||
BAND3_K3_SPIN1_CHG.cube 2 | ||
BAND4_K1_SPIN1_CHG.cube 2 | ||
BAND4_K2_SPIN1_CHG.cube 2 | ||
BAND4_K3_SPIN1_CHG.cube 2 | ||
pchgs1k1i1.cube 2 | ||
pchgs1k1i2.cube 2 | ||
pchgs1k1i3.cube 2 | ||
pchgs1k1i4.cube 2 | ||
pchgs1k2i1.cube 2 | ||
pchgs1k2i2.cube 2 | ||
pchgs1k2i3.cube 2 | ||
pchgs1k2i4.cube 2 | ||
pchgs1k3i1.cube 2 | ||
pchgs1k3i2.cube 2 | ||
pchgs1k3i3.cube 2 | ||
pchgs1k3i4.cube 2 | ||
pointgroupref T_d | ||
spacegroupref O_h | ||
nksibzref 3 | ||
totaltimeref 1.23 | ||
totaltimeref 0.48 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.