Major Microspecies plugin does not work

User 44b98eafc4

18-07-2012 15:54:13

Hi,


The Major Microspecies plugin does not work for one metabolite I'm working with. The metabolite is attached. When I try to use the plugin this error message appears: "Cannot run plugin: Major Microspecies 2". When I click stack trace the first line is: "java.lang.ArrayIndexOutOfBoundsException: 2 ". Do you have any idea why the plugin does not work on this particular metabolite? I'm using MarvinView 5.10.1 on Windows.


Regards,


Arna Palsdottir

User 44b98eafc4

18-07-2012 16:02:46

Hi,


The whole error message is:


java.lang.ArrayIndexOutOfBoundsException: 2
    at chemaxon.calculations.pka.BasicPKa.getAvarageAliphaticSideRingCharge(BasicPKa.java:1224)
    at chemaxon.calculations.pka.BasicPKa.getAliphaticImidepKa(BasicPKa.java:1138)
    at chemaxon.calculations.pka.BasicPKa.getNitrogenBPKa(BasicPKa.java:178)
    at chemaxon.calculations.pka.BasicPKa.calculate(BasicPKa.java:74)
    at chemaxon.calculations.pka.IntrinsicIonization.getBpKa(IntrinsicIonization.java:1275)
    at chemaxon.calculations.pka.IntrinsicIonization.getBasicpKa(IntrinsicIonization.java:260)
    at chemaxon.calculations.pka.PKaLargeModel.getProteinMicropka(PKaLargeModel.java:1864)
    at chemaxon.calculations.pka.PKaLargeModel.calcProteinMicropKa(PKaLargeModel.java:1643)
    at chemaxon.calculations.pka.PKaLargeModel.calcMicropKa(PKaLargeModel.java:887)
    at chemaxon.calculations.pka.PKaLargeModel.reCalcAtomSet(PKaLargeModel.java:605)
    at chemaxon.calculations.pka.PKaLargeModel.calcProteinIonization(PKaLargeModel.java:455)
    at chemaxon.calculations.pka.PKaLargeModel.calcMacropKa(PKaLargeModel.java:2457)
    at chemaxon.calculations.pka.PKaLargeModel.calcChargepHDist(PKaLargeModel.java:3050)
    at chemaxon.calculations.pka.PKaLargeModel.getMajorMicroSpecies(PKaLargeModel.java:3128)
    at chemaxon.marvin.calculations.MajorMicrospeciesPlugin.getMajorMicrospecies(MajorMicrospeciesPlugin.java:291)
    at chemaxon.marvin.calculations.MajorMicrospeciesPlugin.run(MajorMicrospeciesPlugin.java:247)
    at chemaxon.marvin.plugin.CalculatorPluginManager.runPlugin(CalculatorPluginManager.java:200)
    at chemaxon.marvin.plugin.CalculatorPluginManager.runPlugin(CalculatorPluginManager.java:184)
    at chemaxon.marvin.plugin.CalculatorPluginManager.runPlugin(CalculatorPluginManager.java:107)
    at chemaxon.marvin.plugin.CalculatorPluginManager.callback(CalculatorPluginManager.java:77)
    at chemaxon.marvin.plugin.PluginManager.callback(PluginManager.java:92)
    at chemaxon.marvin.common.swing.MolPanel$6.run(MolPanel.java:3828)


Many thanks!


Arna

ChemAxon afdac7b783

19-07-2012 11:16:08

Dear Arna,


 


Thank you for reporting this bug. We have fixed it, and it will be available in the next release (version 5.10.2, planned for early August).


Best Regards,


Viktoria

User 44b98eafc4

19-07-2012 11:21:07

Thanks!

User 9be621d283

17-12-2013 18:29:00

Dear ChemAxon team,


 


We get a similar issue as the one reported by Arna Palsdottir but with the latest version of the software and a simple molecule.


The current version of MarvinSketch 6.1.4 does not allow to compute major Microspecies for the water molecule at pH 7.3, with any options combination.


