dynamicpKa() evaluation error

User 870ab5b546

06-04-2009 13:55:10

I'm trying to write some more reaction definitions, and I am getting inexplicable (to me) results.


[bob@epoch bob]$ evaluate -e "dynamicpKa()" "CC1CCCCC1=O"

Exception in thread "main" chemaxon.nfunk.jep.ParseException: Error while compiling expression:

dynamicpKa()

    Encountered ")" at line 1, column 12.

Was expecting...

    "+" ...

    "-" ...

    <NOT> ...

    <STRING_LITERAL> ...

    <INTEGER_LITERAL> ...

    <FLOATING_POINT_LITERAL> ...

    <IDENTIFIER> ...

    "(" ...

    

at chemaxon.nfunk.jep.JEP.parseExpression(JEP.java:399)

at chemaxon.jep.ChemJEP.compile(ChemJEP.java:115)

at chemaxon.jep.Evaluator.compile(Evaluator.java:783)

at chemaxon.jep.Evaluator.compile(Evaluator.java:708)

at chemaxon.jep.Evaluator.main(Evaluator.java:1011)

Caused by:

chemaxon.nfunk.jep.ParseException: Encountered ")" at line 1, column 12.

Was expecting...

    "+" ...

    "-" ...

    <NOT> ...

    <STRING_LITERAL> ...

    <INTEGER_LITERAL> ...

    <FLOATING_POINT_LITERAL> ...

    <IDENTIFIER> ...

    "(" ...

    

at chemaxon.nfunk.jep.Parser.generateParseException(Parser.java:1753)

at chemaxon.nfunk.jep.Parser.jj_consume_token(Parser.java:1633)

at chemaxon.nfunk.jep.Parser.MultipleExpression(Parser.java:108)

at chemaxon.nfunk.jep.Parser.Expression(Parser.java:85)

at chemaxon.nfunk.jep.Parser.UnaryExpressionNotPlusMinus(Parser.java:841)

at chemaxon.nfunk.jep.Parser.PowerExpression(Parser.java:770)

at chemaxon.nfunk.jep.Parser.MultiplicativeExpression(Parser.java:558)

at chemaxon.nfunk.jep.Parser.AdditiveExpression(Parser.java:463)

at chemaxon.nfunk.jep.Parser.RelationalExpression(Parser.java:319)

at chemaxon.nfunk.jep.Parser.EqualExpression(Parser.java:237)

at chemaxon.nfunk.jep.Parser.AndExpression(Parser.java:194)

at chemaxon.nfunk.jep.Parser.OrExpression(Parser.java:151)

at chemaxon.nfunk.jep.Parser.MultipleExpression(Parser.java:101)

at chemaxon.nfunk.jep.Parser.Expression(Parser.java:85)

at chemaxon.nfunk.jep.Parser.Start(Parser.java:35)

at chemaxon.nfunk.jep.Parser.parseStream(Parser.java:18)

at chemaxon.nfunk.jep.JEP.parseExpression(JEP.java:373)

at chemaxon.jep.ChemJEP.compile(ChemJEP.java:115)

at chemaxon.jep.Evaluator.compile(Evaluator.java:783)

at chemaxon.jep.Evaluator.compile(Evaluator.java:708)

at chemaxon.jep.Evaluator.main(Evaluator.java:1011)


??? What does this mean, and how do I solve it?


My evaluator.xml file contains the following definition of dynamicpKa():


 


       <Plugin ID="dynamicpKa" class="chemaxon.marvin.calculations.pKaPlugin" JAR="pKaPlugin.jar">

            <Param Name="prefix" Value="dynamic"/>

            <Param Name="type" Value="acidic"/>

            <Param Name="min" Value="-1000"/>

            <Param Name="max" Value="1000"/>

        </Plugin>


Also, I don't understand this result:


 


[bob@epoch bob]$ evaluate -e "apKa()" "CC1CCCCC1=O"

;;;;;;;


Shouldn't the C atoms alpha to the ketone be considered acidic?


We're using JChem 5.1.05.


 


 

ChemAxon e08c317633

07-04-2009 17:50:16

Hi Bob,












bobgr wrote:



I'm trying to write some more reaction definitions, and I am getting inexplicable (to me) results.


[bob@epoch bob]$ evaluate -e "dynamicpKa()" "CC1CCCCC1=O"

Exception in thread "main" chemaxon.nfunk.jep.ParseException: Error while compiling expression:

dynamicpKa()

    Encountered ")" at line 1, column 12.

... (cut)...

??? What does this mean, and how do I solve it?


 


