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

Error when processing some non-most abundant isotopes #7

Closed
dkatzel-ncats opened this issue May 18, 2021 · 3 comments
Closed

Error when processing some non-most abundant isotopes #7

dkatzel-ncats opened this issue May 18, 2021 · 3 comments

Comments

@dkatzel-ncats
Copy link
Contributor

"org.openscience.cdk.config.IsotopeFactory ERROR: Could not find major isotope for: 43"

@dkatzel-ncats
Copy link
Contributor Author

The issue is in CDK the IsotopeFactory returns null if there isn't a "major" isotope by abundance. So it returns null.

@tylerperyea
Copy link
Contributor


   JSDraw205182109392D

  5  0  0  0  0  0              0 V2000
   14.1960   -4.6280    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   18.0960   -4.6800    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   22.7240   -4.9920    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   14.7160   -8.6320    0.0000 Tc  0  0  0  0  0  0  0  0  0  0  0  0
   19.6040   -8.6320    0.0000 Tc  0  0  0  0  0  0  0  0  0  0  0  0
M  ISO  1   1  12
M  ISO  1   2  14
M  ISO  1   5  99
M  END

The above molfile should render more-or-less like this:

image

Instead, it throws an NPE. If it was forced to work by deleting Tc99 it would also not render the 12 on Carbon. The logic seems to be excluding isotopes that are explicitly the most prevalent isotopes from showing.

@dkatzel-ncats
Copy link
Contributor Author

cdk_isotope
This has been fixed. using the molwitch renderer with CDK now renders like this no errors

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