User 0261d34ad7
05-03-2012 09:45:02
Hi,
I'm trying to write a chemical term expression to identify all chemical compounds consisting of just one element type, where there are two atoms exactly. The goal is to identify "simple" compounds to filter out noise.
I've tried this: (atomCount() == 2) && (atno(0) == atno(1))
But I get an "array index out of range error" for single atom compounds.
Any advice on how I should proceed? I thought about using the elemental analysis function, but there's no clear description of what it returns. My guess is a textual description similar to the "ElementalAnalyzer" class, which wouldn't help me here. Also I thought about using "filter" but I'm not sure exactly how it could help.
Any advice appreciated.
Jim