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
25ff85b7
"serialization/src/RBTorsionForceProxy.cpp" did not exist on "3d750e8517a73f39fce1de63a5f36d26f6a3d38c"
Commit
25ff85b7
authored
Oct 09, 2019
by
joaorodrigues
Browse files
Added test to check for proper read/write of PDBx/mmCIF files
parent
29d05aa7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
wrappers/python/tests/TestPdbxFile.py
wrappers/python/tests/TestPdbxFile.py
+23
-1
No files found.
wrappers/python/tests/TestPdbxFile.py
View file @
25ff85b7
...
@@ -12,6 +12,28 @@ else:
...
@@ -12,6 +12,28 @@ else:
class
TestPdbxFile
(
unittest
.
TestCase
):
class
TestPdbxFile
(
unittest
.
TestCase
):
"""Test the PDBx/mmCIF file parser"""
"""Test the PDBx/mmCIF file parser"""
def
test_FormatConversion
(
self
):
"""Test conversion from PDB to PDBx"""
mol
=
PDBFile
(
'systems/ala_ala_ala.pdb'
)
# Write to 'file'
output
=
StringIO
()
PDBxFile
.
writeFile
(
mol
.
topology
,
mol
.
positions
,
output
,
keepIds
=
True
)
# Read from 'file'
input
=
StringIO
(
output
.
getvalue
())
try
:
pdbx
=
PDBxFile
(
input
)
except
Exception
:
self
.
fail
(
'Parser failed to read PDBx/mmCIF file'
)
# Close file handles
output
.
close
()
input
.
close
()
def
test_Triclinic
(
self
):
def
test_Triclinic
(
self
):
"""Test parsing a file that describes a triclinic box."""
"""Test parsing a file that describes a triclinic box."""
pdb
=
PDBxFile
(
'systems/triclinic.pdbx'
)
pdb
=
PDBxFile
(
'systems/triclinic.pdbx'
)
...
...
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