diff --git a/meld/tests/data/raw-modeling/compounds.chemlib b/meld/tests/data/raw-modeling/compounds.chemlib new file mode 100644 index 0000000000000000000000000000000000000000..c44f3d83bfbf470d706dabb542a2249482e5618e Binary files /dev/null and b/meld/tests/data/raw-modeling/compounds.chemlib differ diff --git a/meld/tests/test_raw_modeling.py b/meld/tests/test_raw_modeling.py index 797f94a7f9b001c530258aa340133058d12bce32..cccb64561e1643ee03b4b555b86fd2a481ccda35 100644 --- a/meld/tests/test_raw_modeling.py +++ b/meld/tests/test_raw_modeling.py @@ -1,16 +1,21 @@ import unittest from promod3 import * from promod3.meld import * -from ost import seq +from ost import conop, seq, io, mol class RawModelingTests(unittest.TestCase): + def setUp(self): + compound_lib=conop.CompoundLib.Load('data/raw-modeling/compounds.chemlib') + conop.SetDefaultLib(compound_lib) + io.profiles['DEFAULT'].processor = conop.RuleBasedProcessor(compound_lib) + def testRaiseNoAttachedView(self): # test that BuildRawModel throws exception when no view is attached aln=seq.CreateAlignment(seq.CreateSequence('A', 'acdef'), seq.CreateSequence('B', 'ac-ef')) self.assertRaises(RuntimeError, BuildRawModel, aln) - def fastModeledSequence(self): + def testModeledSequence(self): # test if the model has the sequence we want. tpl=io.LoadPDB('data/raw-modeling/gly.pdb') aln=io.LoadAlignment('data/raw-modeling/seq.fasta') @@ -19,7 +24,7 @@ class RawModelingTests(unittest.TestCase): seq1=seq.SequenceFromChain('MODEL', result.model.chains[0]) self.assertEqual(seq1.string, aln.sequences[0].string) - def fastDeletion(self): + def testDeletion(self): # test if the result contains a "deletion" gap at the right spot. tpl=io.LoadPDB('data/raw-modeling/gly.pdb') aln=io.LoadAlignment('data/raw-modeling/del.fasta') @@ -31,7 +36,7 @@ class RawModelingTests(unittest.TestCase): self.assertEqual(result.gaps[0].after, residues[3]) self.assertEqual(result.gaps[0].seq, '') - def fastInsertion(self): + def testInsertion(self): # test if the result contains an "insertion" gap at the right spot. tpl=io.LoadPDB('data/raw-modeling/gly.pdb') aln=io.LoadAlignment('data/raw-modeling/ins.fasta') @@ -43,7 +48,7 @@ class RawModelingTests(unittest.TestCase): self.assertEqual(result.gaps[0].after, residues[2]) self.assertEqual(result.gaps[0].seq, 'AV') - def fastTer(self): + def testTer(self): # test if the result contains two terminal gaps, one at the beginning, # one at the end tpl=io.LoadPDB('data/raw-modeling/gly.pdb') @@ -58,7 +63,8 @@ class RawModelingTests(unittest.TestCase): self.assertEqual(result.gaps[1].before, residues[-1]) self.assertEqual(result.gaps[1].after, mol.ResidueHandle()) self.assertEqual(result.gaps[1].seq, 'G') - def fastModified(self): + + def testModified(self): # test if we correctly strip off modifications tpl=io.LoadPDB('data/raw-modeling/sep.pdb') aln=io.LoadAlignment('data/raw-modeling/sep.fasta') @@ -73,7 +79,8 @@ class RawModelingTests(unittest.TestCase): self.assertTrue(residues[0].FindAtom("O")) self.assertTrue(residues[0].FindAtom("CB")) self.assertTrue(residues[0].FindAtom("OG")) - def fastInsertCBeta(self): + + def testInsertCBeta(self): # test if the dst residues contain cbeta, unless they are glycines tpl=io.LoadPDB('data/raw-modeling/cbeta.pdb') aln=io.LoadAlignment('data/raw-modeling/cbeta.fasta')