MolecularWeightCalculator 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MolecularWeightCalculator --version 1.0.0
NuGet\Install-Package MolecularWeightCalculator -Version 1.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="MolecularWeightCalculator" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MolecularWeightCalculator --version 1.0.0
#r "nuget: MolecularWeightCalculator, 1.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 MolecularWeightCalculator as a Cake Addin
#addin nuget:?package=MolecularWeightCalculator&version=1.0.0

// Install MolecularWeightCalculator as a Cake Tool
#tool nuget:?package=MolecularWeightCalculator&version=1.0.0

Molecular Mass Weight Calculator

This is a C# library for calculating the molecular mass of chemical compounds. It allows you to input a chemical formula and computes the total molecular weight by summing up the atomic weights of the constituent elements.

Features

  • Calculate the molecular weight of chemical compounds.
  • Support for standard atomic weights of elements.
  • Simple and intuitive DLL for integration into your projects.

Installation

You can install the Molecular Mass Calculator library via NuGet Package Manager Console:

Install-Package MolecularMassCalculator

Usage

Here's how you can use the library to calculate the molecular weight of a chemical compound:

var molecularMath = new MolecularMath();
string exp1 = "CO2";
double exp1Result = molecularMath.ComputeMass(exp1);
Console.WriteLine($"{exp1}=>{exp1Result}");
//CO2=>44.0095

string exp2 = "CaCO3";
double exp2Result = molecularMath.ComputeMass(exp2);
Console.WriteLine($"{exp2}=>{exp2Result}");
//CaCO3=>100.0869

string exp3 = "CO2 / CaCO3";
double exp3Result = molecularMath.ComputeMass(exp3);
Console.WriteLine($"{exp3}=>{exp3Result}");
//CO2 / CaCO3=>0.43971288949902537

string exp4 = "C2H2 +2.5 * O2";
double exp4Result = molecularMath.ComputeMass(exp4);
Console.WriteLine($"{exp4}=>{exp4Result}");
//C2H2 +2.5 * O2=>106.03428


string exp5 = "2*CO2/C2H2";
double exp5Result = molecularMath.ComputeMass(exp5);
Console.WriteLine($"{exp5}=>{exp5Result}");
//2*CO2/C2H2=>3.380499038302004

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

License: MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
1.0.5 77 3/6/2024
1.0.4 91 3/5/2024
1.0.3 93 3/4/2024
1.0.2 118 3/1/2024
1.0.1 115 3/1/2024
1.0.0 112 3/1/2024

v 1.0.0
calculating the molecular mass of chemical compounds