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
feee6d25
Commit
feee6d25
authored
Jul 18, 2014
by
Jason Swails
Browse files
Make NBFIX ordering consistent.
parent
d47cb004
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
wrappers/python/simtk/openmm/app/charmmparameterset.py
wrappers/python/simtk/openmm/app/charmmparameterset.py
+5
-5
wrappers/python/simtk/openmm/app/charmmpsffile.py
wrappers/python/simtk/openmm/app/charmmpsffile.py
+1
-1
No files found.
wrappers/python/simtk/openmm/app/charmmparameterset.py
View file @
feee6d25
...
@@ -446,10 +446,10 @@ class CharmmParameterSet(object):
...
@@ -446,10 +446,10 @@ class CharmmParameterSet(object):
except
IndexError
:
except
IndexError
:
emin14
=
rmin14
=
None
emin14
=
rmin14
=
None
try
:
try
:
self
.
atom_types_str
[
at1
].
add_nbfix
(
at2
,
e
min
,
r
min
,
self
.
atom_types_str
[
at1
].
add_nbfix
(
at2
,
r
min
,
e
min
,
e
min14
,
r
min14
)
r
min14
,
e
min14
)
self
.
atom_types_str
[
at2
].
add_nbfix
(
at1
,
e
min
,
r
min
,
self
.
atom_types_str
[
at2
].
add_nbfix
(
at1
,
r
min
,
e
min
,
e
min14
,
r
min14
)
r
min14
,
e
min14
)
except
KeyError
:
except
KeyError
:
# Some stream files define NBFIX terms with an atom that
# Some stream files define NBFIX terms with an atom that
# is defined in another toppar file that does not
# is defined in another toppar file that does not
...
@@ -460,7 +460,7 @@ class CharmmParameterSet(object):
...
@@ -460,7 +460,7 @@ class CharmmParameterSet(object):
pass
pass
except
IndexError
:
except
IndexError
:
raise
CharmmFileError
(
'Could not parse NBFIX terms.'
)
raise
CharmmFileError
(
'Could not parse NBFIX terms.'
)
self
.
nbfix_types
[(
min
(
at1
,
at2
),
max
(
at1
,
at2
))]
=
(
e
min
,
r
min
)
self
.
nbfix_types
[(
min
(
at1
,
at2
),
max
(
at1
,
at2
))]
=
(
r
min
,
e
min
)
# Now we're done. Load the nonbonded types into the relevant AtomType
# Now we're done. Load the nonbonded types into the relevant AtomType
# instances. In order for this to work, all keys in nonbonded_types
# instances. In order for this to work, all keys in nonbonded_types
# must be in the self.atom_types_str dict. Raise a RuntimeError if this
# must be in the self.atom_types_str dict. Raise a RuntimeError if this
...
...
wrappers/python/simtk/openmm/app/charmmpsffile.py
View file @
feee6d25
...
@@ -1294,7 +1294,7 @@ class CharmmPsfFile(object):
...
@@ -1294,7 +1294,7 @@ class CharmmPsfFile(object):
for
j
in
range
(
num_lj_types
):
for
j
in
range
(
num_lj_types
):
namej
=
lj_type_list
[
j
].
name
namej
=
lj_type_list
[
j
].
name
try
:
try
:
wd
ij
,
r
ij
,
wd
ij14
,
r
ij14
=
lj_type_list
[
i
].
nbfix
[
namej
]
r
ij
,
wd
ij
,
r
ij14
,
wd
ij14
=
lj_type_list
[
i
].
nbfix
[
namej
]
except
KeyError
:
except
KeyError
:
rij
=
(
lj_radii
[
i
]
+
lj_radii
[
j
])
*
length_conv
rij
=
(
lj_radii
[
i
]
+
lj_radii
[
j
])
*
length_conv
wdij
=
sqrt
(
lj_depths
[
i
]
*
lj_depths
[
j
])
*
ene_conv
wdij
=
sqrt
(
lj_depths
[
i
]
*
lj_depths
[
j
])
*
ene_conv
...
...
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