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

Incorrect Calculation of the 4th Angle in sp3 Hybridization #4

Open
TharunKumarrA opened this issue Dec 24, 2024 · 5 comments
Open

Comments

@TharunKumarrA
Copy link
Owner

Issue: Fix Miscalculation of the Fourth Angle in sp3 Hybridization

Description

The current implementation for sp3 (tetrahedral) hybridization miscalculates the fourth bond angle. The resulting geometry does not align with the standard tetrahedral geometry, where all bond angles should be approximately 109.5°.

Impact

  • The visual representation of sp3 hybridized molecules is incorrect.
  • It affects the accuracy of molecular geometries such as CH₄ (methane).
  • This inconsistency impacts downstream calculations and visualizations.

Acceptance Criteria

  • The fourth bond angle is corrected to align with tetrahedral geometry.
  • All bond angles in the sp3 configuration are approximately 109.5°.
  • The corrected geometry is validated against standard molecular geometries.

Suggested Approach

  1. Investigate the logic in the getCoordinates() function in Molecule.js.
  2. Update the calculation method for the fourth bond direction to ensure tetrahedral geometry is achieved.
  3. Use trigonometric and vector models to calculate the correct bond angles and directions for sp3 hybridization.

File Locations for Fix

File: /src/components/Molecule.js

  • Update Functionality:
    • Modify the getCoordinates() function to fix the calculation for the fourth bond angle in sp3 hybridization.

Code Changes

In Molecule.js

Identify the logic for sp3 hybridization in getCoordinates():

if (currentAtom.hybridisation === "sp3") {
  // Fix the fourth bond angle calculation
  // Normalize the vectors to maintain consistent bond length
  // Calculate the coordinates for each bond
  // Store or utilize bondCoordinates
}
@hirux06
Copy link

hirux06 commented Dec 26, 2024

Heyy!! I would like to take up the issue. Please assign it to me @TharunKumarrA

@TharunKumarrA
Copy link
Owner Author

Yes. Assigned @hirux06

@TharunKumarrA
Copy link
Owner Author

Yeah sorry for the delayed reply. I'm kinda not well, so I'll discuss it tomorrow if it works

@hirux06
Copy link

hirux06 commented Jan 12, 2025

Hey @TharunKumarrA !! I’m sorry, but I’m unable to work on the assigned issue due to time constraints and challenges in getting the expected output. I kindly request you to unassign me so that it can be reassigned to someone else. Sorry for taking so much time.
Thanks

@TharunKumarrA
Copy link
Owner Author

Okay sure saran. Thanks for trying it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants