fix: [Phase 3] Implement Delocalization Index (DI)#7
Open
newtontech wants to merge 1 commit intomainfrom
Open
Conversation
- Add delocalization.py module with 2-center and 3-center DI calculations - Implement aromaticity indices (AI, PDI, FLU) from DI matrices - Add bond classification based on DI values - Create comprehensive test suite with 35 passing tests - Update bonding __init__.py to export new DI classes and functions Fixes #4
|
🤖 Hi @newtontech, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @newtontech, but I was unable to process your request. Please see the logs for more details. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR implements the Delocalization Index (DI) for analyzing electron pair sharing and aromaticity in molecular systems. The implementation includes 2-center and 3-center DI calculations, aromaticity indices (AI, PDI, FLU), and bond classification based on DI values.
Changes
pymultiwfn/bonding/delocalization.py: New module implementing:
delocalization_index(): 2-center DI calculationthree_center_delocalization_index(): 3-center DI for multi-center bondscalculate_di_matrix(): Full DI matrix generationclassify_bond_from_di(): Bond type classificationcalculate_aromaticity_index(): Ring aromaticity measurecalculate_pdi(): Para-Delocalization Index for 6-membered ringscalculate_flu(): Aromatic Fluctuation IndexDelocalizationIndexclass: Main analysis interfacepymultiwfn/bonding/init.py: Updated to export new DI classes and functions
tests/bonding/test_delocalization_index.py: Comprehensive test suite with 35 passing tests covering:
Testing
All 35 tests pass:
API Example
Fixes #4