Example #1
0
 def testSetDistMult(self):
     try:
         main(["-c", GLU_MULT_DIST_INI])
         self.assertFalse(diff_lines(GLU_MULT_DIST_OUT1, GOOD_GLU_MULT_DIST_OUT1))
         self.assertFalse(diff_lines(GLU_MULT_DIST_OUT2, GOOD_GLU_MULT_DIST_OUT2))
     finally:
         silent_remove(GLU_MULT_DIST_OUT1)
         silent_remove(GLU_MULT_DIST_OUT2)
Example #2
0
 def testReordGluDeprot(self):
     """
     Tests that can handle an emtpy line in the data file and make a data number dictionary
     """
     try:
         main(["-c", REORD_GLU_INI])
         self.assertFalse(diff_lines(GLU_DEPROT_ATOM_NUM_DICT, GLU_DEPROT_ATOM_NUM_DICT_GOOD))
     finally:
         silent_remove(GLU_DEPROT_OUT)
         silent_remove(GLU_DEPROT_ATOM_NUM_DICT)
Example #3
0
 def testAtomNumTypeDict(self):
     try:
         main(["-c", GLUE_GLUP_INI])
         self.assertFalse(diff_lines(GLUP_GLUE_ATOM_NUM_DICT, GLUP_GLUE_ATOM_NUM_DICT_GOOD))
         self.assertFalse(diff_lines(GLUP_GLUE_ATOM_TYPE_DICT, GLUP_GLUE_ATOM_TYPE_DICT_GOOD))
         self.assertFalse(diff_lines(GLUP_AS_GLUE, GLUP_AS_GLUE_GOOD, delimiter=" "))
     finally:
         silent_remove(GLUP_GLUE_ATOM_NUM_DICT, disable=DISABLE_REMOVE)
         silent_remove(GLUP_GLUE_ATOM_TYPE_DICT, disable=DISABLE_REMOVE)
         silent_remove(GLUP_AS_GLUE, disable=DISABLE_REMOVE)
Example #4
0
 def testAtomNumTypeDict(self):
     try:
         main(["-c", GLUE_GLUP_INI])
         self.assertFalse(diff_lines(GLUP_GLUE_ATOM_NUM_DICT, GLUP_GLUE_ATOM_NUM_DICT_GOOD))
         self.assertFalse(diff_lines(GLUP_GLUE_ATOM_TYPE_DICT, GLUP_GLUE_ATOM_TYPE_DICT_GOOD))
         self.assertFalse(diff_lines(GLUP_AS_GLUE, GLUP_AS_GLUE_GOOD))
     finally:
         silent_remove(GLUP_GLUE_ATOM_NUM_DICT)
         silent_remove(GLUP_GLUE_ATOM_TYPE_DICT)
         silent_remove(GLUP_AS_GLUE)
Example #5
0
 def testAdjustAtom(self):
     try:
         main(["-c", GLU_ADJUST_ATOM_INI])
         self.assertFalse(diff_lines(GLU_ADJUST_OUT_0, GLU_ADJUST_TPL))
         self.assertFalse(diff_lines(GLU_ADJUST_OUT_NEG1, GOOD_GLU_ADJUST_OUT_NEG1))
         self.assertFalse(diff_lines(GLU_ADJUST_OUT_1, GOOD_GLU_ADJUST_OUT_1))
         self.assertFalse(diff_lines(GLU_ADJUST_OUT_2, GOOD_GLU_ADJUST_OUT_2))
     finally:
         silent_remove(GLU_ADJUST_OUT_NEG1, disable=DISABLE_REMOVE)
         silent_remove(GLU_ADJUST_OUT_0, disable=DISABLE_REMOVE)
         silent_remove(GLU_ADJUST_OUT_1, disable=DISABLE_REMOVE)
         silent_remove(GLU_ADJUST_OUT_2, disable=DISABLE_REMOVE)
Example #6
0
 def testReordGluDeprot(self):
     """
     Tests that can handle an emtpy line in the data file and make a data number dictionary
     """
     try:
         main(["-c", REORD_GLU_INI])
         self.assertFalse(diff_lines(GLU_DEPROT_ATOM_NUM_DICT, GLU_DEPROT_ATOM_NUM_DICT_GOOD))
         # for debugging:
         # with open(GLU_DEPROT_OUT) as f:
         #     with open(GLU_DEPROT_DATA) as g:
         #         for d_line, g_line in zip(f, g):
         #             if d_line.strip() != g_line.strip():
         #                 print(d_line.strip())
         #                 print(g_line.strip())
     finally:
         silent_remove(GLU_DEPROT_OUT)
         silent_remove(GLU_DEPROT_ATOM_NUM_DICT)
Example #7
0
 def testSetDist(self):
     try:
         main(["-c", GLU_DIST_INI])
         self.assertFalse(diff_lines(GLU_DIST_OUT, GOOD_GLU_DIST_OUT))
     finally:
         silent_remove(GLU_DIST_OUT)
Example #8
0
 def testSerca(self):
     try:
         main(["-c", SERCA_INI])
         self.assertFalse(diff_lines(SERCA_OUT, SERCA_GOOD_OUT))
     finally:
         silent_remove(SERCA_OUT, disable=DISABLE_REMOVE)
Example #9
0
 def testSetDistOneAtom(self):
     test_input = ["-c", GLU_DIST_ONE_ATOM_INI]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("WARNING:  Use the 'atoms_dist' keyword" in output)
Example #10
0
 def testAdjustAtomTooLargeInt(self):
     test_input = ["-c", GLU_ADJUST_ATOM_TOO_LARGE_INT_INI]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("found only" in output)
Example #11
0
 def testAdjustAtomTooFewXYZ(self):
     test_input = ["-c", GLU_ADJUST_ATOM_TOO_FEW_INI]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("comma-separated list" in output)
Example #12
0
 def testAdjustAtomZeroSteps(self):
     test_input = ["-c", GLU_ADJUST_ATOM_NO_STEPS_INI]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("positive number of steps" in output)
Example #13
0
 def testAdjustAtomNonInt(self):
     test_input = ["-c", GLU_ADJUST_ATOM_NON_INT_INI]
     if logger.isEnabledFor(logging.DEBUG):
         main(test_input)
     with capture_stderr(main, test_input) as output:
         self.assertTrue("keyword must be a positive integer" in output)
Example #14
0
 def testSerca(self):
     try:
         main(["-c", SERCA_INI])
         self.assertFalse(diff_lines(SERCA_OUT, SERCA_GOOD_OUT))
     finally:
         silent_remove(SERCA_OUT)