Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pdbfixer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pdbfixer
Commits
e16ab084
Commit
e16ab084
authored
Mar 28, 2014
by
John Chodera (MSKCC)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combined build and simulate tests.
parent
24ca9600
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
tests/test_build.py
+2
-2
tests/test_build_and_simulate.py
+9
-7
No files found.
tests/test_build.py
View file @
e16ab084
...
@@ -9,8 +9,8 @@ import numpy
...
@@ -9,8 +9,8 @@ import numpy
def
test_build
():
def
test_build
():
# These are tough PDB codes from http://www.umass.edu/microbio/chime/pe_beta/pe/protexpl/badpdbs.htm
# These are tough PDB codes from http://www.umass.edu/microbio/chime/pe_beta/pe/protexpl/badpdbs.htm
pdbcodes
=
[
'1AS5'
,
'1CBN'
,
'1DPO'
,
'1IGY'
,
'1HAG'
,
'1IAO'
,
'4CPA'
,
'1QCQ'
]
build_pdbcodes
=
[
'1AS5'
,
'1CBN'
,
'1DPO'
,
'1IGY'
,
'1HAG'
,
'1IAO'
,
'4CPA'
,
'1QCQ'
]
# structures to be built
pdbcodes
=
[
'1VII'
]
# DEBUG: just use one
simulate_pdbcodes
=
[
'1AS5'
,
'1CBN'
,
'1DPO'
,
'1IGY'
,
'1HAG'
,
'1IAO'
,
'4CPA'
,
'1QCQ'
]
# structures to be simulated
# Set up PDB retrieval.
# Set up PDB retrieval.
from
Bio.PDB
import
PDBList
from
Bio.PDB
import
PDBList
...
...
tests/test_simulate.py
→
tests/test_
build_and_
simulate.py
View file @
e16ab084
...
@@ -17,7 +17,7 @@ def simulate(pdbcode, pdb_filename):
...
@@ -17,7 +17,7 @@ def simulate(pdbcode, pdb_filename):
pdb
=
app
.
PDBFile
(
pdb_filename
)
pdb
=
app
.
PDBFile
(
pdb_filename
)
# Set up implicit solvent forcefield.
# Set up implicit solvent forcefield.
forcefield
=
app
.
ForceField
(
'amber99sbildn.xml'
,
'amber99_obc.xml'
)
forcefield
=
app
.
ForceField
(
'amber99sbildn.xml'
)
# Create the system.
# Create the system.
system
=
forcefield
.
createSystem
(
pdb
.
topology
,
nonbondedMethod
=
app
.
NoCutoff
,
constraints
=
app
.
HBonds
)
system
=
forcefield
.
createSystem
(
pdb
.
topology
,
nonbondedMethod
=
app
.
NoCutoff
,
constraints
=
app
.
HBonds
)
...
@@ -62,10 +62,11 @@ def simulate(pdbcode, pdb_filename):
...
@@ -62,10 +62,11 @@ def simulate(pdbcode, pdb_filename):
return
return
def
test_simulate
():
def
test_
build_and_
simulate
():
# These are tough PDB codes from http://www.umass.edu/microbio/chime/pe_beta/pe/protexpl/badpdbs.htm
# These are tough PDB codes from http://www.umass.edu/microbio/chime/pe_beta/pe/protexpl/badpdbs.htm
pdbcodes
=
[
'1AS5'
,
'1CBN'
,
'1DPO'
,
'1IGY'
,
'1HAG'
,
'1IAO'
,
'4CPA'
,
'1QCQ'
]
pdbcodes_to_build
=
[
'1AS5'
,
'1CBN'
,
'1DPO'
,
'1IGY'
,
'1HAG'
,
'1IAO'
,
'4CPA'
,
'1QCQ'
]
pdbcodes
=
[
'1VII'
]
# DEBUG: just use one
pdbcodes_to_build
=
[
'1VII'
]
# DEBUG
pdbcodes_to_simulate
=
[
'1VII'
]
# should be a subset of pdbcodes_to_build
# Set up PDB retrieval.
# Set up PDB retrieval.
from
Bio.PDB
import
PDBList
from
Bio.PDB
import
PDBList
...
@@ -73,7 +74,7 @@ def test_simulate():
...
@@ -73,7 +74,7 @@ def test_simulate():
success
=
True
success
=
True
for
pdbcode
in
pdbcodes
:
for
pdbcode
in
pdbcodes
_to_build
:
print
pdbcode
print
pdbcode
try
:
try
:
...
@@ -115,7 +116,8 @@ def test_simulate():
...
@@ -115,7 +116,8 @@ def test_simulate():
outfile
.
close
()
outfile
.
close
()
# Test simulating this with OpenMM.
# Test simulating this with OpenMM.
simulate
(
pdbcode
,
output_pdb_filename
)
if
pdbcode
in
pdbcodes_to_simulate
:
simulate
(
pdbcode
,
output_pdb_filename
)
# Delete input file.
# Delete input file.
os
.
remove
(
input_pdb_filename
)
os
.
remove
(
input_pdb_filename
)
...
@@ -129,4 +131,4 @@ def test_simulate():
...
@@ -129,4 +131,4 @@ def test_simulate():
raise
Exception
(
"build test failed on one or more PDB files."
)
raise
Exception
(
"build test failed on one or more PDB files."
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
test_simulate
()
test_
build_and_
simulate
()
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