User a83cdfbe8a
		13-10-2010 08:18:06
	 
	
	
	I write a reactor  as the following image ,I use the method getAgent(),I can get the agent count .but i can not use getPreferredIUPACName() ,it has exception.How can I get "R2"?Thanks!
Exception information:
chemaxon.marvin.plugin.PluginException: chemaxon.marvin.io.MolExportException: Name generation failed: chemaxon.marvin.io.formats.name.nameexport.IUPACNamer$UnsupportedError: Naming is not supported on this structure: unknown pseudo-atom #134
java code:
int num=mol.getAgentCount();
  for(int jj=0;jj<num;jj++){
  plugin.setMolecule(mol.getAgent(jj));
  plugin.run();
   String preferredIUPACNames  = plugin.getPreferredIUPACName();
  }
 
	
	 
 
	
		ChemAxon e08c317633
		13-10-2010 09:09:34
	 
	
	
	The agent cannot be named, because it contains an unknown pseudo-atom (see the error message: "Naming is not supported on this structure: unknown pseudo-atom #134"). I suggest you to catch the PluginException in the for loop, and use SMARTS or some other format instead of name if the exception is thrown.
mol.getAgent(jj).toFormat("smarts"); 
Zsolt
	
	 
 
	
		User a83cdfbe8a
		14-10-2010 05:04:16
	 
	
	
	
Zsolt wrote: | 
 The agent cannot be named, because it contains an unknown pseudo-atom (see the error message: "Naming is not supported on this structure: unknown pseudo-atom #134"). I suggest you to catch the PluginException in the for loop, and use SMARTS or some other format instead of name if the exception is thrown. 
 mol.getAgent(jj).toFormat("smarts"); 
 Zsolt 
 | 
Thanks.I have tried all Molecule formats,but I  can not get "R2".and I find another problem that :if the structure has pseudo-atom ,use  "plugin.getPreferredIUPACName()", also throw exception.
	
	 
 
	
		ChemAxon e08c317633
		14-10-2010 12:25:04
	 
	
	
	The agent ("R2") seems to be an R-group. Without R-group definition (I can't see it on the image) it's absolutely useless. If there is an R-group definition in the molecule, then you can enumerate it with the Markush Enumeration plugin, and then use the result of the enumeration for generating the agent name.
Zsolt