boolean problem=false;
String message="";
jcpPanel.get2DHub().getRGroupHandler().cleanUpRGroup(jcpPanel.get2DHub().getChemModel().getMoleculeSet());
if(!rGroupQuery.areRootAtomsDefined()) {
message = GT.get("The R-group Query is not valid: there are substitutes that have no corresponding atom in the root structure.");
problem=true;
}
if(!rGroupQuery.areSubstituentsDefined()) {
message = GT.get("The R-group Query is not valid: the root structure has R# definitions for which no substitutes are defined.");