MolecularWeightCalculator 1.0.1
See the version list below for details.
dotnet add package MolecularWeightCalculator --version 1.0.1
NuGet\Install-Package MolecularWeightCalculator -Version 1.0.1
<PackageReference Include="MolecularWeightCalculator" Version="1.0.1" />
paket add MolecularWeightCalculator --version 1.0.1
#r "nuget: MolecularWeightCalculator, 1.0.1"
// Install MolecularWeightCalculator as a Cake Addin #addin nuget:?package=MolecularWeightCalculator&version=1.0.1 // Install MolecularWeightCalculator as a Cake Tool #tool nuget:?package=MolecularWeightCalculator&version=1.0.1
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
Product | Versions 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. |
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- ncalc (>= 1.3.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v 1.0.0
calculating the molecular mass of chemical compounds