Invalid structure error for a compound "GSK2402968B"

User 583b5ee0b7

05-11-2014 06:36:08

We are getting the error message attached for your reference 


 The below marvin version is been used


Marvin.NET 6.1.0.180


The below dlls has been referred in the .net applicaiton.


ChemAxon.NET.IKVM - 6.1.0.369


ChemAxon.NET.Base -6.1.0.369


ChemAxon.IKVM.MarvinBeans.plugin - 6.1.0.180


ChemAxon.IKVM.com.chemaxon.core - 6.1.0.180


IKVM.OpenJDK.Core - 0.42.1.105


Thanks in advance :)

ChemAxon bd13b5bd77

05-11-2014 09:06:27

Hi Jayashree,


 


could you please send me the code snippet you are about to use. Especially the molecule (string) you would like to display.


Side topic: 6.1 is a pretty old library. Apart from it the solution should work ....


 


Viktor

User 583b5ee0b7

05-11-2014 09:17:48










hamoriviktor wrote:

Hi Jayashree,


 


could you please send me the code snippet you are about to use. Especially the molecule (string) you would like to display.


Side topic: 6.1 is a pretty old library. Apart from it the solution should work ....


 


Viktor



 



Thanks for the reply Victor :)


 Below is the code snippet and chemical structure is in the attachment in earlier blog.




 





 





public JchemServiceData CalculateMolecularWeightByFormula(string MolecularFormula)ElementalAnalyser ws = new ElementalAnalyser();JchemServiceData JchemData = new JchemServiceData();try




{


ws.setMolecule(MolecularFormula);


JchemData.CandidateMolecularWeight = ws.mass().ToString("#0.0000");return JchemData;


}


catch (Exception ex)


{


throw ex;


}



 



 




 

ChemAxon bd13b5bd77

05-11-2014 09:58:17

Could you please check this API:


http://www.chemaxon.com/dotNET/6.3/examples.html


calculations:


http://www.chemaxon.com/dotNET/6.3/examples.html#calculations


 


I think writing your own JChemData you look for something similar to this:


            var benzeneMolecule = MainFactory.Chemistry.CreateMolecule("[O-]C1=CC=CC=C1");


            var s = benzeneMolecule.Calculations.ExactMass.ToString("#0.0000");



            s = benzeneMolecule.Mass.ToString("#0.0000");





The problem is with your code (molecule) you would like to force the Molecule recognizer to deserialize a molecule from formula moelcule formula is irreversible, it cannot be used to generate a molecule from.

If you check my code and example I used smiles to generate a structure.


Viktor

ChemAxon bd13b5bd77

05-11-2014 10:29:23

I am sorry, if you are on 6.1 then my code snippet should have been different a little bit (our API was improved so far)


 


http://www.chemaxon.com/dotNET/6.2/examples.html


 


var benzeneData = new MoleculeData("C1=CC=CC=C1", MoleculeFormat.Unknown);
var benzeneMolecule = new JChemMolecule(benzeneData);
var s = benzeneMolecule.Calculations.ExactMass.ToString("#0.0000");
s = benzeneMolecule.Mass.ToString("#0.0000");




There was no central Factory to serve and guide you through the services. It was introduced in 6.3.