3D Molecule Viewer

See inside

Thank you very much to @ivypool2 for curating this.

My first attempt at viewing molecular compounds. The .mol files I used are exported from molview.org. These contain the x,y,z coordinates of the atoms/bonds, atom type, and bond type.

Click and drag the mouse to rotate.

Adding the fancy gtoal shading. Need to see if I can make it work with out changing the color of the atom though.

Notes and Credits

Future enhancements:
- Add the ability to search the information I'm storing instead of having to use the previous/next buttons - also implement a better storage
- Add a visual representation of the electron shells in the Bohr model (doubt I could do the 3d shapes)

01-02-17 - My daughter noticed some of my color codes were wrong. We have corrected that so some of the elements may be a different color than before.
01-01-17 - Added Auto-Rotate until mouse is clicked - @gtoal
- Added my puny 9 point font engine
- Added the ability to select an Element Symbol which shows the name and highlights the element in the compound. Not exactly what @chopper100 suggested but it's close (maybe)
11-17-16 - Added Diphenylcyanoarsine to get a triple bond which
shows up as green.
11-14-16 - Tweaking the atom shading algorithm with help from @gtoal and added red lines to signify a double bond with help from @dimitrip (thank you for the input)

11-9-16 - Added a simple highlight for 3D effect
- Working on molecular formula (Hill format)

The atom colors are based upon a jmol standard that I found at https://en.wikipedia.org/wiki/CPK_coloring:
Hydrogen = white
Carbon = grey
Nitrogen = blue
Oxygen = red
Chlorine = green
Sulfur = yellow

Still to do:
Show double bonds
Add shading to the atoms?
Allow zooming and maybe moving "around" the compound.
Show a color key for a particular compound.
Correct the compound naming system
Clean up the code from the polyhedron project

3d projections based on the Raucket system.

Shared: 8 Nov 2016 Modified: 25 May 2018
Favorite this project 110
Love this project 146
Total views 1184
View the remix tree  8
More projects by TheMoSmiths