Exception in thread “main” chemaxon.nfunk.jep.parseexception

User bff01cf213

02-10-2009 21:30:55

 


Hi,


I am trying to calculate the molecular weight of 4500 molecules (single file with canonical smiles)


 


With the command evaluate –e “mass()”. I am getting values for some of the input files, but after I got this message:


Exception in thread “main” chemaxon.nfunk.jep.parseexception:


ERROR while evaluating expression: mass()


Calculation result is not defined for query molecules.


At chemaxon.nfunk.jep.JEP.getValuesAsObject(Unknown source)


….


 


Could you please help?


 


Thanks,


A.


 

ChemAxon e08c317633

05-10-2009 09:52:20

Hi,


Please use the --ignore-error command line option.


See: http://www.chemaxon.com/marvin/help/chemicalterms/Evaluator.html#usage


Example:


There are 4 molecules in testset.smiles file, one of them is a query structure, and one of them is a reaction. For those the mass calculation is not a valid operation, so it results an error. If --ignore-error command line option is used, then the error is ignored, and an empty line or empty structure is written to the output. By default the error message (java exception stack trace) is also written to the console:


$ evaluate -e "mass()" --ignore-error testset.smiles
chemaxon.nfunk.jep.ParseException: Error while evaluating expression:
mass()
Calculation result is not defined for query molecules.
at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:487)
at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:149)
at chemaxon.jep.Evaluator.main(Evaluator.java:1192)
Caused by:
chemaxon.nfunk.jep.ParseException: Calculation result is not defined for query molecules.
at chemaxon.jep.function.Plugin.run(Plugin.java:415)
at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:290)
at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:53)
at chemaxon.nfunk.jep.EvaluatorVisitor.getValue(EvaluatorVisitor.java:155)
at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:477)
at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:149)
at chemaxon.jep.Evaluator.main(Evaluator.java:1192)
Caused by:
chemaxon.marvin.plugin.PluginException: Calculation result is not defined for query molecules.
at chemaxon.marvin.calculations.ElementalAnalyserPlugin.checkMolecule(ElementalAnalyserPlugin.java:191)
at chemaxon.jep.function.Plugin.run(Plugin.java:387)
at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:290)
at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:53)
at chemaxon.nfunk.jep.EvaluatorVisitor.getValue(EvaluatorVisitor.java:155)
at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:477)
at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:149)
at chemaxon.jep.Evaluator.main(Evaluator.java:1192)
chemaxon.nfunk.jep.ParseException: Error while evaluating expression:
mass()
Calculation result is not defined for reactions.
at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:487)
at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:149)
at chemaxon.jep.Evaluator.main(Evaluator.java:1192)
Caused by:
chemaxon.nfunk.jep.ParseException: Calculation result is not defined for reactions.
at chemaxon.jep.function.Plugin.run(Plugin.java:415)
at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:290)
at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:53)
at chemaxon.nfunk.jep.EvaluatorVisitor.getValue(EvaluatorVisitor.java:155)
at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:477)
at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:149)
at chemaxon.jep.Evaluator.main(Evaluator.java:1192)
Caused by:
chemaxon.marvin.plugin.PluginException: Calculation result is not defined for reactions.
at chemaxon.marvin.calculations.ElementalAnalyserPlugin.checkMolecule(ElementalAnalyserPlugin.java:200)
at chemaxon.jep.function.Plugin.run(Plugin.java:387)
at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:290)
at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:53)
at chemaxon.nfunk.jep.EvaluatorVisitor.getValue(EvaluatorVisitor.java:155)
at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:477)
at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:149)
at chemaxon.jep.Evaluator.main(Evaluator.java:1192)
78,11


100,16


On Linux/Unix system the error message can be redirected to /dev/null:


$ evaluate -e "mass()" --ignore-error testset.smiles 2>/dev/null
78,11


100,16


Zsolt