Commit e16ab084 by John Chodera (MSKCC)

Combined build and simulate tests.

parent 24ca9600
...@@ -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
......
...@@ -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,6 +116,7 @@ def test_simulate(): ...@@ -115,6 +116,7 @@ def test_simulate():
outfile.close() outfile.close()
# Test simulating this with OpenMM. # Test simulating this with OpenMM.
if pdbcode in pdbcodes_to_simulate:
simulate(pdbcode, output_pdb_filename) simulate(pdbcode, output_pdb_filename)
# Delete input file. # Delete input file.
...@@ -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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment