John Mayfield

Results 241 comments of John Mayfield

This is where the QSAR should probably be completely separate, we can make it work.

I think more important first is getting the core sorted out, will discuss more on Thursday if I see you

Possibly and sounds interesting, is it similar to the MostAbundant functionality. In this case we just care about generating the most-abundant mol weight rather than actually generating all the isotopes:...

That sounds like a reasonable approach, and not difficult to make the required modifications. I still think the lazy generator would be useful, how much code is it?

We should at least provide the option to get the Isotopic MF out of the distribution. There is a mirror of this code for the formula. ```java IChemObjectBuilder bldr =...

NVM I forgot there is away to get the formula out: ```java IMolecularFormula mf = new MolecularFormula(); mf.addIsotope(new Atom("C"), 6); mf.addIsotope(new Atom("Br"), 6); IMolecularFormula mamf = MolecularFormulaManipulator.getMostAbundant(mf); assertThat(MolecularFormulaManipulator.getString(mamf, false, true),...

Scratching our in heads in the office I think you second probability is slightly off. In your second case 0.9493 + 0.0429 does not add to 1. If you take...

It's easier to work with: https://github.com/cdk/cdk/blob/main/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java#L1598C28-L1622. If we modified the algorithm as though there were only two isotopes you get your answer: ```java private static boolean addIsotopeDist(IMolecularFormula mf, IIsotope[] isotopes,...

> Yep, $S$ has 24 isotopes in CDK. The first 2 contribute to $0.9493 + 0.0429 = 0.9922$ (notice it's not $0.429$). Try using $0.0429$, because $1-0.9493$ is the probability...

Bond Type 8 is a query bond (any) and not for representing molecules. We could support this with the ChemAxon extensions but this is not a bug but rather out...