Trivial.Chemistry
9.0.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.6.1
This package targets .NET Framework 4.6.1. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Trivial.Chemistry --version 9.0.0
NuGet\Install-Package Trivial.Chemistry -Version 9.0.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="9.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Trivial.Chemistry --version 9.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Trivial.Chemistry, 9.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. 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=9.0.0 // Install Trivial.Chemistry as a Cake Tool #tool nuget:?package=Trivial.Chemistry&version=9.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Framework | net461 is compatible. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
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 | |
---|---|---|---|
9.1.0 | 64 | 12/24/2024 | |
9.0.0 | 89 | 12/12/2024 | |
8.0.0 | 168 | 6/12/2024 | |
7.2.0 | 227 | 11/16/2023 | |
7.1.0 | 192 | 5/8/2023 | |
7.0.0 | 301 | 1/20/2023 | |
6.6.0 | 367 | 11/9/2022 | |
6.5.0 | 436 | 6/28/2022 | |
6.4.0 | 484 | 4/14/2022 | |
6.3.0 | 447 | 3/8/2022 | |
6.2.0 | 478 | 1/30/2022 | |
6.1.0 | 473 | 1/23/2022 | |
6.0.0 | 297 | 1/1/2022 | |
5.2.0 | 323 | 12/15/2021 | |
5.1.0 | 311 | 12/2/2021 | |
5.0.0 | 333 | 11/27/2021 | |
4.0.0 | 350 | 11/9/2021 | |
3.9.0 | 302 | 12/15/2021 | |
3.0.0 | 332 | 11/9/2021 | |
2.4.0 | 404 | 5/30/2021 | |
2.3.0 | 383 | 5/23/2021 | |
2.2.0 | 509 | 5/19/2021 | |
2.1.0 | 593 | 5/17/2021 | |
2.0.0 | 736 | 5/16/2021 | |
1.0.1 | 665 | 5/13/2021 | |
1.0.0 | 609 | 5/13/2021 |