ChemSharp.UnitConversion 2.1.1

dotnet add package ChemSharp.UnitConversion --version 2.1.1
                    
NuGet\Install-Package ChemSharp.UnitConversion -Version 2.1.1
                    
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="ChemSharp.UnitConversion" Version="2.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ChemSharp.UnitConversion" Version="2.1.1" />
                    
Directory.Packages.props
<PackageReference Include="ChemSharp.UnitConversion" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ChemSharp.UnitConversion --version 2.1.1
                    
#r "nuget: ChemSharp.UnitConversion, 2.1.1"
                    
#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.
#addin nuget:?package=ChemSharp.UnitConversion&version=2.1.1
                    
Install ChemSharp.UnitConversion as a Cake Addin
#tool nuget:?package=ChemSharp.UnitConversion&version=2.1.1
                    
Install ChemSharp.UnitConversion as a Cake Tool

<p align="center"> <img src="https://raw.githubusercontent.com/JensKrumsieck/ChemSharp/master/icon.png" height="125px" /></p> <h1 align="center" >ChemSharp.UnitConversion</h1>

NuGet Badge

Features

  • Unit Conversion for (Energy, Magnetic Units, Mass)

Basic Usage

Use given Converter:

//create converter instance (energy)
var converter = new EnergyUnitConverter("nm", "cm^-1");
//convert using Convert or ConvertInverted
var wavenumbers = converter.Convert(500) / 1000;
var nanometers = converter.ConvertInverted(50000) * 1000

Create own Converter EnergyUnitConverter:

namespace ChemSharp.UnitConversion
{
    public class EnergyUnitConverter : AbstractUnitConverter
    {
        public EnergyUnitConverter(string from, string to) : base(from, to)
        {
            AddConversion("J", 1);
            AddConversion("eV", Constants.ElectronCharge);
            AddConversion("kJ/mol", 1000 / Constants.Avogadro);
            AddConversion("cal", 4.184);
            AddConversion("kcal/mol", 4184 / Constants.Avogadro);
            AddConversion("hartree", Constants.Hartree);
            AddConversion("cm^-1", Constants.Planck * Constants.SpeedOfLight * 100);
            AddConversion("Hz", Constants.Planck);
            AddConversion("Kelvin", Constants.Boltzmann);
            AddConversion("nm", new MappedFunction()
            {
                Function = i => Constants.Planck * Constants.SpeedOfLight / (i * 1e-9),
                Reciprocal = true
            });
        }
    }
}
Compatibility
  • .NET Standard 2.0, .NET Standard 2.1, .NET 5, .NET 6
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  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 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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
2.1.1 172 2/19/2024
2.1.0 212 7/31/2023
2.0.1 181 6/20/2023
2.0.0 261 3/1/2023
2.0.0-beta.1 126 12/1/2022
2.0.0-alpha.3 132 9/13/2022
2.0.0-alpha.2 119 9/5/2022
2.0.0-alpha.1 120 9/2/2022
1.1.0-beta.2 165 7/26/2022 1.1.0-beta.2 is deprecated because it has critical bugs.
1.1.0-beta.1 189 5/16/2022 1.1.0-beta.1 is deprecated because it has critical bugs.
1.0.15 545 1/27/2022
1.0.14 498 1/24/2022
1.0.13 373 12/5/2021
1.0.12 343 12/5/2021
1.0.11 3,052 11/25/2021
1.0.10 375 8/6/2021
1.0.9 420 7/2/2021
1.0.8 413 6/18/2021
1.0.7 426 6/16/2021
1.0.6 358 5/20/2021
1.0.5 421 5/20/2021
1.0.4 525 4/4/2021
1.0.3 416 3/30/2021
1.0.2 382 3/29/2021
1.0.1 425 3/9/2021
1.0.0 403 3/2/2021
1.0.0-beta5 247 2/20/2021
1.0.0-beta4 238 2/16/2021
1.0.0-beta3 309 2/11/2021
1.0.0-beta2 248 2/6/2021
1.0.0-beta1 258 2/4/2021
1.0.0-alpha20210123 300 1/23/2021
1.0.0-alpha20210105 273 1/6/2021
1.0.0-alpha1 470 12/28/2020