when calculating atmoic weights from a molecule which contains chloridehydrochloride salts, it results in heap space problem. codes as follow:
IChemObjectBuilder bldr = SilentChemObjectBuilder.getInstance();
SmilesParser smipar = new SmilesParser(bldr);
IAtomContainer mol = smipar.parseSmiles("Cl.O=S(=O)(C1=CC=C(NN)C(=C1)C)C");
double[] cdkWeights = new double[0];
try {
cdkWeights = HuLuIndexTool.getAtomWeights(mol);
} catch (Exception e) {
System.out.println(e);
}
errors :
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.openscience.cdk.graph.invariant.HuLuIndexTool.getAtomWeights(HuLuIndexTool.java:135)
it mostly likes entering in an endless loop resulting in memory overflow.