Trivial.Chemistry 6.6.0

.NET 5.0 .NET Core 3.1 .NET Standard 2.0 .NET Framework 4.6.1
dotnet add package Trivial.Chemistry --version 6.6.0
NuGet\Install-Package Trivial.Chemistry -Version 6.6.0
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="Trivial.Chemistry" Version="6.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Trivial.Chemistry --version 6.6.0
#r "nuget: Trivial.Chemistry, 6.6.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Trivial.Chemistry as a Cake Addin
#addin nuget:?package=Trivial.Chemistry&version=6.6.0

// Install Trivial.Chemistry as a Cake Tool
#tool nuget:?package=Trivial.Chemistry&version=6.6.0

Trivial.Chemistry

This library includes the basic chemistry models.

Import

Add following namespace to your code file to use.

using Trivial.Chemistry;

Element

Get element from periodic table by its symbol or atomic numbers.

var oxygen = ChemicalElement.Get(8);
var gold = ChemicalElement.Get("Au");
var carbon = ChemicalElement.C;

Or list a set of element.

var some = ChemicalElement.Where(ele => ele.AtomicNumber < 20);

Isotope

Create an isotope from an element.

var diplogen = ChemicalElement.H.Isotope(2);

Or list all for a specific element.

var allCarbonIsotopes = ChemicalElement.C.Isotopes();

Molecular formula

Parse a molecular formula.

var carbonicAcid = MolecularFormula.Parse("H2CO3");

Or create a molecular formula by merging elements and other molecular formulas.

var sulfuricAcid = ChemicalElement.H * 2 + ChemicalElement.S + ChemicalElement.O * 4;
var ethanol = MolecularFormula.Parse("CH3") + MolecularFormula.Parse("CH2") + MolecularFormula.Parse("OH");
var iron = ChemicalElement.Fe;

Test conservation of mass.

// 2 Na + 2 H₂O = 2 NaOH + H₂
var mass = MolecularFormula.ConservationOfMass(
    new List<MolecularFormula>
    {
        { ChemicalElement.Na, 2 },
        { ChemicalElement.H * 2 + ChemicalElement.O, 2 }
    },
    new List<MolecularFormula>
    {
        { ChemicalElement.Na + ChemicalElement.H + ChemicalElement.O, 2 },
        ChemicalElement.H * 2
    }
);
Console.WriteLine(mass); // -> True
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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
6.6.0 68 11/9/2022
6.5.0 161 6/28/2022
6.4.0 185 4/14/2022
6.3.0 168 3/8/2022
6.2.0 182 1/30/2022
6.1.0 182 1/23/2022
6.0.0 142 1/1/2022
5.2.0 157 12/15/2021
5.1.0 155 12/2/2021
5.0.0 152 11/27/2021
4.0.0 183 11/9/2021
4.0.0-preview4 183 10/13/2021
4.0.0-preview3 127 9/15/2021
4.0.0-preview2 137 8/11/2021
4.0.0-preview1 180 6/18/2021
3.9.0 148 12/15/2021
3.0.0 185 11/9/2021
2.4.0 241 5/30/2021
2.3.0 239 5/23/2021
2.2.0 310 5/19/2021
2.1.0 416 5/17/2021
2.0.0 528 5/16/2021
1.0.1 450 5/13/2021
1.0.0 420 5/13/2021