Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
5b1faed9
Commit
5b1faed9
authored
May 18, 2011
by
Peter Eastman
Browse files
Fixed incorrect abbreviations for charge units
parent
798e651a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
wrappers/python/simtk/unit/baseunit.py
wrappers/python/simtk/unit/baseunit.py
+1
-1
wrappers/python/simtk/unit/unit_definitions.py
wrappers/python/simtk/unit/unit_definitions.py
+2
-2
No files found.
wrappers/python/simtk/unit/baseunit.py
View file @
5b1faed9
...
...
@@ -26,7 +26,7 @@ class BaseUnit(object):
- self: The newly created BaseUnit.
- base_dim: (BaseDimension) The dimension of the new unit, e.g. 'mass'
- name: (string) Name of the unit, e.g. "kilogram"
- symbol: (string) Symbol for the unit, e.g. 'kg'. This sym
o
bol will
- symbol: (string) Symbol for the unit, e.g. 'kg'. This symbol will
appear in
Quantity string descriptions.
"""
self
.
dimension
=
base_dim
...
...
wrappers/python/simtk/unit/unit_definitions.py
View file @
5b1faed9
...
...
@@ -108,10 +108,10 @@ planck_temperature_base_unit.define_conversion_factor_to(kelvin_base_unit, 1.416
### CHARGE ###
##############
elementary_charge_base_unit
=
BaseUnit
(
charge_dimension
,
"elementary charge"
,
"
q
"
)
elementary_charge_base_unit
=
BaseUnit
(
charge_dimension
,
"elementary charge"
,
"
e
"
)
elementary_charges
=
elementary_charge
=
Unit
({
elementary_charge_base_unit
:
1.0
})
coulomb_base_unit
=
BaseUnit
(
charge_dimension
,
"elementary charge"
,
"
q
"
)
coulomb_base_unit
=
BaseUnit
(
charge_dimension
,
"elementary charge"
,
"
C
"
)
# Exact conversion factor
coulomb_base_unit
.
define_conversion_factor_to
(
elementary_charge_base_unit
,
6.24150962915265e18
)
coulombs
=
coulomb
=
Unit
({
coulomb_base_unit
:
1.0
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment