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

Implement Algorithm for sp3d (Trigonal Bipyramidal) Bond Angles #2

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

Comments

@TharunKumarrA
Copy link
Owner

TharunKumarrA commented Dec 24, 2024

Description

Develop and implement an algorithm to calculate bond angles for sp3d (trigonal bipyramidal) hybridization. This is essential for the accurate representation of molecular geometries like PCl₅.

Acceptance Criteria

  • The algorithm calculates bond angles for sp3d hybridization correctly (90°, 120°).
  • Results align with standard trigonal bipyramidal geometry.
  • The implementation is efficient for real-time molecular visualization.

Suggested Approach

  1. Use mathematical models (e.g., vectors and rotation matrices) to derive bond angles for sp3d hybridization.
  2. Ensure compatibility with existing getCoordinates() logic in Molecule.js.
  3. Integrate the new functionality within the molecule construction logic to maintain modularity and scalability.

File Locations for Implementation

File: /src/components/Molecule.js

  • Update Functionality:
    • Modify the getCoordinates(molecule) function to handle sp3d hybridization bond angles.
    • Add a specific case for sp3d in the existing angles mapping object.
  • Additional Logic:
    • Create helper methods to calculate bond directions for sp3d hybridization based on trigonal bipyramidal geometry.

File: /src/components/GraphADT.js

  • Enhancements:
    • Add properties or methods in the Molecule class (if required) to store and retrieve calculated bond angles.

File: /src/components/EditMolecule.jsx

  • Frontend Integration:
    • Update UI logic if user interaction for sp3d molecules (e.g., dropdowns or selectors) is required. [Different Issue - so optional]

Code Changes

In Molecule.js

Update the bond angle logic:

const angles = {
  sp: { angleX: Math.PI, angleY: 0, angleZ: 0 },
  sp2: { angleX: -Math.PI / 6, angleY: Math.PI / 3, angleZ: 0 },
  sp3: { angleX: 0.615 * Math.PI, angleY: 0.955 * Math.PI, angleZ: 0.615 * Math.PI },
  sp3d: // Trigonal Bipyramidal
};

In getCoordinates() (Molecule.js)

Add specific logic for sp3d hybridization:

if (currentAtom.hybridisation === "sp3d") {
  if (isAxial(currentAtom)) {
    // Calculate coordinates for axial bonds
  } else {
    // Calculate coordinates for equatorial bonds
  }
}
@TharunKumarrA TharunKumarrA changed the title Implement Algorithm for Calculating Angles in sp3d Hybridization Implement Algorithm for sp3d (Trigonal Bipyramidal) Bond Angles Dec 24, 2024
@Anirudh2465
Copy link

I would like to do this please @TharunKumarrA . I feel that i would be able to solve this

@TharunKumarrA
Copy link
Owner Author

yes. Assigned to @Anirudh2465

@TharunKumarrA
Copy link
Owner Author

can you propose a possible algorithm for it after referring on how we already calculate it for sp, sp2 and sp3? We can discuss on this first before going into implementation. any queries just ping me

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

No branches or pull requests

2 participants