Accessing physical constants
Physical constants in different units used in LAMMPS (for example, SI, "real", and "metal") are available using arrow operators from force.h
. A list of these constants is shown in the following screenshot:
As you can see in the preceding screenshot, force.h
only contains the variables names that represent the various physical constants. The numeric values of these constants are provided in update.cpp
, which imports force.h
and assigns values to these variables in the Update::set_units()
method, as shown in the following screenshot:
The constants in the correct unit are retrieved by the Update::set_units()
method when they are accessed from other classes. For example...