IFPEN.AllotropeConverters.Chromeleon
1.0.0-beta2
dotnet add package IFPEN.AllotropeConverters.Chromeleon --version 1.0.0-beta2
NuGet\Install-Package IFPEN.AllotropeConverters.Chromeleon -Version 1.0.0-beta2
<PackageReference Include="IFPEN.AllotropeConverters.Chromeleon" Version="1.0.0-beta2" />
<PackageVersion Include="IFPEN.AllotropeConverters.Chromeleon" Version="1.0.0-beta2" />
<PackageReference Include="IFPEN.AllotropeConverters.Chromeleon" />
paket add IFPEN.AllotropeConverters.Chromeleon --version 1.0.0-beta2
#r "nuget: IFPEN.AllotropeConverters.Chromeleon, 1.0.0-beta2"
#:package IFPEN.AllotropeConverters.Chromeleon@1.0.0-beta2
#addin nuget:?package=IFPEN.AllotropeConverters.Chromeleon&version=1.0.0-beta2&prerelease
#tool nuget:?package=IFPEN.AllotropeConverters.Chromeleon&version=1.0.0-beta2&prerelease
Chromeleon To Allotrope Converter
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
- Clone the repository.
- Edit the
ChromeleonConverter.csprojfile 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> - 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, defaultfalse): If true, enables the Wikidata retrieval of French names for chemical compounds.useMemoryCache(bool, defaultfalse): 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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net481 is compatible. |
-
.NETFramework 4.8.1
- IFPEN.AllotropeConverters.AllotropeModels (>= 2025.6.5)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- Serilog.Extensions.Logging (>= 8.0.0)
- Serilog.Sinks.File (>= 5.0.0)
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