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
10cc667c
Commit
10cc667c
authored
May 05, 2015
by
peastman
Browse files
Merge pull request #893 from xantares/patch-2
fix swig build
parents
3c328f39
01ae387d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
+14
-14
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
View file @
10cc667c
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
}
}
%
pythoncode
{
%
pythoncode
%
{
def
getState
(
self
,
def
getState
(
self
,
getPositions
=
False
,
getPositions
=
False
,
getVelocities
=
False
,
getVelocities
=
False
,
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
if
state
.
_paramMap
is
not
None
:
if
state
.
_paramMap
is
not
None
:
for
param
in
state
.
_paramMap
:
for
param
in
state
.
_paramMap
:
self
.
setParameter
(
param
,
state
.
_paramMap
[
param
])
self
.
setParameter
(
param
,
state
.
_paramMap
[
param
])
}
%
}
%
feature
(
"docstring"
)
createCheckpoint
"Create a checkpoint recording the current state of the Context.
%
feature
(
"docstring"
)
createCheckpoint
"Create a checkpoint recording the current state of the Context.
This should be treated as an opaque block of binary data. See loadCheckpoint() for more details.
This should be treated as an opaque block of binary data. See loadCheckpoint() for more details.
...
@@ -175,7 +175,7 @@ Parameters:
...
@@ -175,7 +175,7 @@ Parameters:
}
}
%
pythoncode
{
%
pythoncode
%
{
def
getState
(
self
,
def
getState
(
self
,
copy
,
copy
,
getPositions
=
False
,
getPositions
=
False
,
...
@@ -235,11 +235,11 @@ Parameters:
...
@@ -235,11 +235,11 @@ Parameters:
periodicBoxVectorsList
=
periodicBoxVectorsList
,
periodicBoxVectorsList
=
periodicBoxVectorsList
,
paramMap
=
paramMap
)
paramMap
=
paramMap
)
return
state
return
state
}
%
}
}
}
%
extend
OpenMM
::
NonbondedForce
{
%
extend
OpenMM
::
NonbondedForce
{
%
pythoncode
{
%
pythoncode
%
{
def
addParticle_usingRVdw
(
self
,
charge
,
rVDW
,
epsilon
)
:
def
addParticle_usingRVdw
(
self
,
charge
,
rVDW
,
epsilon
)
:
"""Add particle using elemetrary charge. Rvdw and epsilon,
"""Add particle using elemetrary charge. Rvdw and epsilon,
which is consistent with AMBER parameter file usage.
which is consistent with AMBER parameter file usage.
...
@@ -260,11 +260,11 @@ Parameters:
...
@@ -260,11 +260,11 @@ Parameters:
"""
"""
return
self
.
addException
(
particle1
,
particle2
,
return
self
.
addException
(
particle1
,
particle2
,
chargeProd
,
rMin
/
RMIN_PER_SIGMA
,
epsilon
)
chargeProd
,
rMin
/
RMIN_PER_SIGMA
,
epsilon
)
}
%
}
}
}
%
extend
OpenMM
::
System
{
%
extend
OpenMM
::
System
{
%
pythoncode
{
%
pythoncode
%
{
def
__getstate__
(
self
)
:
def
__getstate__
(
self
)
:
serializationString
=
XmlSerializer
.
serializeSystem
(
self
)
serializationString
=
XmlSerializer
.
serializeSystem
(
self
)
return
serializationString
return
serializationString
...
@@ -275,7 +275,7 @@ Parameters:
...
@@ -275,7 +275,7 @@ Parameters:
def
getForces
(
self
)
:
def
getForces
(
self
)
:
"""Get the list of Forces in this System"""
"""Get the list of Forces in this System"""
return
[
self
.
getForce
(
i
)
for
i
in
range
(
self
.
getNumForces
())]
return
[
self
.
getForce
(
i
)
for
i
in
range
(
self
.
getNumForces
())]
}
%
}
}
}
%
extend
OpenMM
::
XmlSerializer
{
%
extend
OpenMM
::
XmlSerializer
{
...
@@ -345,7 +345,7 @@ Parameters:
...
@@ -345,7 +345,7 @@ Parameters:
return
obj
;
return
obj
;
}
}
%
pythoncode
{
%
pythoncode
%
{
@
staticmethod
@
staticmethod
def
_serializeState
(
pythonState
)
:
def
_serializeState
(
pythonState
)
:
positions
=
[]
positions
=
[]
...
@@ -431,7 +431,7 @@ Parameters:
...
@@ -431,7 +431,7 @@ Parameters:
if
type
==
"State"
:
if
type
==
"State"
:
return
XmlSerializer
.
_deserializeState
(
inputString
)
return
XmlSerializer
.
_deserializeState
(
inputString
)
raise
ValueError
(
"Unsupported object type"
)
raise
ValueError
(
"Unsupported object type"
)
}
%
}
}
}
%
extend
OpenMM
::
CustomIntegrator
{
%
extend
OpenMM
::
CustomIntegrator
{
...
@@ -443,7 +443,7 @@ Parameters:
...
@@ -443,7 +443,7 @@ Parameters:
}
}
%
extend
OpenMM
::
Force
{
%
extend
OpenMM
::
Force
{
%
pythoncode
{
%
pythoncode
%
{
def
__copy__
(
self
)
:
def
__copy__
(
self
)
:
copy
=
self
.
__class__
.
__new__
(
self
.
__class__
)
copy
=
self
.
__class__
.
__new__
(
self
.
__class__
)
copy
.
__init__
(
self
)
copy
.
__init__
(
self
)
...
@@ -451,11 +451,11 @@ Parameters:
...
@@ -451,11 +451,11 @@ Parameters:
def
__deepcopy__
(
self
,
memo
)
:
def
__deepcopy__
(
self
,
memo
)
:
return
self
.
__copy__
()
return
self
.
__copy__
()
}
%
}
}
}
%
extend
OpenMM
::
Integrator
{
%
extend
OpenMM
::
Integrator
{
%
pythoncode
{
%
pythoncode
%
{
def
__getstate__
(
self
)
:
def
__getstate__
(
self
)
:
serializationString
=
XmlSerializer
.
serialize
(
self
)
serializationString
=
XmlSerializer
.
serialize
(
self
)
return
serializationString
return
serializationString
...
@@ -463,5 +463,5 @@ Parameters:
...
@@ -463,5 +463,5 @@ Parameters:
def
__setstate__
(
self
,
serializationString
)
:
def
__setstate__
(
self
,
serializationString
)
:
system
=
XmlSerializer
.
deserialize
(
serializationString
)
system
=
XmlSerializer
.
deserialize
(
serializationString
)
self
.
this
=
system
.
this
self
.
this
=
system
.
this
}
%
}
}
}
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