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
fd1cfdd6
Unverified
Commit
fd1cfdd6
authored
Nov 13, 2021
by
Peter Eastman
Committed by
GitHub
Nov 13, 2021
Browse files
Removed more unnecessarily restrictive parameter checks (#3326)
parent
0993868a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
openmmapi/src/HarmonicAngleForceImpl.cpp
openmmapi/src/HarmonicAngleForceImpl.cpp
+0
-2
openmmapi/src/NonbondedForceImpl.cpp
openmmapi/src/NonbondedForceImpl.cpp
+2
-6
No files found.
openmmapi/src/HarmonicAngleForceImpl.cpp
View file @
fd1cfdd6
...
@@ -64,8 +64,6 @@ void HarmonicAngleForceImpl::initialize(ContextImpl& context) {
...
@@ -64,8 +64,6 @@ void HarmonicAngleForceImpl::initialize(ContextImpl& context) {
}
}
if
(
angle
<
0
||
angle
>
M_PI
*
1.000001
)
if
(
angle
<
0
||
angle
>
M_PI
*
1.000001
)
throw
OpenMMException
(
"HarmonicAngleForce: angle must be between 0 and pi"
);
throw
OpenMMException
(
"HarmonicAngleForce: angle must be between 0 and pi"
);
if
(
k
<
0
)
throw
OpenMMException
(
"HarmonicAngleForce: force constant cannot be negative"
);
}
}
kernel
=
context
.
getPlatform
().
createKernel
(
CalcHarmonicAngleForceKernel
::
Name
(),
context
);
kernel
=
context
.
getPlatform
().
createKernel
(
CalcHarmonicAngleForceKernel
::
Name
(),
context
);
kernel
.
getAs
<
CalcHarmonicAngleForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
kernel
.
getAs
<
CalcHarmonicAngleForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
...
...
openmmapi/src/NonbondedForceImpl.cpp
View file @
fd1cfdd6
...
@@ -93,8 +93,8 @@ void NonbondedForceImpl::initialize(ContextImpl& context) {
...
@@ -93,8 +93,8 @@ void NonbondedForceImpl::initialize(ContextImpl& context) {
}
}
exceptions
[
particle
[
0
]].
insert
(
particle
[
1
]);
exceptions
[
particle
[
0
]].
insert
(
particle
[
1
]);
exceptions
[
particle
[
1
]].
insert
(
particle
[
0
]);
exceptions
[
particle
[
1
]].
insert
(
particle
[
0
]);
if
(
sigma
<
=
0
)
if
(
sigma
<
0
)
throw
OpenMMException
(
"NonbondedForce: sigma for an exception
mus
t be
posi
tive"
);
throw
OpenMMException
(
"NonbondedForce: sigma for an exception
canno
t be
nega
tive"
);
if
(
epsilon
<
0
)
if
(
epsilon
<
0
)
throw
OpenMMException
(
"NonbondedForce: epsilon for an exception cannot be negative"
);
throw
OpenMMException
(
"NonbondedForce: epsilon for an exception cannot be negative"
);
}
}
...
@@ -121,10 +121,6 @@ void NonbondedForceImpl::initialize(ContextImpl& context) {
...
@@ -121,10 +121,6 @@ void NonbondedForceImpl::initialize(ContextImpl& context) {
msg
<<
exceptionIndex
;
msg
<<
exceptionIndex
;
throw
OpenMMException
(
msg
.
str
());
throw
OpenMMException
(
msg
.
str
());
}
}
if
(
sigmaScale
<
0
)
throw
OpenMMException
(
"NonbondedForce: sigma scale for a particle parameter offset cannot be negative"
);
if
(
epsilonScale
<
0
)
throw
OpenMMException
(
"NonbondedForce: epsilon scale for a particle parameter offset cannot be negative"
);
}
}
if
(
owner
.
getNonbondedMethod
()
!=
NonbondedForce
::
NoCutoff
&&
owner
.
getNonbondedMethod
()
!=
NonbondedForce
::
CutoffNonPeriodic
)
{
if
(
owner
.
getNonbondedMethod
()
!=
NonbondedForce
::
NoCutoff
&&
owner
.
getNonbondedMethod
()
!=
NonbondedForce
::
CutoffNonPeriodic
)
{
Vec3
boxVectors
[
3
];
Vec3
boxVectors
[
3
];
...
...
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