Mol class represents a Chemical connectivity table

Namespace:  Hyleos.Chemistry
Assembly:  Hyleos.Chemistry (in Hyleos.Chemistry.dll) Version: 1.0.9.4 (1.0.9.4)

Syntax

C#
[SerializableAttribute]
public sealed class Molecule : BaseObject, 
	IDisposable
Visual Basic (Declaration)
<SerializableAttribute> _
Public NotInheritable Class Molecule _
	Inherits BaseObject _
	Implements IDisposable
Visual C++
[SerializableAttribute]
public ref class Molecule sealed : public BaseObject, 
	IDisposable

Remarks

If this object is implied in a reaction, MolType propery have to be used

Examples

Exemple using MDL-Mol file :
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)
    {
        /** 
         * your code
         */
        // Mol weight
        double mw = mol.MolWeight();
        // Mol name
        string molName = mol.Name;
        // Chiral flag
        bool isChiral = mol.Chiral;
    }
}
catch(Exception e)
{
    // manage error
}

Inheritance Hierarchy

System..::.Object
  Hyleos.Common..::.BaseObject
    Hyleos.Chemistry..::.Molecule

See Also