Atom labels behaviour clarification

Just a quick question: is it deliberate that custom labels added with the Atom Label Tool are shown simultaneously with other atom label types?

For example, if I turn on the Labels Display Type, by default the Atom Label is set to “Element”, so they’re displayed on each atom. If I then add a custom label to a carbon atom like “abc”, the atom is then labelled as “abc / C”. The custom label is also shown combined with all the other automatic label types, or on its own if Atom Label is set to “Custom”, and if it is set to “None” then no labels are shown at all.

This means that once atoms have been given custom labels there is no way to show e.g. only elements without the custom labels.

I assume this is the intended behaviour?

As an idea, the extra flexibility could be provided fairly simply by adding a separate checkbox to toggle Custom Atom Labels on and off, alongside the current drop-downs for Atom, Bond, and Residue labels. “Custom” would then be removed from the Atom Label drop-down and Atom Label being set to “None” wouldn’t affect whether the custom labels are shown.

Not an urgent thing really, but if this latter idea is liked I could create an issue for it.

1 Like

I think it merits further discussion. It’s probably better to have “Custom Labels” as a checkbox. (At some point it would be nice to label bonds, etc. with custom labels too.)

I did notice that the Bond Labels drop-down already includes a “Custom” option - is that non-functional or is it just that it only works if there’s labels in the CJSON file itself already?

At the moment, yes. (For example returning data on a bond from a plugin. Stereochemistry, XTB bond orders, etc.)

Actually, you can also edit / set custom labels in the Bond Properties window now too:

1 Like

Slightly unrelated to the matter of this post, but is there a reason that the Labels Display Type is now on by default in all documents? In general, I find that I almost never have it on, unless I’m trying to specify constraints in an ORCA input file.

I’m not seeing that. If you disable and quit and re-launch, it’s enabled again?

Oh interesting. It seems that if the labels are turned on, then I quit and relaunch, the labels are still on, and even if I turn them off, opening a new document turns them back on. However, if I turn off labels and then restart, they don’t get turned on automatically. Maybe that’s intended, but that feels like it isn’t from a user experience point of view.

Also, clicking on the display types in the latest nightly doesn’t crash anymore, thanks for the quick fix.

That’s a little odd. I’ll have to take a look at how / when the settings are being saved for display type options.

1 Like