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
38ea6054
Commit
38ea6054
authored
Mar 14, 2017
by
jchodera
Browse files
Fix bug where CHARMM impropers did not respect toroidal boundary conditions
parent
9f6bd494
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
devtools/packaging/README.md
devtools/packaging/README.md
+8
-3
wrappers/python/simtk/openmm/app/charmmpsffile.py
wrappers/python/simtk/openmm/app/charmmpsffile.py
+5
-2
No files found.
devtools/packaging/README.md
View file @
38ea6054
# Packaging OpenMM into ZIP installers
Set your environment variable
`TAG`
to the git tag for the release:
```
bash
# OpenMM 7.1.0rc1
export
TAG
=
"9567ddb"
```
## Source
Start the docker container:
```
bash
docker run
-i
-t
--rm
-v
`
pwd
`
:/io jchodera/omnia-build-box:cuda80-amd30-clang38 bash
docker run
-i
-t
--rm
-e
TAG
-v
`
pwd
`
:/io jchodera/omnia-build-box:cuda80-amd30-clang38 bash
```
Inside the docker container:
```
bash
...
...
@@ -23,7 +29,7 @@ cp packaging/compressed/* /io
Start the docker container:
```
bash
docker run
-i
-t
--rm
-v
`
pwd
`
:/io jchodera/omnia-build-box:cuda80-amd30-clang38 bash
docker run
-i
-t
--rm
-e
TAG
-v
`
pwd
`
:/io jchodera/omnia-build-box:cuda80-amd30-clang38 bash
```
Inside the docker container:
```
bash
...
...
@@ -50,4 +56,3 @@ source openmm/devtools/packaging/scripts/osx/prepare.sh
source
openmm/devtools/packaging/scripts/osx/build.sh
source
openmm/devtools/packaging/scripts/osx/package.sh
```
wrappers/python/simtk/openmm/app/charmmpsffile.py
View file @
38ea6054
...
...
@@ -906,8 +906,11 @@ class CharmmPsfFile(object):
if
verbose
:
print
(
'Adding impropers...'
)
# Ick. OpenMM does not have an improper torsion class. Need to
# construct one from CustomTorsionForce
force
=
mm
.
CustomTorsionForce
(
'k*(theta-theta0)^2'
)
# construct one from CustomTorsionForce that respects toroidal boundaries
energy_function
=
'k*dtheta_torus^2;'
energy_function
+=
'dtheta_torus = dtheta - floor(dtheta/(2*pi)+0.5)*(2*pi);'
energy_function
+=
'dtheta = theta - theta0;'
force
=
mm
.
CustomTorsionForce
(
energy_function
)
force
.
addPerTorsionParameter
(
'k'
)
force
.
addPerTorsionParameter
(
'theta0'
)
force
.
setForceGroup
(
self
.
IMPROPER_FORCE_GROUP
)
...
...
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