votca 2024-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
votca::tools::UnitConverter Class Reference

Class converts between different unit types. More...

#include <unitconverter.h>

Public Member Functions

constexpr double convert (const DistanceUnit &from, const DistanceUnit &to) const noexcept
 
constexpr double convert (const TimeUnit &from, const TimeUnit &to) const noexcept
 
constexpr double convert (const MassUnit &from, const MassUnit &to) const noexcept
 
constexpr double convert (const EnergyUnit &from, const EnergyUnit &to) const noexcept
 
constexpr double convert (const MolarEnergyUnit &from, const MolarEnergyUnit &to) const noexcept
 
constexpr double convert (const ChargeUnit &from, const ChargeUnit &to) const noexcept
 
constexpr double convert (const VelocityUnit &from, const VelocityUnit &to) const noexcept
 
constexpr double convert (const ForceUnit &from, const ForceUnit &to) const noexcept
 
constexpr double convert (const MolarForceUnit &from, const MolarForceUnit &to) const noexcept
 

Private Member Functions

constexpr double getDistanceValue_ (const DistanceUnit &enum_type) const noexcept
 All distances with respect to Ang.
 
constexpr double getTimeValue_ (const TimeUnit &enum_type) const noexcept
 All times with respect to pico seconds.
 
constexpr double getMassValue_ (const MassUnit &enum_type) const noexcept
 All masses with respect to atomic mass units.
 
constexpr double getEnergyValue_ (const EnergyUnit &enum_type) const noexcept
 All energies in terms of electron volts.
 
constexpr double getMolarEnergyValue_ (const MolarEnergyUnit &enum_type) const noexcept
 
constexpr double getChargeValue_ (const ChargeUnit &enum_type) const noexcept
 All charge in terms of elementary charge e.
 
constexpr double getVelocityValue_ (const VelocityUnit &enum_type) const noexcept
 All velocities in terms of nanometers per picosecond.
 
constexpr double getForceValue_ (const ForceUnit &enum_type) const noexcept
 Default force unit is the kilojoules per nanometer.
 
constexpr double getMolarForceValue_ (const MolarForceUnit &enum_type) const noexcept
 Default force unit is the kilojoules per mole nanometer.
 

Detailed Description

Class converts between different unit types.

Definition at line 88 of file unitconverter.h.

Member Function Documentation

◆ convert() [1/9]

constexpr double votca::tools::UnitConverter::convert ( const ChargeUnit from,
const ChargeUnit to 
) const
inlineconstexprnoexcept

Definition at line 273 of file unitconverter.h.

◆ convert() [2/9]

constexpr double votca::tools::UnitConverter::convert ( const DistanceUnit from,
const DistanceUnit to 
) const
inlineconstexprnoexcept

Definition at line 253 of file unitconverter.h.

◆ convert() [3/9]

constexpr double votca::tools::UnitConverter::convert ( const EnergyUnit from,
const EnergyUnit to 
) const
inlineconstexprnoexcept

Definition at line 265 of file unitconverter.h.

◆ convert() [4/9]

constexpr double votca::tools::UnitConverter::convert ( const ForceUnit from,
const ForceUnit to 
) const
inlineconstexprnoexcept

Definition at line 281 of file unitconverter.h.

◆ convert() [5/9]

constexpr double votca::tools::UnitConverter::convert ( const MassUnit from,
const MassUnit to 
) const
inlineconstexprnoexcept

Definition at line 261 of file unitconverter.h.

◆ convert() [6/9]

constexpr double votca::tools::UnitConverter::convert ( const MolarEnergyUnit from,
const MolarEnergyUnit to 
) const
inlineconstexprnoexcept

Definition at line 269 of file unitconverter.h.

◆ convert() [7/9]

constexpr double votca::tools::UnitConverter::convert ( const MolarForceUnit from,
const MolarForceUnit to 
) const
inlineconstexprnoexcept

Definition at line 285 of file unitconverter.h.

◆ convert() [8/9]

constexpr double votca::tools::UnitConverter::convert ( const TimeUnit from,
const TimeUnit to 
) const
inlineconstexprnoexcept

Definition at line 257 of file unitconverter.h.

◆ convert() [9/9]

constexpr double votca::tools::UnitConverter::convert ( const VelocityUnit from,
const VelocityUnit to 
) const
inlineconstexprnoexcept

Definition at line 277 of file unitconverter.h.

◆ getChargeValue_()

constexpr double votca::tools::UnitConverter::getChargeValue_ ( const ChargeUnit enum_type) const
inlineconstexprprivatenoexcept

All charge in terms of elementary charge e.

Definition at line 181 of file unitconverter.h.

◆ getDistanceValue_()

constexpr double votca::tools::UnitConverter::getDistanceValue_ ( const DistanceUnit enum_type) const
inlineconstexprprivatenoexcept

All distances with respect to Ang.

Definition at line 91 of file unitconverter.h.

◆ getEnergyValue_()

constexpr double votca::tools::UnitConverter::getEnergyValue_ ( const EnergyUnit enum_type) const
inlineconstexprprivatenoexcept

All energies in terms of electron volts.

Definition at line 147 of file unitconverter.h.

◆ getForceValue_()

constexpr double votca::tools::UnitConverter::getForceValue_ ( const ForceUnit enum_type) const
inlineconstexprprivatenoexcept

Default force unit is the kilojoules per nanometer.

Definition at line 207 of file unitconverter.h.

◆ getMassValue_()

constexpr double votca::tools::UnitConverter::getMassValue_ ( const MassUnit enum_type) const
inlineconstexprprivatenoexcept

All masses with respect to atomic mass units.

Definition at line 126 of file unitconverter.h.

◆ getMolarEnergyValue_()

constexpr double votca::tools::UnitConverter::getMolarEnergyValue_ ( const MolarEnergyUnit enum_type) const
inlineconstexprprivatenoexcept

Definition at line 164 of file unitconverter.h.

◆ getMolarForceValue_()

constexpr double votca::tools::UnitConverter::getMolarForceValue_ ( const MolarForceUnit enum_type) const
inlineconstexprprivatenoexcept

Default force unit is the kilojoules per mole nanometer.

Definition at line 228 of file unitconverter.h.

◆ getTimeValue_()

constexpr double votca::tools::UnitConverter::getTimeValue_ ( const TimeUnit enum_type) const
inlineconstexprprivatenoexcept

All times with respect to pico seconds.

Definition at line 109 of file unitconverter.h.

◆ getVelocityValue_()

constexpr double votca::tools::UnitConverter::getVelocityValue_ ( const VelocityUnit enum_type) const
inlineconstexprprivatenoexcept

All velocities in terms of nanometers per picosecond.

Definition at line 192 of file unitconverter.h.


The documentation for this class was generated from the following file: