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
f38da875
Commit
f38da875
authored
Aug 02, 2019
by
Andreas Krämer
Browse files
added fixes for issue #2353
parent
59dfbc18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
wrappers/python/simtk/openmm/app/charmmpsffile.py
wrappers/python/simtk/openmm/app/charmmpsffile.py
+8
-5
No files found.
wrappers/python/simtk/openmm/app/charmmpsffile.py
View file @
f38da875
...
...
@@ -335,9 +335,9 @@ class CharmmPsfFile(object):
set_molecules
(
atom_list
)
molecule_list
=
[
atom
.
marked
for
atom
in
atom_list
]
if
len
(
holder
)
==
len
(
atom_list
):
if
molecule_list
!=
holder
:
warnings
.
warn
(
'Detected PSF molecule section that is WRONG. '
'Resetting molecularity.'
,
CharmmPSFWarning
)
#
if molecule_list != holder:
#
warnings.warn('Detected PSF molecule section that is WRONG. '
#
'Resetting molecularity.', CharmmPSFWarning)
# We have a CHARMM PSF file; now do NUMLP/NUMLPH sections
numlp
,
numlph
=
psfsections
[
'NUMLP NUMLPH'
][
0
]
if
numlp
!=
0
or
numlph
!=
0
:
...
...
@@ -632,13 +632,16 @@ class CharmmPsfFile(object):
last_chain
=
None
last_residue
=
None
is_new_chain
=
False
# Add each chain (separate 'system's) and residue
for
atom
in
self
.
atom_list
:
resid
=
'%d%s'
%
(
atom
.
residue
.
idx
,
atom
.
residue
.
inscode
)
if
atom
.
system
!=
last_chain
:
chain
=
topology
.
addChain
(
atom
.
system
)
last_chain
=
atom
.
system
if
resid
!=
last_residue
:
is_new_chain
=
True
if
resid
!=
last_residue
or
is_new_chain
:
is_new_chain
=
False
last_residue
=
resid
residue
=
topology
.
addResidue
(
atom
.
residue
.
resname
,
chain
,
resid
)
if
atom
.
type
is
not
None
:
...
...
@@ -963,6 +966,7 @@ class CharmmPsfFile(object):
# Add nonbonded terms now
if
verbose
:
print
(
'Adding nonbonded interactions...'
)
force
=
mm
.
NonbondedForce
()
force
.
setUseDispersionCorrection
(
False
)
force
.
setForceGroup
(
self
.
NONBONDED_FORCE_GROUP
)
if
not
hasbox
:
# non-periodic
if
nonbondedMethod
is
ff
.
NoCutoff
:
...
...
@@ -1102,7 +1106,6 @@ class CharmmPsfFile(object):
if
(
nonbondedMethod
in
(
ff
.
PME
,
ff
.
LJPME
,
ff
.
Ewald
,
ff
.
CutoffPeriodic
)):
cforce
.
setNonbondedMethod
(
cforce
.
CutoffPeriodic
)
cforce
.
setCutoffDistance
(
nonbondedCutoff
)
cforce
.
setUseLongRangeCorrection
(
True
)
elif
nonbondedMethod
is
ff
.
NoCutoff
:
cforce
.
setNonbondedMethod
(
cforce
.
NoCutoff
)
elif
nonbondedMethod
is
ff
.
CutoffNonPeriodic
:
...
...
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