コード例 #1
0
 def test__fullpath_childname(self):
     ingdir="%s/writedir/single_label1" % testdir
     topmetad = MASTFile("files/top_metadata_single")
     topmetad.data.append("origin_dir = %s/files\n" % testdir) #give origin directory
     topmetad.to_file("writedir/metadata.txt")
     metad = MASTFile("files/metadata_single")
     metad.to_file("%s/metadata.txt" % ingdir)
     kdict=dict()
     kdict['mast_program'] = 'vasp'
     my_structure = pymatgen.io.vaspio.Poscar.from_file("files/perfect_structure").structure
     myuci = ChopIngredient(name=ingdir,program_keys=kdict,structure=my_structure)
     fullpath = myuci._fullpath_childname("next_ingred")
     self.assertEqual(fullpath, "%s/writedir/next_ingred" % testdir)
コード例 #2
0
 def test__fullpath_childname(self):
     ingdir = "%s/writedir/single_label1" % testdir
     topmetad = MASTFile("files/top_metadata_single")
     topmetad.data.append("origin_dir = %s/files\n" %
                          testdir)  #give origin directory
     topmetad.to_file("writedir/metadata.txt")
     metad = MASTFile("files/metadata_single")
     metad.to_file("%s/metadata.txt" % ingdir)
     kdict = dict()
     kdict['mast_program'] = 'vasp'
     my_structure = pymatgen.io.vaspio.Poscar.from_file(
         "files/perfect_structure").structure
     myuci = ChopIngredient(name=ingdir,
                            program_keys=kdict,
                            structure=my_structure)
     fullpath = myuci._fullpath_childname("next_ingred")
     self.assertEqual(fullpath, "%s/writedir/next_ingred" % testdir)