Get the Parent of the Compound

User fec9e52845

28-06-2013 11:07:21

Hi,


We have using the Marvin or JChem API.  We need to get the parent value ,Parent MoleculeWeight and Parent MoleculeFormula of compund. We find the GetParent() method in the MoleculeGraphic Class. we unable to get the Value. Can you please provide the Example code for get the parent,MoleculeWeight and MoleculeFormula of compund.


 


Regards


Siva

ChemAxon 25dcd765a3

28-06-2013 13:17:47

Hi Siva,


If you need weight or formula of the molecule you can use the ElementalAnalyser class.


See the example java code at the ElementalAnalyser API documentation.

User fec9e52845

01-07-2013 05:11:23

 Hi,


Thanks for Reply. We  have using .Net Application. Please provide the example in .net API and also need to get the Parent of Compound (Molecule).


Regards


Siva.

ChemAxon bd13b5bd77

01-07-2013 06:45:42

Hi,


 


what Andras sent you is a Java example, in the dotnet you can use the same code.


Low level JChem .NET API uses a clear Java -.NET compilation, so Java code will be working under dotnet.
Please add all the JChem.NET dlls from C:\Program Files\ChemAxon\JChem .NET API 6.x.x.


Viktor

User fec9e52845

01-07-2013 07:07:46

Hi,


Thanks for reply. Unable to get the ElementalAnalyser class in .net API. Please provide the Example for  .net C# code and ElementalAnalyser  class dont have the method to get the get the Parent of Compound (Molecule).


 


Regards


Siva


 

ChemAxon 2e7d8629fa

01-07-2013 07:38:37

 Hi Siva,


 


You can use the class ElementalAnalyser in .NET environment. For this, you need to install the JChem for .NET package. You can find it here:


http://www.chemaxon.com/download/jchem/jchem-for-net/


 


The assembly what you have to refer will be here:


C:\Program Files\ChemAxon\JChem .NET API 6.x.x\ChemAxon.IKVM.MarvinBeans.plugin.dll


 


The ElementalAnalyser class is under the namespace 'chemaxon.calculations' (chemaxon.calculations.ElementalAnalyser)


 


Regards,


Gergely


 


 

User fec9e52845

01-07-2013 08:12:34

Hi,


Thanks for reply. i can able to calculate the M.W and M.F using ElementalAnalyser  class.


As need to calculate the for this formula "C6H5NO2.HCl" of Molecule. i can get the Moleculeweight for this. But i need the parent of Molecule(C6H5NO2) and M.W of (C6H5NO2). i wont find the any method of the get the parent Molecule(C6H5NO2) and get the parent  M.W of (C6H5NO2) using ElementalAnalyser  class.


Can you help and provide the example for this scenario.


Regards


Siva


 

ChemAxon d26931946c

02-07-2013 07:53:42

Hi Siva,


If I understand right you want to get the largest fragment of the molecule. I attach a small example code that does that or you may use the Remove Fragment Standardizer action. You can find the developer documentation for the Standardizer here.


I hope it helps.


BRs


Peter

ChemAxon 2e7d8629fa

02-07-2013 09:35:10

 Hi Siva,


 


You can use JChem .NET API to get the largest fragment of a molecule.


For example:


 


ChemAxon.NET.IKVM.Chemistry.JChemMolecule molecule = new ChemAxon.NET.IKVM.Chemistry.JChemMolecule(new ChemAxon.NET.Base.Chemistry.Data.MoleculeData("C1=CC=CC=C1", ChemAxon.NET.Base.Chemistry.Formats.MoleculeFormat.SMILES));



ChemAxon.NET.IKVM.Chemistry.IJChemMolecule largestFragment = molecule.Calculations.LargestFragment;


 


Furthermore you can use the following properties:


- molecule.Calculations.FragmentCount


- molecule.Calculations.Fragments


 


For these properties you have to refer ChemAxon,NET.Base.dll and ChemAxon.NET.IKVM.dll.


 


Regards,


Gergely