Skip to content

uhoefel/chemistry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chemistry

DOI Maven Central

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

Installation

The artifact can be found at maven central:

<dependency>
    <groupId>eu.hoefel</groupId>
    <artifactId>chemistry</artifactId>
    <version>1.3.1</version>
</dependency>

Requirements

Chemistry is designed to work with Java 17+.

Note that version 1.3.0 removed the dependency on javafx, as it seemed an unnecessarily big dependency for what it achieved.