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

Consider supporting reading of aromatic [se] and [te] #4

Open
baoilleach opened this issue Sep 12, 2017 · 3 comments
Open

Consider supporting reading of aromatic [se] and [te] #4

baoilleach opened this issue Sep 12, 2017 · 3 comments

Comments

@baoilleach
Copy link

Many toolkits generate aromatic SMILES for Se and Te, by analogy with O and S. I'm not asking that you support these on writing (this is a matter for one's own conscience), but it would be nice if the toolkit read these without any loss of information.

For example, [te]1cccc1 is currently read as [Te]1CCCC1, whereas the intended meaning is [Te]1C=CC=C1.

@IanAWatson
Copy link
Owner

This is probably a good idea, and would not be hard to do. I may make it an optional setting, because some may disagree. I am hoping to have an update to the software by year end, and I will include this.
Sorry for the loss reading it, that will get fixed....

@baoilleach
Copy link
Author

I forgot to say that aromatic Se is supported by Daylight (though added relatively recently).

@IanAWatson
Copy link
Owner

I just put out a patch that addresses this. If you look in element.cc you will see that Se and Te how have outer shell electrons information, as well as aromatic atomic symbols.

To use this, if you use skeleton.cc to build a programme, you can use

-E O:Se -E O:Te

or if you are doing this from C++, fetch the elements,

Element * Se = const_cast<Element *>(get_element_from_atomic_number(34));
Se->set_organic(1);

should do that. I then tested it and it was able to read

o1cccc1
[se]1cccc1
[te]1cccc1

Please give it a try and let me know if this works. The bug you found is still there, and I will fix it, but it is hidden with this change.

Let me know if problems.

Thanks

Ian

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

No branches or pull requests

2 participants