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

fix : calculate dos_smearing without reading DOS first #796

Merged
merged 2 commits into from Mar 18, 2022

Conversation

wenfei-li
Copy link
Collaborator

@wenfei-li wenfei-li commented Mar 17, 2022

The reason behind this bug is that in calculating DOS_smearing, the program first takes the calculated DOS as input:

			 for(int i=0;i<number;i++)
			 {
				 in >> energy[i] >> dos[i];
			 }
			 if(!in.eof())
			 {
				 //std::cout<<"\n Read Over!"<<std::endl;
			 }
			 in.close();

This might have something to do with the input buffer. Also, it is bad practice to use the output file of the program as input file.
The way to fix this is to save the array that stores DOS and use that in calculating DOS_smearing, instead of reading from DOS.

@wenfei-li wenfei-li linked an issue Mar 17, 2022 that may be closed by this pull request
source/src_io/dos.cpp Outdated Show resolved Hide resolved
@caic99
Copy link
Member

caic99 commented Mar 18, 2022

Hi @wenfei-li ,
Thank you for your work!
You can attach the detail of bug in PR description (exactly the thing you replied in #746 ), and summarize this bug in PR subject.

@wenfei-li
Copy link
Collaborator Author

Hi @wenfei-li , Thank you for your work! You can attach the detail of bug in PR description (exactly the thing you replied in #746 ), and summarize this bug in PR subject.

not sure how to do that :P

@wenfei-li wenfei-li changed the title debug : fix bug in dos output fix : calculate dos_smearing without reading DOS first Mar 18, 2022
@caic99 caic99 merged commit 0edf803 into deepmodeling:develop Mar 18, 2022
@wenfei-li wenfei-li deleted the fix_dos branch March 18, 2022 07:40
@dyzheng dyzheng added this to To DO: test and solve the Issues in ABACUS_v2.2.0 Mar 22, 2022
@dyzheng dyzheng moved this from To DO: test and solve the Issues to Done in ABACUS_v2.2.0 Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Bug for 107_PW_OD_outputdos
2 participants