예제 #1
0
 def test_simple_optimization(self):
     [mystatus, my_test_dir
      ] = workflow_setup.generic_submit("simple_optimization.inp")
     if mystatus == "Unfinished":
         self.assertTrue(False)
         return
     elif mystatus == "Completed":
         recipedir = workflow_setup.get_finished_recipe_dir(my_test_dir)
         myfile = MASTFile(os.path.join(recipedir, "SUMMARY.txt"))
         okays = 0
         for myline in myfile.data:
             if "defect_int1_stat" in myline:
                 myenergy = myline.split()[-1]
                 self.assertEquals(myenergy, "-13.953")
                 okays = okays + 1
             if "defect_vac1_stat" in myline:
                 myenergy = myline.split()[-1]
                 self.assertEquals(myenergy, "-10.623")
                 okays = okays + 1
             if "defect_sub1_stat" in myline:
                 myenergy = myline.split()[-1]
                 self.assertEquals(myenergy, "-20.145")
                 okays = okays + 1
         self.assertEquals(okays, 3)
         return
     else:
         self.assertTrue(False)
         return
예제 #2
0
 def test_simple_optimization(self):
     [mystatus, my_test_dir]=workflow_setup.generic_submit("simple_optimization.inp")
     if mystatus == "Unfinished":
         self.assertTrue(False)
         return
     elif mystatus == "Completed":
         recipedir = workflow_setup.get_finished_recipe_dir(my_test_dir)
         myfile=MASTFile(os.path.join(recipedir,"SUMMARY.txt"))
         okays=0
         for myline in myfile.data:
             if "defect_int1_stat" in myline:
                 myenergy=myline.split()[-1]
                 self.assertEquals(myenergy, "-13.953")
                 okays=okays+1
             if "defect_vac1_stat" in myline:
                 myenergy=myline.split()[-1]
                 self.assertEquals(myenergy, "-10.623")
                 okays=okays+1
             if "defect_sub1_stat" in myline:
                 myenergy=myline.split()[-1]
                 self.assertEquals(myenergy, "-20.145")
                 okays=okays+1
         self.assertEquals(okays, 3)
         return
     else:
         self.assertTrue(False)
         return
예제 #3
0
 def test_neb_with_phonons(self):
     [mystatus, my_test_dir]=workflow_setup.generic_submit("neb_with_phonons.inp")
     if mystatus == "Unfinished":
         self.assertTrue(False)
         return
     elif mystatus == "Completed":
         recipedir = workflow_setup.get_finished_recipe_dir(my_test_dir)
         myfile=MASTFile(os.path.join(recipedir,"diffcoeff_utility","Diffusivity.txt"))
         okays=0
         for myline in myfile.data:
             if myline[0:3] == "1.0":
                 self.assertEquals(myline.split()[1].strip(), "6.198170E-07")
                 okays=okays+1
         self.assertEquals(okays, 1)
         return
     else:
         self.assertTrue(False)
         return
예제 #4
0
 def test_neb_with_phonons(self):
     [mystatus,
      my_test_dir] = workflow_setup.generic_submit("neb_with_phonons.inp")
     if mystatus == "Unfinished":
         self.assertTrue(False)
         return
     elif mystatus == "Completed":
         recipedir = workflow_setup.get_finished_recipe_dir(my_test_dir)
         myfile = MASTFile(
             os.path.join(recipedir, "diffcoeff_utility",
                          "Diffusivity.txt"))
         okays = 0
         for myline in myfile.data:
             if myline[0:3] == "1.0":
                 self.assertEquals(myline.split()[1].strip(),
                                   "6.198170E-07")
                 okays = okays + 1
         self.assertEquals(okays, 1)
         return
     else:
         self.assertTrue(False)
         return