Comments (4)
Original comment by Daniel Lowe (Bitbucket: dan2097, GitHub: dan2097).
The common name is in my opinion formally ambiguous. Unfortunately OPSIN does not currently detect ambiguity in chemical names and instead tends to stop looking for possibilities as soon as it has found a sensible outcome.
The heuristic that is employed is to start from the rightmost group in the bracket and work right to left checking whether the group has the desired locant.
I have changed this heuristic to first check the adjacent group when the following criteria are satisfied:
- The locant is of the form \d+[a-z]?'* i.e. numeric
- Neither a hyphen or locant are present e.g. 1-pentyl-3-(2-methyl-phenylacetyl)indole or 1-pentyl-3-(2-methyl2phenylacetyl)indole or 1-pentyl-3-(2-methyl-2-phenylacetyl)indole will retain OPSIN's original interpretation.
In my regression sets, especially a set of polymer names, this change makes a uniformly positive improvement, albeit it only effects names that are formally ambiguous.
Thanks for the bug report. The fixed version is up on the web service. Let me know if it doesn't perform as expected.
Daniel
P.S. OPSIN only actually generates one parse for this name as at there is no ambiguity in tokenizing this name/assigning meaning to the tokens.
from opsin.
Original comment by Daniel Lowe (Bitbucket: dan2097, GitHub: dan2097).
1-pentyl-3-(1-methylphenylacetyl)indole is probably interpreted incorrectly (as in it produces a structure rather than a valency error). OPSIN currently doesn't treat phenyl as being explicitly phen-1-yl, and it really should do.
from opsin.
Original comment by Anonymous.
Outstanding! Fastest Debug Ever.
Thanks for the explanation as well, Daniel. I had just read your paper and had alternative parses on my mind, but in future I'll stick to reporting the symptoms and leave the diagnosis to you.
The problem is solved, but just fyi, here are a few more curious/degenerate cases:
- 1-pentyl-3-(methylphenylacetyl)indole = 1-pentyl-3-(2-methyl-2-phenylacetyl)indole
- 1-pentyl-3-(1-methylphenylacetyl)indole = 1-pentyl-3-(2-methylphenylacetyl)indole
- 1-pentyl-3-(3-methyl-2-phenylacetyl)indole = 1-pentyl-3-(3-methylphenylacetyl)indole
All the best, and props to the OPSIN team for this extraordinarily useful service.
/Steve
from opsin.
Original comment by Daniel Lowe (Bitbucket: dan2097, GitHub: dan2097).
Yeah alternative parses are an important part of OPSIN but as you can see from the pie chart in that paper multiple parses are fortunately moderately rare. Ideally multiple parses should only happen if there are multiple ways of interpreting something that are either non trivial or impossible to disambiguate between e.g. 2-methylthiophenyl which could be 2-(methylthio)phenyl or 2-methyl-thiophen-yl.
- 1-pentyl-3-(methylphenylacetyl)indole acting as 1-pentyl-3-(2-methyl-2-phenylacetyl)indole I think is working as intended (although the name is clearly ambiguous)
- 1-pentyl-3-(1-methylphenylacetyl)indole was being incorrectly interpreted as 1-pentyl-3-(1-methylphen-2-ylacetyl)indole which clearly makes no sense as the position of the radical on phenyl is always at locant 1. Its current interpretation isn't too much better but at least now is clearly a case of garbage in, garbage out.
- Interpreting 1-pentyl-3-(3-methyl-2-phenylacetyl)indole in that way is the only way to generate a structure so I think it is working as intended.
The change which which stops phenyl being broken down into phen and yl is now live.
Thanks for the feedback
from opsin.
Related Issues (20)
- New version of Opsin (2.8.0) is not creating Mol files for Chemical formulae and abbreviated names
- New version of Opsin is not supporting for some sugars and sugar based compounds.
- New version of Opsin is not supporting for some drug names
- Mol file created by new Opsin version (2.8.0) - giving structure with incorrect configuration
- New version of Opsin (2.8.0) is not creating correct Mol file / giving error for the compounds with isotopes HOT 1
- New version of Opsin (2.8.0) is not providing Mol file / sometimes giving incorrect Mol file / giving error for the dicarboximido based compounds
- New version of Opsin (2.8.0) is not supporting for some glyceric acid derivatives
- For some compound names, new version of Opsin is giving response - Syntax error
- S-3-bromophenyl-2-chloro-2-oxoethanethioate ChemDraw autocorrects to S-(3-bromophenyl) 2-chloro-2-oxoethanethioate
- Inquiry about OPSIN's Validation of IUPAC Names HOT 4
- O-methyl phenylphosphonothioic chloride - expected methyl ester, got trivalent chlorine HOT 4
- Unable to figure out the IUPAC name using OPSIN HOT 4
- OPSIN generates incorrect structure for cycloprop-2-en-1-ylidenethenylidene HOT 1
- Unable to get the structure of trispiro[2.0.2.0.2.0]nonane HOT 1
- Unable to get the structure of pentaspiro[2.0.24.0.27.0.210.0.213.03]pentadecane HOT 2
- 7-aza-2,3-indolyne HOT 1
- spiro[2.4]heptane-5,7-dione vs spiro[2.4]heptane-4,6-dione HOT 3
- Unable to get the structure of Bicyclo[4.1.0]heptane, 7-bicyclo[4.1.0]hept-7-ylidene HOT 1
- 6-chloro-7-deazapurine
- Error parse example HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opsin.