IFPEN.AllotropeConverters.Chromeleon 1.0.0-beta2

This is a prerelease version of IFPEN.AllotropeConverters.Chromeleon.
dotnet add package IFPEN.AllotropeConverters.Chromeleon --version 1.0.0-beta2
                    
NuGet\Install-Package IFPEN.AllotropeConverters.Chromeleon -Version 1.0.0-beta2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IFPEN.AllotropeConverters.Chromeleon" Version="1.0.0-beta2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IFPEN.AllotropeConverters.Chromeleon" Version="1.0.0-beta2" />
                    
Directory.Packages.props
<PackageReference Include="IFPEN.AllotropeConverters.Chromeleon" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IFPEN.AllotropeConverters.Chromeleon --version 1.0.0-beta2
                    
#r "nuget: IFPEN.AllotropeConverters.Chromeleon, 1.0.0-beta2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IFPEN.AllotropeConverters.Chromeleon@1.0.0-beta2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IFPEN.AllotropeConverters.Chromeleon&version=1.0.0-beta2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=IFPEN.AllotropeConverters.Chromeleon&version=1.0.0-beta2&prerelease
                    
Install as a Cake Tool

Chromeleon To Allotrope Converter

License CeCILL 2.1 NuGet

A .NET library to convert Thermo Chromeleon proprietary data (via SDK) to Allotrope's ASM data (Gas Chromatography).

A project from IFP Energies Nouvelles, a public research, innovation and training organization in the fields of energy, transport and the environment.

Prerequisites

  • .NET Framework 4.8
  • Thermo Chromeleon 7.2+ Client installed locally (The library requires Thermo.Chromeleon.Sdk.dll).
  • Internet access to nuget.org to retrieve dependencies.

Installation

  1. Clone the repository.
  2. Edit the ChromeleonConverter.csproj file to point to your local Chromeleon SDK installation:
    <Reference Include="Thermo.Chromeleon.Sdk">
       <HintPath>C:\Program Files (x86)\Thermo\Chromeleon\bin\Thermo.Chromeleon.Sdk.dll</HintPath>
    </Reference>
    
  3. Restore the public NuGet packages and build the solution:
    dotnet restore
    dotnet build --configuration Release
    

Usage

The library provides two initialization modes depending on your running environment (Standalone application vs Chromeleon Add-in).

1. Standalone Application

Use this mode if you are building an external tool or console application. The converter handles the SDK Scope creation and User Logon.

using Ifpen.AllotropeConverters.Chromeleon;
using Thermo.Chromeleon.Sdk.Common;
using Thermo.Chromeleon.Sdk.Interfaces.Data;

// The 'using' block ensures proper SDK scope disposal and logoff
using (var converter = new ChromeleonToAllotropeConverter())
{
    // Retrieve injection using standard Chromeleon SDK factories
    IItemFactory itemFactory = CmSdk.GetItemFactory();
    Uri injectionUrl = new Uri("chrom://localhost/MySequence/MyInjection");

    if (itemFactory.TryGetItem(injectionUrl, out IInjection injection))
    {
        // Convert to Allotrope Model
        var allotropeModel = converter.Convert(injection);
        
        // Use the model (e.g. serialize to JSON)
        // ...
    }
}

2. Chromeleon Add-in (Existing Scope)

Use this mode if your code is running inside a process where the Chromeleon SDK is already initialized and authenticated (e.g., a .NET Add-in or Script).

using Ifpen.AllotropeConverters.Chromeleon;
using Thermo.Chromeleon.Sdk.Common;

// 'activeScope' is your existing CmSdkScope
public void ProcessInjection(CmSdkScope activeScope, IInjection myInjection)
{
    // Initialize converter with the existing scope
    // The converter will NOT dispose the scope
    var converter = new ChromeleonToAllotropeConverter(activeScope);

    var allotropeModel = converter.Convert(myInjection);
    
    // ...
}

Configuration

The peak name mapping behavior can be customized by adding a peakname-config.json file in your application's execution directory.

Example peakname-config.json

{
  "enableWikidata": true,
  "useMemoryCache": true
}

Options

  • enableWikidata (bool, default false): If true, enables the Wikidata retrieval of French names for chemical compounds.
  • useMemoryCache (bool, default false): If true, wraps the mapping strategy with an in-memory cache to avoid redundant network calls or processing.

If no configuration file is found, the converter defaults to a passthrough strategy (original peak names are kept).

Architecture

This library follows Clean Architecture principles to ensure maintainability and testability:

  • Domain: Contains agnostic Data Transfer Objects (DTOs) representing physical data (e.g., PeakData). No dependency on Chromeleon SDK.
  • Chromeleon: Contains the specific implementation.
    • Infrastructure: Handles the complexity of the proprietary SDK (Reflection, Reporting Engine Formulas).
    • Mappers: Maps the infrastructure data to the Allotrope format using the Domain DTOs.

Roadmap

  • Support for Agilent OpenLab data (using the shared Domain kernel).

License

The code is available under the CeCILL 2.1 license, which is compatible with GNU GPL, GNU Affero GPL and EUPL.

The ASM JSON schemas are available under CC-BY-NC 4.0 terms.

Product Compatible and additional computed target framework versions.
.NET Framework net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-beta2 114 2/20/2026
1.0.0-beta 96 1/13/2026

Minor update