My evaluator.xml file contains the following definition of dynamicpKa():


 


       <Plugin ID="dynamicpKa" class="chemaxon.marvin.calculations.pKaPlugin" JAR="pKaPlugin.jar">

            <Param Name="prefix" Value="dynamic"/>

            <Param Name="type" Value="acidic"/>

            <Param Name="min" Value="-1000"/>

            <Param Name="max" Value="1000"/>

        </Plugin>


Where is your evaluator.xml file placed?


It should be here:


Plugins, functions and matching conditions defined by the user are read from marvin/config/evaluator.xml file (where marvin is the Marvin istallation directory) and from MARVIN_MAJOR_VERSION/evaluator.xml file (where MARVIN_MAJOR_VERSION is the major version of Marvin, e.g. "5.1") located under the .chemaxon (UNIX / Linux) or chemaxon (Windows) subdirectory in the user's home directory. The user defined XML configuration elements are added to default configuration, if both exist then user defined configuration override the built-in settings.


For more see the Configuration section in the Evaluator manual.


Also, the


class="chemaxon.marvin.calculations.pKaPlugin"


in your configuration file should be


Class="chemaxon.marvin.calculations.pKaPlugin" 


Class starts with uppercase 'c' in the latter. I attached an evaluator.xml which should work.


I get this result with the correct configuration:


$ evaluate -e "dynamicpKa()" "CC1CCCCC1=O"
54.33;31.55;58.04;53.72;56.83;20.46;;









Also, I don't understand this result:


 


[bob@epoch bob]$ evaluate -e "apKa()" "CC1CCCCC1=O"

;;;;;;;

Shouldn't the C atoms alpha to the ketone be considered acidic?


We're using JChem 5.1.05.



By default min basic pKa is set to -10, and max acidic pKa is set to 20, that's why there are no acidic pKa-s in the result. For dynamicpKa() functions these limits are set to -1000 and 1000, so acidic pKa-s larger than 20 are also listed (54.33;31.55;58.04;53.72;56.83;20.46).


FYI, in cxcalc the max acidic pKa can be set using a command line option.


$ cxcalc pka --max 1000 "CC1CCCCC1=O"
id apKa1 apKa2 bpKa1 bpKa2 atoms
1 20.46 31.55 -7.41 6,2,8


In Chemical Terms it can be defined only in XML.


Regards,


Zsolt

User 870ab5b546

08-04-2009 00:39:36

Ah, that explains it.  I have it in root/.chemaxon/ , but not within another folder called 5.1/ .  


We are still using Marvin 4.1 along with JChem 5.1.05.  Would the evaluator.xml file go in jchem5.1.05/marvin/config ?

ChemAxon e08c317633

08-04-2009 10:22:44

bobgr wrote:












Ah, that explains it.  I have it in root/.chemaxon/ , but not within another folder called 5.1/ .


We are still using Marvin 4.1 along with JChem 5.1.05.  Would the evaluator.xml file go in jchem5.1.05/marvin/config ?




In case of JChem the evaluator.xml should be in the jchem/config/ directory (we will mention this in the manual).


Zsolt

User 870ab5b546

08-04-2009 13:20:03

Got it.  Two more questions.  


 


(1) Even for Marvin 4.1, do we put evaluator.xml in marvin/config/ ?  It seems to me that this configuration method is new to Marvin 5.  


 


(2) If we are using the Marvin that comes with the JChem installation, do we need to put evaluator.xml in both jchem/config/ and jchem/marvin/config/ for both JChem and Marvin to have access to it?  If not, which directory do we use?  

ChemAxon e08c317633

08-04-2009 13:43:12

bobgr wrote:












Got it.  Two more questions.


(1) Even for Marvin 4.1, do we put evaluator.xml in marvin/config/ ?  It seems to me that this configuration method is new to Marvin 5.




Yes, it works only with Marvin 5.0 and newer versions.












bobgr wrote: 

(2) If we are using the Marvin that comes with the JChem installation, do we need to put evaluator.xml in both jchem/config/ and jchem/marvin/config/ for both JChem and Marvin to have access to it?  If not, which directory do we use?




It depends on how you intend to use JChem/Marvin. If you want to use Chemical Terms expressions only in JChem applications (e.g. Reactor), then it's enough to put it only to jchem/config/ directory. jchem/marvin directory contains Marvin Applets files (Marvin Applets package in included in JChem), so if you want to use this feature of Marvin, then put it also into  jchem/marvin/config/ directory.


Zsolt

ChemAxon e08c317633

08-04-2009 13:47:13

this feature of Marvin: http://www.chemaxon.com/marvin/examples/applets/sketch/chemicalterms1.html