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
954b7fc6
Commit
954b7fc6
authored
Apr 10, 2020
by
peastman
Browse files
Improved counting of degrees of freedom
parent
089384df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
wrappers/python/simtk/openmm/app/statedatareporter.py
wrappers/python/simtk/openmm/app/statedatareporter.py
+5
-2
No files found.
wrappers/python/simtk/openmm/app/statedatareporter.py
View file @
954b7fc6
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012-20
13
Stanford University and the Authors.
Portions copyright (c) 2012-20
20
Stanford University and the Authors.
Authors: Peter Eastman
Authors: Peter Eastman
Contributors: Robert McGibbon
Contributors: Robert McGibbon
...
@@ -289,7 +289,10 @@ class StateDataReporter(object):
...
@@ -289,7 +289,10 @@ class StateDataReporter(object):
for
i
in
range
(
system
.
getNumParticles
()):
for
i
in
range
(
system
.
getNumParticles
()):
if
system
.
getParticleMass
(
i
)
>
0
*
unit
.
dalton
:
if
system
.
getParticleMass
(
i
)
>
0
*
unit
.
dalton
:
dof
+=
3
dof
+=
3
dof
-=
system
.
getNumConstraints
()
for
i
in
range
(
system
.
getNumConstraints
()):
p1
,
p2
,
distance
=
system
.
getConstraintParameters
(
i
)
if
system
.
getParticleMass
(
p1
)
>
0
*
unit
.
dalton
or
system
.
getParticleMass
(
p2
)
>
0
*
unit
.
dalton
:
dof
-=
1
if
any
(
type
(
system
.
getForce
(
i
))
==
mm
.
CMMotionRemover
for
i
in
range
(
system
.
getNumForces
())):
if
any
(
type
(
system
.
getForce
(
i
))
==
mm
.
CMMotionRemover
for
i
in
range
(
system
.
getNumForces
())):
dof
-=
3
dof
-=
3
self
.
_dof
=
dof
self
.
_dof
=
dof
...
...
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