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
ba8c16da
Commit
ba8c16da
authored
Aug 01, 2018
by
huangj
Browse files
Fix an indentation bug, and add a testcase for CHARMM Drude force field.
parent
234425d1
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21805 additions
and
1 deletion
+21805
-1
wrappers/python/simtk/openmm/app/charmmpsffile.py
wrappers/python/simtk/openmm/app/charmmpsffile.py
+1
-1
wrappers/python/tests/TestCharmmFiles.py
wrappers/python/tests/TestCharmmFiles.py
+20
-0
wrappers/python/tests/systems/ala3_solv_drude.crd
wrappers/python/tests/systems/ala3_solv_drude.crd
+4647
-0
wrappers/python/tests/systems/ala3_solv_drude.psf
wrappers/python/tests/systems/ala3_solv_drude.psf
+9262
-0
wrappers/python/tests/systems/toppar_drude_master_protein_2013e.str
...ython/tests/systems/toppar_drude_master_protein_2013e.str
+7875
-0
No files found.
wrappers/python/simtk/openmm/app/charmmpsffile.py
View file @
ba8c16da
wrappers/python/tests/TestCharmmFiles.py
View file @
ba8c16da
...
...
@@ -116,6 +116,26 @@ class TestCharmmFiles(unittest.TestCase):
ene
=
state
.
getPotentialEnergy
().
value_in_unit
(
kilocalories_per_mole
)
self
.
assertAlmostEqual
(
ene
,
15490.0033559
,
delta
=
0.05
)
def
test_drude
(
self
):
"""Tests CHARMM systems with Drude force field"""
warnings
.
filterwarnings
(
'ignore'
,
category
=
CharmmPSFWarning
)
psf
=
CharmmPsfFile
(
'systems/ala3_solv_drude.psf'
)
crd
=
CharmmCrdFile
(
'systems/ala3_solv_drude.crd'
)
params
=
CharmmParameterSet
(
'systems/toppar_drude_master_protein_2013e.str'
)
# Box dimensions (cubic box)
psf
.
setBox
(
33.2
*
angstroms
,
33.2
*
angstroms
,
33.2
*
angstroms
)
# Now compute the full energy
plat
=
Platform
.
getPlatformByName
(
'Reference'
)
system
=
psf
.
createSystem
(
params
,
nonbondedMethod
=
PME
)
integrator
=
DrudeLangevinIntegrator
(
300
*
kelvin
,
1.0
/
picosecond
,
1
*
kelvin
,
10
/
picosecond
,
0.001
*
picoseconds
)
con
=
Context
(
system
,
integrator
,
plat
)
con
.
setPositions
(
crd
.
positions
)
state
=
con
.
getState
(
getEnergy
=
True
,
enforcePeriodicBox
=
True
)
ene
=
state
.
getPotentialEnergy
().
value_in_unit
(
kilocalories_per_mole
)
self
.
assertAlmostEqual
(
ene
,
-
1831.54
,
delta
=
0.5
)
def
test_InsCode
(
self
):
""" Test the parsing of PSF files that contain insertion codes in their residue numbers """
psf
=
CharmmPsfFile
(
'systems/4TVP-dmj_wat-ion.psf'
)
...
...
wrappers/python/tests/systems/ala3_solv_drude.crd
0 → 100644
View file @
ba8c16da
This diff is collapsed.
Click to expand it.
wrappers/python/tests/systems/ala3_solv_drude.psf
0 → 100644
View file @
ba8c16da
This diff is collapsed.
Click to expand it.
wrappers/python/tests/systems/toppar_drude_master_protein_2013e.str
0 → 100644
View file @
ba8c16da
This diff is collapsed.
Click to expand it.
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