Skip to content
ifpenPublic

About

GC to Allotrope Simple Model converter

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

137 Commits

Folders and files

Repository files navigation

GC2ASM

Maven Central Version License CeCILL 2.1

A Java converter from GC proprietary data to Allotrope's ASM data.

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

Usage

import fr.ifpen.allotropeconverters.gc.GcToAllotropeJsonConverter;
import fr.ifpen.allotropeconverters.gc.chemstation.ChemStationToAllotropeMapper;
import fr.ifpen.allotropeconverters.gc.chemstation.ChemStationToAllotropeMapperBuilder;

Path folderPath = "path to folder containing .ch, .xml and .txt files";
Path filePath = "path to .ch file";

// Using default mapper
GcToAllotropeJsonConverter converter = new GcToAllotropeJsonConverter();

// Conversion from folder to Allotrope JSON
GasChromatographyTabularEmbedSchema allotropeFromFolder = converter.convertFolderToAllotrope(folderPath);

// Conversion from .ch file to Allotrope JSON
GasChromatographyTabularEmbedSchema allotropeFromFile = converter.convertChFileToAllotrope(filePath);


// ChemStation to Allotrope mapper can be customized
ChemStationToAllotropeMapperBuilder builder = new ChemStationToAllotropeMapperBuilder();
ChemStationToAllotropeMapper mapper = builder.withZoneId(ZoneId.of("Europe/Paris"))
                                             .withChFilename("file.ch")
                                             .withResultXmlFilename("file.xml")
                                             .build();
GcToAllotropeJsonConverter customizedConverter = new GcToAllotropeJsonConverter(mapper);

// Convert folders and files
// [...]

Development

The project only needs JDK 17 and Maven: use whatever local setup you prefer.

Docker Sandbox (optional)

If you want to work with an AI coding agent in an isolated environment, the repository includes a Docker Sandboxes environment (sbxenv.yaml). It runs Claude Code with the published mise kit, which installs the JDK and Maven versions pinned in .mise.toml, and a small network-policy kit (.sandbox/mise-network) that only allows the hosts needed to download that toolchain and Maven dependencies.

Install Docker Sandboxes (platform requirements), then sign in:

winget install Docker.sbx   # Windows; see the installation guide for macOS and Linux
sbx login

From the repository root, review and start the environment:

sbx env plan
sbx env run

Inside the sandbox, install the pinned toolchain once, then build as usual:

mise install
mvn package

Supported files

  • Chemstation V179
  • Chemstation V181

Roadmap

Support for Thermo's Chromeleon data.

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.

About

GC to Allotrope Simple Model converter

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages