Skip to content

Expose chemenv attributes and misc cli, featurizer enhancements#409

Merged
naik-aakash merged 19 commits intoJaGeo:mainfrom
naik-aakash:expose_chemenv_attributes
Jul 21, 2025
Merged

Expose chemenv attributes and misc cli, featurizer enhancements#409
naik-aakash merged 19 commits intoJaGeo:mainfrom
naik-aakash:expose_chemenv_attributes

Conversation

@naik-aakash
Copy link
Copy Markdown
Collaborator

@naik-aakash naik-aakash commented Jul 11, 2025

Changes

  1. Expose ICOHPList, charges and CompleteCohp objects as Analysis class properties
  2. Make possible to switch charges used for LobsterNeighbours to Loewdin, Mulliken or Valences
  3. Add option in cli to switch charges in analysis
  4. Enabling switching analysis type in FeaturizeLobsterpy to COOP / COBIs

@naik-aakash naik-aakash added the enhancement New feature or request label Jul 11, 2025
@naik-aakash naik-aakash marked this pull request as draft July 11, 2025 06:18
@naik-aakash naik-aakash changed the title Expose chemenv attributes Expose chemenv attributes and misc enhancements Jul 11, 2025
@naik-aakash naik-aakash marked this pull request as ready for review July 11, 2025 09:49
@kaueltzen
Copy link
Copy Markdown
Contributor

thanks!
maybe adding in the Analysis doc that "Valences" corresponds to pymatgen's BVAnalyzer output would be a good idea.

and maybe a small note in the Analysis docstring that it can be either instantiated with the file paths or with the pymatgen objects (and the latter if both are given) would add some clarity.
although with the charges it seems that if both are given, the ones from the file instead of the object are processed in LobsterNeighbors (so the other way around)?

@naik-aakash
Copy link
Copy Markdown
Collaborator Author

thanks! maybe adding in the Analysis doc that "Valences" corresponds to pymatgen's BVAnalyzer output would be a good idea.

and maybe a small note in the Analysis docstring that it can be either instantiated with the file paths or with the pymatgen objects (and the latter if both are given) would add some clarity. although with the charges it seems that if both are given, the ones from the file instead of the object are processed in LobsterNeighbors (so the other way around)?

Fixed the issue with charges and updated the doc-strings as suggested.

@naik-aakash naik-aakash enabled auto-merge July 11, 2025 13:15
@naik-aakash naik-aakash requested a review from kaueltzen July 11, 2025 13:15
@naik-aakash naik-aakash requested review from JaGeo and tomdemeyere July 11, 2025 13:19
@naik-aakash
Copy link
Copy Markdown
Collaborator Author

naik-aakash commented Jul 11, 2025

Hi @tomdemeyere , @JaGeo . I have added this small update to analysis class that also enables using loewdin charges besides exposing some nested attributes.

Would be great if this can be reviewed/merged.

Also as side note @kaueltzen does not seem to have write access to this repository, would be great if this can be added too.

@naik-aakash naik-aakash marked this pull request as draft July 13, 2025 07:11
auto-merge was automatically disabled July 13, 2025 07:11

Pull request was converted to draft

@naik-aakash naik-aakash changed the title Expose chemenv attributes and misc enhancements Expose chemenv attributes and misc cli, featurizer enhancements Jul 13, 2025
@naik-aakash naik-aakash self-assigned this Jul 13, 2025
@naik-aakash naik-aakash marked this pull request as ready for review July 15, 2025 06:20
@naik-aakash naik-aakash requested a review from tomdemeyere July 17, 2025 05:34
@naik-aakash naik-aakash enabled auto-merge July 21, 2025 08:35
@naik-aakash
Copy link
Copy Markdown
Collaborator Author

naik-aakash commented Jul 21, 2025

Hi @tomdemeyere , is there anything else you think needs to be addressed in this PR before it is merged?

A separate major refactor PR will be raise soon to incorporate your previous suggestions. Also feel free to add more stuff in todos in this #410 issue if you spot anything that could be improved.

@tomdemeyere
Copy link
Copy Markdown
Collaborator

A final word: I am not sure about FeaturizeLobsterpy as a class:

  • There is no state sharing and no inheritance.
  • Only one public method, the rest is static, essentially functions wearing a class costume.
  • Very simple behavior: input -> process -> output.

Conceptually, this code should be purely functional, no objects are needed. Maybe there are other plans/considerations that I am missing justifying the use of a class, in which case discard this comment :)

@naik-aakash
Copy link
Copy Markdown
Collaborator Author

A final word: I am not sure about FeaturizeLobsterpy as a class:

  • There is no state sharing and no inheritance.
  • Only one public method, the rest is static, essentially functions wearing a class costume.
  • Very simple behavior: input -> process -> output.

Conceptually, this code should be purely functional, no objects are needed. Maybe there are other plans/considerations that I am missing justifying the use of a class, in which case discard this comment :)

Thanks, @tomdemeyere, for pointing this out. I have noted it. I will also think about it during refactoring. For now, I will keep it as it is. If nothing else needs to be addressed concerning the changes, can it be merged?

@naik-aakash naik-aakash merged commit 0eb2fc3 into JaGeo:main Jul 21, 2025
22 checks passed
@naik-aakash naik-aakash deleted the expose_chemenv_attributes branch January 31, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants