Chemistry is a Java library designed to handle chemical types.
It has enums for all nuclides (i.e., all elements and isotopes) and provides a type for molecules (which needs an internet connection).
The molecule types provides an implementation for the Texable
interface from the jatex module, such that it can easily return proper LaTeX code.
Some examples:
Molecule m = new Molecule("magnesium dioxide");
m.iupac(); // gets the official IUPAC name
Isotope.ofElement(Element.Ar); // the list of argon isotopes
Isotope.named("deuterium"); // gets the enum value for deuterium
Element.get(ElementCategory.ALKALI_METAL); // gets all alkali metals
Element.Og.isotopes(); // gets the isotopes of oganesson
Element.He.group(); // gets the IUPAC group number of helium
The artifact can be found at maven central:
<dependency>
<groupId>eu.hoefel</groupId>
<artifactId>chemistry</artifactId>
<version>2.0.0</version>
</dependency>
Chemistry is designed to work with Java 21+.
Note that version 1.3.0 removed the dependency on javafx, as it seemed an unnecessarily big dependency for what it achieved.