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
a5e76b21
Commit
a5e76b21
authored
Jun 09, 2014
by
Matthew Harrigan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print function
parent
05fea2f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
tests/test_build_and_simulate.py
+17
-16
No files found.
tests/test_build_and_simulate.py
View file @
a5e76b21
from
__future__
import
print_function
import
pdbfixer
import
simtk.openmm
...
...
@@ -79,7 +80,7 @@ def simulate(pdbcode, pdb_filename):
del
context
,
integrator
print
"Simulation completed: potential =
%.3
f kcal/mol"
%
potential
print
(
"Simulation completed: potential =
%.3
f kcal/mol"
%
potential
)
return
...
...
@@ -105,8 +106,8 @@ def test_build_and_simulate():
failures
=
list
()
for
pdbcode
in
pdbcodes_to_build
:
print
"------------------------------------------------"
print
pdbcode
print
(
"------------------------------------------------"
)
print
(
pdbcode
)
output_pdb_filename
=
'output.pdb'
...
...
@@ -152,14 +153,14 @@ def test_build_and_simulate():
except
Watchdog
:
message
=
"timed out in stage
%
s"
%
stage
print
message
print
(
message
)
failures
.
append
((
pdbcode
,
Exception
(
message
)))
except
Exception
as
e
:
print
"EXCEPTION DURING BUILD"
print
(
"EXCEPTION DURING BUILD"
)
#import traceback
#print traceback.print_exc()
print
str
(
e
)
print
(
str
(
e
)
)
failures
.
append
((
pdbcode
,
e
))
watchdog
.
stop
()
...
...
@@ -173,14 +174,14 @@ def test_build_and_simulate():
except
Watchdog
:
message
=
"timed out in simulation"
print
message
print
(
message
)
failures
.
append
((
pdbcode
,
Exception
(
message
)))
except
Exception
as
e
:
print
"EXCEPTION DURING SIMULATE"
print
(
"EXCEPTION DURING SIMULATE"
)
#import traceback
#print traceback.print_exc()
print
str
(
e
)
print
(
str
(
e
)
)
failures
.
append
((
pdbcode
,
e
))
watchdog
.
stop
()
...
...
@@ -189,21 +190,21 @@ def test_build_and_simulate():
# Clean up.
os
.
remove
(
output_pdb_filename
)
print
"------------------------------------------------"
print
(
"------------------------------------------------"
)
if
len
(
failures
)
!=
0
:
print
""
print
"SUMMARY OF FAILURES:"
print
""
print
(
""
)
print
(
"SUMMARY OF FAILURES:"
)
print
(
""
)
for
failure
in
failures
:
(
pdbcode
,
exception
)
=
failure
print
"
%6
s :
%
s"
%
(
pdbcode
,
str
(
exception
))
print
""
print
(
"
%6
s :
%
s"
%
(
pdbcode
,
str
(
exception
)
))
print
(
""
)
raise
Exception
(
"Build test failed on one or more PDB files."
)
else
:
print
"All tests succeeded."
print
(
"All tests succeeded."
)
if
__name__
==
'__main__'
:
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