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

Updated the algo for SP3D2 #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

priyansh-narang2308
Copy link

Resolve #3
image
Edited the angle part for the sp3d2 hybridisation
Even Created a case for the molecule SF6(sp3d2 hybridised)
image
image
Included the radio button for sp3d2 and added sf6 to sample molucules
image
Added S and F to the Atom counters useState to be shown in the dropdown
image
image
image
This for the second atom for the bond to be made
Now in the molecule.js
Created a function calcSp3d2bondDirection which aclculates the unit vector representing the bond direction for a new ligand in an sp3d2 system.and also returns a default unit vector ([1,0,0]) if no good direction found.
Used normalizeVector which convert calculated directions into unit vectors.
Used validatePlanarArrangement checks if a set of bonds forms a planar arrangement(all bonds with same plaen).
and used getPlaneNormal which calculates the normal vector to the plane formed by the first two bonds .
OUTPUT SCREEN
image
Showing for the double bond.
Pls review.🫡🫡

Copy link

vercel bot commented Jan 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
molecule-visualiser ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 1, 2025 6:02am

@TharunKumarrA
Copy link
Owner

@priyansh-narang2308 thank you for the detailed pr that you have made.
But the output for SF6 shd be something like this right?
image
Can you please clarify what exactly is the output that you got?
In the mean time I will also try it locally

@TharunKumarrA
Copy link
Owner

When I checked locally all the atoms are in the spawn point and the bonds are not formed (edges are not being created) ... did you change any logic of creating the bonds @priyansh-narang2308 ?

@priyansh-narang2308
Copy link
Author

Yeahh in my system earlier it was working but as soon as i created the helper functions idk what happened the bonds were not created and it was showing an error
I rectified the whole code but was unable to find the error. So this was the issue. I guess the issue lied within the helper fucntions bcoz of what the logic of bonds got breakk.
And the same happened with SF6 the edges were not being created.
And if this doesn't work can this issue be assigned to someone else as i have exams coming up and will not be able to complete within the deadline. And the main issue was during the helper function it self. I mixed up the helper function with the logic of creating bondss.
Sorry for the inconvenience. @TharunKumarrA

@TharunKumarrA
Copy link
Owner

can you look into it or you need help with fixing this?

@TharunKumarrA
Copy link
Owner

Okay I will see what the issue is and since you have exams coming up ill create another issue to fix it if I can't @priyansh-narang2308

@priyansh-narang2308
Copy link
Author

Hey @TharunKumarrA As i was unable to do it.
Can u plss unassign me this issue as I cant do itt
Sorry for the delay..

@TharunKumarrA
Copy link
Owner

Yeah no issue @priyansh-narang2308 ... you can work on some other issue
Thank you trying

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.

Implement Algorithm for Calculating Angles in sp3d2 Hybridization
2 participants