[http://www.chemaxon.com/marvin/sketch/index.php#, Operating system: x86_64 Max OS X 10.6.8]

We get the following error message.


ERROR:
Cannot run plugin: Major Microspecies
0

STACK TRACE:
java.lang.ArrayIndexOutOfBoundsException: 0
    at chemaxon.struc.MolAtom.getBond(Unknown Source)
    at chemaxon.calculations.pka.PKaLargeModel.isProtonatedNO2(Unknown Source)
    at chemaxon.calculations.pka.PKaLargeModel.neutralize(Unknown Source)
    at chemaxon.calculations.pka.PKaLargeModel.getMajorMicroSpecies(Unknown Source)
    at chemaxon.marvin.calculations.MajorMicrospeciesPlugin.a(Unknown Source)
    at chemaxon.marvin.calculations.MajorMicrospeciesPlugin.getMajorMicrospecies(Unknown Source)
    at chemaxon.marvin.calculations.MajorMicrospeciesPlugin.getDisplayMolecule(Unknown Source)
    at chemaxon.marvin.calculations.MajorMicrospeciesPlugin.getResultMolecule(Unknown Source)
    at chemaxon.marvin.plugin.CalculatorPluginDisplay.store(Unknown Source)
    at chemaxon.marvin.plugin.CalculatorPluginManager.a(Unknown Source)
    at chemaxon.marvin.plugin.CalculatorPluginManager.a(Unknown Source)
    at chemaxon.marvin.plugin.CalculatorPluginManager.a(Unknown Source)
    at chemaxon.marvin.plugin.CalculatorPluginManager.callback(Unknown Source)
    at chemaxon.marvin.plugin.PluginManager.callback(Unknown Source)
    at chemaxon.marvin.common.swing.MolPanel$6.run(Unknown Source)


 


Tested with MarvinSketch-6.1.3 (linux 64bits) and MarvinSketch-6.1.4 (linux 64bits):


--> not working (same error as above)


Tested with MarvinSketch-6.0.3 (linux 64bits):


--> working: H20 is shown as major microspecies at pH 7.3


In our context, it is a severe limitation as we use this functionality routinely to normalize the compounds of the Rhea database (http://www.ebi.ac.uk/rhea/)


Thanks for your support.


Anne Morgat

User 851ac690a0

19-12-2013 02:40:11

Hi,


Yes it is a bug.


I have fixed it now.  The fix will be available in the 6.2 version which is under beta test now. 


Jozsi

User e6dac1475d

19-12-2013 11:13:59

Dear Jozsi,


 


Thank you for this quick feedback about the problem with water reported by my college Anne above. We really appreciate your reactivity.


 


Unfortunately, I observe another issue with the the versions 6.x and the major microspecies computations.


It is a problem using the MajorMicrospeciesPlugin class in custom java code. Maybe you can tackle this issue at the same time:


If I try to get the major microspecies for Cu2+ using the MajorMicrospeciesPlugin run() method, it returns false and I get the following error message: "Inconsistent molecular structure".


Here is the our code section:


----------------------------------------


[...]



                Molecule mol = molFromStructure(structure);

                phPlugin.setMolecule(mol);
                phPlugin.setpH(pH);

                if (phPlugin.run()) {
                    adjMolecule = phPlugin.getMajorMicrospecies();
                    adjStructure = MolExporter.exportToFormat(adjMolecule, "mol");
                    String warning = phPlugin.getWarningMessage();
                    if (warning != null && warning.length() > 0)
                        LOGGER.error("While adjusting pH: "
                            + phPlugin.getWarningMessage());

                    return adjStructure;

                } else { // Unable to adjust pH
                    LOGGER.error("Unable to adjust pH for id=: " + id + " "
                            + phPlugin.getErrorMessage());
                    LOGGER.error("Structure causing problem:");
                    LOGGER.error(structure);
                }


[...]
----------------------------------------


=> output with Marvin 6.1.0 and 6.1.3:


Unable to adjust pH for id=: XX Inconsistent molecular structure. [...]


=> output with Marvin 5.10.0:


<No error message>, the major microspecies (Cu2+ itself) is returned.




Here is our molfile for Cu2+ ("structure" string above):


----------------------------------------




  Marvin  01130622122D          

  1  0  0  0  0  0            999 V2000
    0.0000    0.0000    0.0000 Cu  0  2  0  0  0  0  0  0  0  0  0  0
M  CHG  1   1   2
M  END


----------------------------------------


 


If I load this molfile in MarvinSketch (5.10.0 or 6.1.0 or 6.1.3) and I perform "Calculations->Protonation->Major Microspecies", no error appears and Cu2+ is shown as result. So this error seems to be specific to the 6.x marvin versions and/or the way we use your API.


 


I understand that protonation of such a compound is not very relevant, but this is done in a batch procedure for many chemical compounds and I would expect the API to behave like the MarvinSketch in any cases.


Please let me know if you can reproduce this issue and if you can fix this.


 


Thank you for your support,


Best regards,


 


Thierry

User 9be621d283

19-12-2013 11:16:55

Thanks!

User 851ac690a0

19-12-2013 11:39:45

Hi,


 


Yes, these type of bugs  which are related with metals, matal ions , metal hydrides as well have been fixed. The fix will be available in the 6.2 release. 


 


 


Jozsi 

User e6dac1475d

19-12-2013 12:09:37

Dear Jozsi,


 


Thank you for your feedback on Cu2+. This is encouraging and we are really looking forward to test the 6.2 soon.


 


Can you also comment about the fact that for the same version of Marvin, I can get an error using the API, but not using the GUI (MarvinSketch) for Cu2+, as I report? For me, this is a point that is independent of the question of Cu2+ being allowed for major microspecies computations or not, and this prevent us to use MarvinSketch in a reliable fashion for manual testing.


Best regards,


Thierry

User 851ac690a0

19-12-2013 15:10:24

Hi,


I have done a basic test. I find that the "Cupper ion" is the only outlier which go into the else case.  


Neither valence errored or unionizable molecules run into the else case.


 


This is not so  user friendly behaviour in the API. I try to fix it.



 


Jozsi

User e6dac1475d

20-01-2014 08:03:37

Dear Jozsi,


 


I saw your released a 6.1.6 version on January 16th, 2014. When do you plan to release the 6.2 with the fixes in the MajorMicrospeciesPlugin for the water and Cu2+ issues discussed above?


 


Best regards,


 


Thierry

ChemAxon b62f37c21a

20-01-2014 11:47:49

Dear Thierry,


We expect to release 6.2 in January.


If you would like to try our latest beta build, please see the links below:


Download:
Marvin
 JChem Webservices-Classic 



Documentation
 and examples for
Applet
,
WebStart



API documentation:
MarvinBeans
 Marvin
Applets
 JChem






Note: there is a known issue in Marvin editor, something about
implicit hydrogens.


Best regards,
Gabor