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
e4a743ad
Unverified
Commit
e4a743ad
authored
Apr 10, 2020
by
peastman
Committed by
GitHub
Apr 10, 2020
Browse files
Merge pull request #2639 from peastman/dof
Improved counting of degrees of freedom
parents
089384df
954b7fc6
Changes
1
Show 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 @
e4a743ad
...
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
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
Contributors: Robert McGibbon
...
...
@@ -289,7 +289,10 @@ class StateDataReporter(object):
for
i
in
range
(
system
.
getNumParticles
()):
if
system
.
getParticleMass
(
i
)
>
0
*
unit
.
dalton
:
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
())):
dof
-=
3
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