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
ee1ec687
Commit
ee1ec687
authored
Apr 21, 2012
by
Peter Eastman
Browse files
Report density in g/mL
parent
de366ef7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
wrappers/python/simtk/openmm/app/statedatareporter.py
wrappers/python/simtk/openmm/app/statedatareporter.py
+2
-2
No files found.
wrappers/python/simtk/openmm/app/statedatareporter.py
View file @
ee1ec687
...
...
@@ -132,7 +132,7 @@ class StateDataReporter(object):
if
self
.
_volume
:
headers
.
append
(
'Box Volume (nm^3)'
)
if
self
.
_density
:
headers
.
append
(
'Density (
amu/nm^3
)'
)
headers
.
append
(
'Density (
g/mL
)'
)
print
>>
self
.
_out
,
'#"%s"'
%
(
'"'
+
self
.
_separator
+
'"'
).
join
(
headers
)
self
.
_hasInitialized
=
True
...
...
@@ -156,7 +156,7 @@ class StateDataReporter(object):
if
self
.
_volume
:
values
.
append
(
volume
.
value_in_unit
(
unit
.
nanometer
**
3
))
if
self
.
_density
:
values
.
append
((
self
.
_totalMass
/
volume
).
value_in_unit
(
unit
.
dalton
/
unit
.
nanometer
**
3
))
values
.
append
((
self
.
_totalMass
/
volume
).
value_in_unit
(
unit
.
gram
/
unit
.
item
/
unit
.
milliliter
))
print
>>
self
.
_out
,
self
.
_separator
.
join
(
str
(
v
)
for
v
in
values
)
def
__del__
(
self
):
...
...
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