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
dbd7fd3a
Commit
dbd7fd3a
authored
Nov 10, 2014
by
peastman
Browse files
Merge pull request #715 from mpharrigan/py3
Python 3 compatitbility
parents
20f00d80
47b73dfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
wrappers/python/simtk/openmm/app/dcdfile.py
wrappers/python/simtk/openmm/app/dcdfile.py
+3
-3
wrappers/python/simtk/openmm/app/statedatareporter.py
wrappers/python/simtk/openmm/app/statedatareporter.py
+1
-1
No files found.
wrappers/python/simtk/openmm/app/dcdfile.py
View file @
dbd7fd3a
...
@@ -70,10 +70,10 @@ class DCDFile(object):
...
@@ -70,10 +70,10 @@ class DCDFile(object):
boxFlag
=
0
boxFlag
=
0
if
topology
.
getUnitCellDimensions
()
is
not
None
:
if
topology
.
getUnitCellDimensions
()
is
not
None
:
boxFlag
=
1
boxFlag
=
1
header
=
struct
.
pack
(
'<i4c9if'
,
84
,
'C'
,
'O'
,
'R'
,
'D'
,
0
,
firstStep
,
interval
,
0
,
0
,
0
,
0
,
0
,
0
,
dt
)
header
=
struct
.
pack
(
'<i4c9if'
,
84
,
b
'C'
,
b
'O'
,
b
'R'
,
b
'D'
,
0
,
firstStep
,
interval
,
0
,
0
,
0
,
0
,
0
,
0
,
dt
)
header
+=
struct
.
pack
(
'<13i'
,
boxFlag
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
24
,
84
,
164
,
2
)
header
+=
struct
.
pack
(
'<13i'
,
boxFlag
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
24
,
84
,
164
,
2
)
header
+=
struct
.
pack
(
'<80s'
,
'Created by OpenMM'
)
header
+=
struct
.
pack
(
'<80s'
,
b
'Created by OpenMM'
)
header
+=
struct
.
pack
(
'<80s'
,
'Created '
+
time
.
asctime
(
time
.
localtime
(
time
.
time
())))
header
+=
struct
.
pack
(
'<80s'
,
b
'Created '
+
bytes
(
time
.
asctime
(
time
.
localtime
(
time
.
time
()))
,
'ascii'
)
)
header
+=
struct
.
pack
(
'<4i'
,
164
,
4
,
len
(
list
(
topology
.
atoms
())),
4
)
header
+=
struct
.
pack
(
'<4i'
,
164
,
4
,
len
(
list
(
topology
.
atoms
())),
4
)
file
.
write
(
header
)
file
.
write
(
header
)
...
...
wrappers/python/simtk/openmm/app/statedatareporter.py
View file @
dbd7fd3a
...
@@ -99,7 +99,7 @@ class StateDataReporter(object):
...
@@ -99,7 +99,7 @@ class StateDataReporter(object):
raise
RuntimeError
(
"Cannot write .bz2 file because Python could not import bz2 library"
)
raise
RuntimeError
(
"Cannot write .bz2 file because Python could not import bz2 library"
)
self
.
_out
=
bz2
.
BZ2File
(
file
,
'w'
,
0
)
self
.
_out
=
bz2
.
BZ2File
(
file
,
'w'
,
0
)
else
:
else
:
self
.
_out
=
open
(
file
,
'w'
,
0
)
self
.
_out
=
open
(
file
,
'w'
)
else
:
else
:
self
.
_out
=
file
self
.
_out
=
file
self
.
_step
=
step
self
.
_step
=
step
...
...
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