phetsims / build-a-molecule

"Build a Molecule" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

ball and stick representation is missing some sticks #150

Closed arouinfar closed 4 years ago

arouinfar commented 4 years ago

@Denz1994 looks like there is a missing bond between the oxygen and hydrogen in this structure. Can you investigate?

Screen Shot 2020-01-28 at 10 49 11 AM

I'm fairly certain this structure would be an ion, but I don't think that should affect the O-H bond. I'll dig around a bit more and see if I can find any other examples of this.

arouinfar commented 4 years ago

I'm fairly certain this structure would be an ion, but I don't think that should affect the O-H bond

Actually, this may be the crux of the problem. I don't think we should be naming ions. It has a 3D button because it's a named thing, but perhaps it shouldn't be named at all.

arouinfar commented 4 years ago

Hydroxymethanone doesn't have any direct hits on pubchem, but searching through various CHO2 structures, I think the closest match is hydroxycarbonyl which is a radical. Radicals have an unpaired electron, but no net charge.

arouinfar commented 4 years ago

Here's another problematic case, which appears to be a formyl radical. image

arouinfar commented 4 years ago

For comparison, here are the Java structures.

Screen Shot 2020-01-28 at 11 26 37 AM Screen Shot 2020-01-28 at 11 27 12 AM
Denz1994 commented 4 years ago

After talking this over with @arouinfar, it looks like this requires a larger discussion. Currently, we are displaying both ions and radicals. This behavior matches what is done in Java, but we should decide if we should either not show ions/radicals. Or do nothing, with the understanding that no bond assumes either a ion or radical (perhaps noting in teacher tips)

If we choose to not show ions/radicals, the question becomes: How do we identify this from the PubChem data set? Could we use total charge or general formula? I would not advocating for this option, because it may require pulling new data from PubChem. Also, we don't have a way to determine the total charge at the moment.

Labeling for design meeting for input.

arouinfar commented 4 years ago

I think the problem here is solely the radicals. There appear to be several in otherMoleculeData.js which was pulled from PubChem in 2013. Examples include:

I'm not sure why the names in the sim all vary from what's on PubChem, but perhaps it's because we pulled the data from PubChem so long ago.

Looking at the PubChem entries for any of these radicals, you'll see that the 3D structure isn't rendered. (The same is not true for ions such as nitrate. However, if you build NO3 in the sim, it will not be given a name/3D dialog.) image

My best guess is that the ball and stick representation is not appropriate for radicals, which is what leads to the missing sticks in the screenshots earlier in this issue.

It would be great if we could somehow remove radicals from otherMoleculeData.js so they are not named (and therefore given a 3D dialog), but I wouldn't even begin to know how to find them in the 9000+ compounds in the database.

Since the current behavior matches Java and there haven't been any user complaints about this particular issue, I'm inclined to leave things the way they are and document this in the teacher tips.

@BLFiedler can you review this issue and let me know what you think?

brettfiedler commented 4 years ago

I think leaving the current behavior and making a note in the teacher tips is probably the best course of action.

Is there any way to isolate the radicals in Pubchem based on the fact that they don't tend to have 3D structures? Not sure what other criteria we can work with, But yeah, ball and stick without some sort of accompanying notation (lewis dot structure) is not really a useful view for radicals. I would suspect they are outside of the learning goals of this sim as well?

Can you clarify the behavior for ions? Do they display 3D structures or no or sometimes?

arouinfar commented 4 years ago

I think leaving the current behavior and making a note in the teacher tips is probably the best course of action.

Thanks @BLFiedler! I'll add this to the Teacher Tips issue #152, and we can close this one.

Is there any way to isolate the radicals in Pubchem based on the fact that they don't tend to have 3D structures?

We think it might be possible to remove the radicals if we pull all the data from PubChem again, but it's a bit complicated. In last week's design meeting, we decided that this could be a project for a visiting/intern developer, but it's not something we plan to do before the 1.0 release.

Can you clarify the behavior for ions? Do they display 3D structures or no or sometimes?

I tried building several common ions in the sim (such has hydroxide or nitrate), and they were never named so they never got the 3D dialog. When we pulled the data from PubChem, I believe we excluded ions which I think was the right call.