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
77524af3
Commit
77524af3
authored
May 27, 2015
by
peastman
Browse files
Merge pull request #935 from swails/gmx-genpairs
support gen-pairs=no in Gromacs
parents
142fc4da
deb6d66c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
wrappers/python/simtk/openmm/app/gromacstopfile.py
wrappers/python/simtk/openmm/app/gromacstopfile.py
+5
-1
No files found.
wrappers/python/simtk/openmm/app/gromacstopfile.py
View file @
77524af3
...
@@ -264,7 +264,7 @@ class GromacsTopFile(object):
...
@@ -264,7 +264,7 @@ class GromacsTopFile(object):
if
fields
[
1
]
!=
'2'
:
if
fields
[
1
]
!=
'2'
:
raise
ValueError
(
'Unsupported combination rule: '
+
fields
[
1
])
raise
ValueError
(
'Unsupported combination rule: '
+
fields
[
1
])
if
fields
[
2
].
lower
()
==
'no'
:
if
fields
[
2
].
lower
()
==
'no'
:
raise
ValueError
(
'
gen
_
pairs
=no is not supported'
)
self
.
_
genpairs
=
False
self
.
_defaults
=
fields
self
.
_defaults
=
fields
def
_processMoleculeType
(
self
,
line
):
def
_processMoleculeType
(
self
,
line
):
...
@@ -452,6 +452,7 @@ class GromacsTopFile(object):
...
@@ -452,6 +452,7 @@ class GromacsTopFile(object):
# constraint distances and exclusions.
# constraint distances and exclusions.
self
.
_defines
=
OrderedDict
()
self
.
_defines
=
OrderedDict
()
self
.
_defines
[
'FLEXIBLE'
]
=
True
self
.
_defines
[
'FLEXIBLE'
]
=
True
self
.
_genpairs
=
True
if
defines
is
not
None
:
if
defines
is
not
None
:
for
define
,
value
in
defines
.
iteritems
():
for
define
,
value
in
defines
.
iteritems
():
self
.
_defines
[
define
]
=
value
self
.
_defines
[
define
]
=
value
...
@@ -822,6 +823,9 @@ class GromacsTopFile(object):
...
@@ -822,6 +823,9 @@ class GromacsTopFile(object):
params
=
self
.
_pairTypes
[
types
][
3
:
5
]
params
=
self
.
_pairTypes
[
types
][
3
:
5
]
elif
types
[::
-
1
]
in
self
.
_pairTypes
:
elif
types
[::
-
1
]
in
self
.
_pairTypes
:
params
=
self
.
_pairTypes
[
types
[::
-
1
]][
3
:
5
]
params
=
self
.
_pairTypes
[
types
[::
-
1
]][
3
:
5
]
elif
not
self
.
_genpairs
:
raise
ValueError
(
'No pair parameters defined for atom '
'types %s and gen-pairs is "no"'
%
types
)
else
:
else
:
continue
# We'll use the automatically generated parameters
continue
# We'll use the automatically generated parameters
atom1params
=
nb
.
getParticleParameters
(
baseAtomIndex
+
atoms
[
0
])
atom1params
=
nb
.
getParticleParameters
(
baseAtomIndex
+
atoms
[
0
])
...
...
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