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
28423ca1
Commit
28423ca1
authored
Oct 01, 2015
by
Jason Swails
Browse files
Fix units of returned dipoles and quadrupoles from AmoebaMultipoleForce.
Now that I have my head on straight, that is.
parent
eb1293f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+2
-2
wrappers/python/tests/TestAPIUnits.py
wrappers/python/tests/TestAPIUnits.py
+6
-6
No files found.
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
28423ca1
...
@@ -256,8 +256,8 @@ UNITS = {
...
@@ -256,8 +256,8 @@ UNITS = {
# void getCovalentMap(int index, CovalentType typeId, std::vector<int>& covalentAtoms )
# void getCovalentMap(int index, CovalentType typeId, std::vector<int>& covalentAtoms )
# void getCovalentMaps(int index, std::vector < std::vector<int> >& covalentLists )
# void getCovalentMaps(int index, std::vector < std::vector<int> >& covalentLists )
(
"AmoebaMultipoleForce"
,
"getMultipoleParameters"
)
:
(
None
,
(
'unit.elementary_charge'
,
'unit.elementary_charge
/
unit.nanometer'
,
(
"AmoebaMultipoleForce"
,
"getMultipoleParameters"
)
:
(
None
,
(
'unit.elementary_charge'
,
'unit.elementary_charge
*
unit.nanometer'
,
'unit.elementary_charge
/
unit.nanometer**2'
,
None
,
None
,
None
,
None
,
None
,
None
,
'unit.elementary_charge
*
unit.nanometer**2'
,
None
,
None
,
None
,
None
,
None
,
None
,
'unit.nanometer**3'
)),
'unit.nanometer**3'
)),
(
"AmoebaMultipoleForce"
,
"getCovalentMap"
)
:
(
None
,
()),
(
"AmoebaMultipoleForce"
,
"getCovalentMap"
)
:
(
None
,
()),
(
"AmoebaMultipoleForce"
,
"getCovalentMaps"
)
:
(
None
,
()),
(
"AmoebaMultipoleForce"
,
"getCovalentMaps"
)
:
(
None
,
()),
...
...
wrappers/python/tests/TestAPIUnits.py
View file @
28423ca1
...
@@ -1074,8 +1074,8 @@ class TestAPIUnits(unittest.TestCase):
...
@@ -1074,8 +1074,8 @@ class TestAPIUnits(unittest.TestCase):
force
.
addMultipole
(
1.0
,
[
0.5
,
0
,
-
0.5
],
list
(
range
(
9
)),
force
.
addMultipole
(
1.0
,
[
0.5
,
0
,
-
0.5
],
list
(
range
(
9
)),
AmoebaMultipoleForce
.
ZThenX
,
1
,
2
,
3
,
0.5
,
0.5
,
1.0
)
AmoebaMultipoleForce
.
ZThenX
,
1
,
2
,
3
,
0.5
,
0.5
,
1.0
)
force
.
addMultipole
(
1.0
*
elementary_charge
,
[
0.5
,
0
,
-
0.5
]
*
elementary_charge
/
angstrom
,
force
.
addMultipole
(
1.0
*
elementary_charge
,
[
0.5
,
0
,
-
0.5
]
*
elementary_charge
*
angstrom
,
list
(
range
(
9
))
*
elementary_charge
/
angstrom
**
2
,
list
(
range
(
9
))
*
elementary_charge
*
angstrom
**
2
,
AmoebaMultipoleForce
.
Bisector
,
2
,
3
,
4
,
0.5
,
0.5
,
1.0
*
angstrom
**
3
)
AmoebaMultipoleForce
.
Bisector
,
2
,
3
,
4
,
0.5
,
0.5
,
1.0
*
angstrom
**
3
)
self
.
assertEqual
(
force
.
getNumMultipoles
(),
2
)
self
.
assertEqual
(
force
.
getNumMultipoles
(),
2
)
...
@@ -1083,8 +1083,8 @@ class TestAPIUnits(unittest.TestCase):
...
@@ -1083,8 +1083,8 @@ class TestAPIUnits(unittest.TestCase):
q
,
mu
,
quad
,
ax
,
i
,
j
,
k
,
thole
,
damp
,
polarity
=
force
.
getMultipoleParameters
(
0
)
q
,
mu
,
quad
,
ax
,
i
,
j
,
k
,
thole
,
damp
,
polarity
=
force
.
getMultipoleParameters
(
0
)
self
.
assertEqual
(
q
,
1.0
*
elementary_charge
)
self
.
assertEqual
(
q
,
1.0
*
elementary_charge
)
self
.
assertEqual
(
mu
,
(
0.5
,
0
,
-
0.5
)
*
elementary_charge
/
nanometer
)
self
.
assertEqual
(
mu
,
(
0.5
,
0
,
-
0.5
)
*
elementary_charge
*
nanometer
)
self
.
assertEqual
(
quad
,
tuple
(
range
(
9
))
*
elementary_charge
/
nanometer
**
2
)
self
.
assertEqual
(
quad
,
tuple
(
range
(
9
))
*
elementary_charge
*
nanometer
**
2
)
self
.
assertEqual
(
ax
,
AmoebaMultipoleForce
.
ZThenX
)
self
.
assertEqual
(
ax
,
AmoebaMultipoleForce
.
ZThenX
)
self
.
assertEqual
(
i
,
1
)
self
.
assertEqual
(
i
,
1
)
self
.
assertEqual
(
j
,
2
)
self
.
assertEqual
(
j
,
2
)
...
@@ -1096,8 +1096,8 @@ class TestAPIUnits(unittest.TestCase):
...
@@ -1096,8 +1096,8 @@ class TestAPIUnits(unittest.TestCase):
q
,
mu
,
quad
,
ax
,
i
,
j
,
k
,
thole
,
damp
,
polarity
=
force
.
getMultipoleParameters
(
1
)
q
,
mu
,
quad
,
ax
,
i
,
j
,
k
,
thole
,
damp
,
polarity
=
force
.
getMultipoleParameters
(
1
)
self
.
assertEqual
(
q
,
1.0
*
elementary_charge
)
self
.
assertEqual
(
q
,
1.0
*
elementary_charge
)
self
.
assertEqual
(
mu
,
(
0.5
,
0
,
-
0.5
)
*
elementary_charge
/
angstrom
)
self
.
assertEqual
(
mu
,
(
0.5
,
0
,
-
0.5
)
*
elementary_charge
*
angstrom
)
self
.
assertAlmostEqualUnitArray
(
quad
,
tuple
(
range
(
9
))
*
elementary_charge
/
angstrom
**
2
)
self
.
assertAlmostEqualUnitArray
(
quad
,
tuple
(
range
(
9
))
*
elementary_charge
*
angstrom
**
2
)
self
.
assertEqual
(
ax
,
AmoebaMultipoleForce
.
Bisector
)
self
.
assertEqual
(
ax
,
AmoebaMultipoleForce
.
Bisector
)
self
.
assertEqual
(
i
,
2
)
self
.
assertEqual
(
i
,
2
)
self
.
assertEqual
(
j
,
3
)
self
.
assertEqual
(
j
,
3
)
...
...
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