File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
storage/inchi/src/main/java/org/openscience/cdk/inchi Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ public class InChIToStructure {
9999 // magic number - indicates isotope mass is relative
100100 private static final int ISOTOPIC_SHIFT_FLAG = 10000 ;
101101
102+ private static final int ISOTOPIC_SHIFT_RANGE = ISOTOPIC_SHIFT_FLAG - 100 ;
103+
102104 /**
103105 * Constructor. Generates CDK AtomContainer from InChI.
104106 * @param inchi
@@ -181,7 +183,7 @@ protected void generateAtomContainerFromInchi(IChemObjectBuilder builder) throws
181183 int isotopicMass = iAt .getIsotopicMass ();
182184
183185 if (isotopicMass != 0 ) {
184- if (0 != ( isotopicMass & ISOTOPIC_SHIFT_FLAG ) ) {
186+ if (isotopicMass > ISOTOPIC_SHIFT_RANGE ) {
185187 try {
186188 int massNumber = Isotopes .getInstance ().getMajorIsotope (cAt .getAtomicNumber ()).getMassNumber ();
187189 cAt .setMassNumber (massNumber + (isotopicMass - ISOTOPIC_SHIFT_FLAG ));
You can’t perform that action at this time.
0 commit comments