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

added lobster calc quality summary method to analyze module #115

Merged
merged 3 commits into from
Sep 13, 2023

Conversation

naik-aakash
Copy link
Collaborator

#Changes

PR for issue #30

Added a convenience static method to ensure lobster calc reliablitly. Checks implemented are similar to our Publication

  • Check for minimal basis
  • Charge spilling
  • DOS comparisons summed and orbital wise Tanimoto
  • Charge comparison with BVA

The output is like this at the moment. If you have any other suggestions @JaGeo please let me know.
Example

@JaGeo
Copy link
Owner

JaGeo commented May 24, 2023

I would add a text output as well. Maybe similar to.our automatic-analysis. --json then creates a json

@naik-aakash
Copy link
Collaborator Author

I would add a text output as well. Maybe similar to.our automatic-analysis. --json then creates a json

Yes, I intend to add this. Just wanted if anything more you think we should add besides these keys.

@naik-aakash
Copy link
Collaborator Author

naik-aakash commented May 24, 2023

To do

  • Add summary method to analyze
  • Add text description
  • Add test
  • Add bandoverlaps criterion
  • update tests

@naik-aakash
Copy link
Collaborator Author

naik-aakash commented May 25, 2023

Hi @JaGeo , now the text descriptions are also generated and options to save the dict data as json is also added to cli. I have attached example outputs of text generated. DOS and BVA charge comparisons are optional as well. I will add bit more descriptive text concerning Charge comparisons. If you have any suggestions, please let me know :-)

Agree

Disagree

@naik-aakash
Copy link
Collaborator Author

naik-aakash commented May 25, 2023

This PR can also be reviewed. I will add more tests to increase coverage when working on tests speed up to avoid adding lot of files.

@naik-aakash naik-aakash linked an issue May 26, 2023 that may be closed by this pull request
@naik-aakash
Copy link
Collaborator Author

Updated text output

The LOBSTER calculation used minimal basis. The absolute and total charge spilling for the calculation are 0.3 and 5.58, respectively. The atomic charge signs from Mulliken population analysis agree with Bond valence analysis. The atomic charge signs from Loewdin population analysis agree with Bond valence analysis. The Tanimoto index from DOS comparisons in energy range between -15, 0 eV for s, p, summed orbitals are : 0.274, 0.5281, 0.2737.

@naik-aakash
Copy link
Collaborator Author

Hi @JaGeo , have updated the tests here to increase the coverage of cli as well. I feel this PR is ready for review now 😄

lobsterpy/cohp/describe.py Outdated Show resolved Hide resolved
lobsterpy/cohp/describe.py Outdated Show resolved Hide resolved
lobsterpy/cohp/describe.py Outdated Show resolved Hide resolved
lobsterpy/cohp/describe.py Outdated Show resolved Hide resolved
lobsterpy/cohp/analyze.py Outdated Show resolved Hide resolved
lobsterpy/cohp/analyze.py Outdated Show resolved Hide resolved

mull_oxi = []
for i in lobs_charge.Mulliken:
if i >= 0:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can work but always make sure it is numerically okay. As the charges are quite large, this probably works.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but could not figure out any other way to check this. If you have any suggestions let me know

@naik-aakash
Copy link
Collaborator Author

Let me know if anything more needs to be changed or modified. 😄

@JaGeo JaGeo self-assigned this Jun 1, 2023
@naik-aakash
Copy link
Collaborator Author

naik-aakash commented Jul 20, 2023

  • Add another bandoverlaps file check test

@naik-aakash
Copy link
Collaborator Author

New updated outputs for calc quality dict and text

example_output_new

lobsterpy/test/test_cli.py Outdated Show resolved Hide resolved
lobsterpy/cohp/describe.py Outdated Show resolved Hide resolved
@JaGeo
Copy link
Owner

JaGeo commented Aug 1, 2023

@naik-aakash What happens if we only have very few points for the computation of the Tanimoto fingerprint or VASP and Lobster computations are too different? I think we really need to test a few cases here before we merge.

lobsterpy/cli.py Outdated
}

for arg, default_value in dos_files.items():
file_path = getattr(args, arg)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to have some more descriptive names here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it descriptive. Also replaced the not used default_value variable in with _.

quality_dict["DOS_comparisons"] = {} # type: ignore

for orb in dos_lobster.get_spd_dos():
if e_range[0] >= min(dos_vasp.energies) and e_range[0] >= min(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your test cases cover all these ifs?

Copy link
Collaborator Author

@naik-aakash naik-aakash Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated tests and now if covers all this 😃 . Have also, update the workflow file and now we can also see missing line numbers

lobsterpy/cohp/describe.py Outdated Show resolved Hide resolved
@naik-aakash
Copy link
Collaborator Author

naik-aakash commented Aug 1, 2023

@naik-aakash What happens if we only have very few points for the computation of the Tanimoto fingerprint or VASP and Lobster computations are too different? I think we really need to test a few cases here before we merge.

I do have a warning printed out for cases when too less points are there in VASP and LOBSTER DOS computations <2000 stating the DOS comparisons will not be reliable and rerun computations with higher NEDOS

here is the warning
https://github.com/naik-aakash/LobsterPy/blob/f1cf2a6ee7e58a60596fd46131619f60faf178c4/lobsterpy/cohp/analyze.py#L1052

@naik-aakash naik-aakash self-assigned this Aug 17, 2023
@JaGeo
Copy link
Owner

JaGeo commented Sep 6, 2023

New updated outputs for calc quality dict and text

example_output_new

Thank you! Could you check the text again for missing articles, please? Also, "There exists" should better be "There are". Maybe copy the text into grammarly as your PI is also not the best person for English grammar.

@naik-aakash
Copy link
Collaborator Author

Hi @JaGeo , currently cli test will fail as the interface would need to be updated and the potcar-symbols arg needs to be added

I will do this tomorrow, but using your suggestion of potcar symbol lists works fine

@naik-aakash
Copy link
Collaborator Author

New updated outputs for calc quality dict and text

example_output_new

Thank you! Could you check the text again for missing articles, please? Also, "There exists" should better be "There are". Maybe copy the text into grammarly as your PI is also not the best person for English grammar.

I have also updated the texts to fix missing articles.

@JaGeo JaGeo merged commit 6f6bb9b into JaGeo:main Sep 13, 2023
21 checks passed
@naik-aakash naik-aakash deleted the lobster_calc_inspect branch June 20, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inspection for lobsterout
2 participants