Class to computes Formula and element composition
Namespace:
Hyleos.ChemistryAssembly: Hyleos.Chemistry (in Hyleos.Chemistry.dll) Version: 1.0.9.4 (1.0.9.4)
Syntax
| C# |
|---|
public class MolAnalysis |
| Visual Basic (Declaration) |
|---|
Public Class MolAnalysis |
| Visual C++ |
|---|
public ref class MolAnalysis |
Examples
Composition :
CopyC#
// include Hyleos Assembly using Hyleos.Chemistry; try { // Create CTab object Molecule mol = new Molecule(); // Read and analyse contents of a Mol File MDL.ReadMolFile(mol, filename); // Check if we have at least one atom if (mol.CountAtoms > 0) { // Init MolComposition add-in MolAnalysis molComposition = new MolAnalysis(molecule); string composition = molComposition.Composition; } } catch(Exception e) { // manage error }
Examples
Formula :
CopyC#
// include Hyleos Assembly using Hyleos.Chemistry; try { // Create CTab object Molecule mol = new Molecule(); // Read and analyse contents of a Mol File MDL.ReadMolFile(mol, filename); // Check if we have at least one atom if (mol.CountAtoms > 0) { // Init MolComposition add-in MolAnalysis molComposition = new MolAnalysis(molecule); string formula = molComposition.Formula; } } catch(Exception e) { // manage error }