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
53690fef
Commit
53690fef
authored
Jan 08, 2015
by
Peter Eastman
Browse files
Do not allow Ewald to be used with triclinic boxes, since it isn't implemented.
parent
295ae001
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
openmmapi/src/NonbondedForceImpl.cpp
openmmapi/src/NonbondedForceImpl.cpp
+3
-1
No files found.
openmmapi/src/NonbondedForceImpl.cpp
View file @
53690fef
...
...
@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2008-201
4
Stanford University and the Authors. *
* Portions copyright (c) 2008-201
5
Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
...
...
@@ -98,6 +98,8 @@ void NonbondedForceImpl::initialize(ContextImpl& context) {
double
cutoff
=
owner
.
getCutoffDistance
();
if
(
cutoff
>
0.5
*
boxVectors
[
0
][
0
]
||
cutoff
>
0.5
*
boxVectors
[
1
][
1
]
||
cutoff
>
0.5
*
boxVectors
[
2
][
2
])
throw
OpenMMException
(
"NonbondedForce: The cutoff distance cannot be greater than half the periodic box size."
);
if
(
owner
.
getNonbondedMethod
()
==
NonbondedForce
::
Ewald
&&
(
boxVectors
[
1
][
0
]
!=
0.0
||
boxVectors
[
2
][
0
]
!=
0.0
||
boxVectors
[
2
][
1
]
!=
0
))
throw
OpenMMException
(
"NonbondedForce: Ewald is not supported with non-rectangular boxes. Use PME instead."
);
}
kernel
.
getAs
<
CalcNonbondedForceKernel
>
().
initialize
(
context
.
getSystem
(),
owner
);
}
...
...
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