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
6786edce
Commit
6786edce
authored
Mar 08, 2016
by
ChayaSt
Browse files
added test for L-J generator
parent
f3e28c4d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+11
-9
No files found.
wrappers/python/tests/TestForceField.py
View file @
6786edce
...
@@ -536,8 +536,8 @@ class AmoebaTestForceField(unittest.TestCase):
...
@@ -536,8 +536,8 @@ class AmoebaTestForceField(unittest.TestCase):
diff
=
norm
(
f1
-
f2
)
diff
=
norm
(
f1
-
f2
)
self
.
assertTrue
(
diff
<
0.1
or
diff
/
norm
(
f1
)
<
1e-3
)
self
.
assertTrue
(
diff
<
0.1
or
diff
/
norm
(
f1
)
<
1e-3
)
def
test_
nbfix
_generator
(
self
):
def
test_
LennardJones
_generator
(
self
):
""" Test the
nbfix
generator"""
""" Test the
LennardJones
generator"""
warnings
.
filterwarnings
(
'ignore'
,
category
=
CharmmPSFWarning
)
warnings
.
filterwarnings
(
'ignore'
,
category
=
CharmmPSFWarning
)
psf
=
CharmmPsfFile
(
'systems/ions.psf'
)
psf
=
CharmmPsfFile
(
'systems/ions.psf'
)
pdb
=
PDBFile
(
'systems/ions.pdb'
)
pdb
=
PDBFile
(
'systems/ions.pdb'
)
...
@@ -567,20 +567,22 @@ class AmoebaTestForceField(unittest.TestCase):
...
@@ -567,20 +567,22 @@ class AmoebaTestForceField(unittest.TestCase):
</AtomTypes>
</AtomTypes>
<Residues>
<Residues>
<Residue name="CLA">
<Residue name="CLA">
<Atom name="CLA" type="CLA" charge="0"/>
<Atom name="CLA" type="CLA" charge="0
.0
"/>
</Residue>
</Residue>
<Residue name="SOD">
<Residue name="SOD">
<Atom name="SOD" type="SOD" charge="0"/>
<Atom name="SOD" type="SOD" charge="0
.0
"/>
</Residue>
</Residue>
</Residues>
</Residues>
<NonbondedForce coulomb14scale="1.0" lj14scale="1.0">
<NonbondedForce coulomb14scale="1.0" lj14scale="1.0">
<UseAttributeFromResidue name="charge"/>
<UseAttributeFromResidue name="charge"/>
<Atom type="SOD" sigma="
0.251367073323
" epsilon="0.
1962296
"/>
<Atom type="SOD" sigma="
1.0
" epsilon="0.
0
"/>
<Atom type="CLA" sigma="
0.404468018036
" epsilon="0.
6276
"/>
<Atom type="CLA" sigma="
1.0
" epsilon="0.
0
"/>
</NonbondedForce>
</NonbondedForce>
<NBFixForce>
<LennardJonesForce lj14scale="1.0">
<NBFix type1="CLA" type2="SOD" emin="0.350933" rmin="0.3731"/>
<Atom type="CLA" sigma="0.404468018036" epsilon="0.6276"/>
</NBFixForce>
<Atom type="SOD" sigma="0.251367073323" epsilon="0.1962296"/>
<AtomTypePair type1="CLA" type2="SOD" emin="0.350933" rmin="0.3731"/>
</LennardJonesForce>
</ForceField> """
</ForceField> """
ff
=
ForceField
(
StringIO
(
xml
))
ff
=
ForceField
(
StringIO
(
xml
))
...
...
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