I was looking at a bug report where reading an SD file containing pseudoatoms (such as Gln, Ile etc) worked fine, but writing it out crashed with an exception.
The reason for this is that during reading the atom with label Gln, is read in as a PseudoAtom with label "Gln" but symbol "R".
The MDLV2000Writer sees the symbol R for this atom and assumes that it is an R group and then tries to parse the label to get an R-group number. Obviously for this case it fails.
The problem is that all PseudoAtom objects get a symbol of R. While generally OK, this is not always correct for sdf/mol files. There are two possible solutions:
This patch implements 2