예제 #1
0
 def __str__(self):
     lines = []
     app = lines.append
     app(marquee(self.name))
     for it, task in enumerate(self.tasks):
         app("%5s %10s  %s" % ("t%d" % it, str(task.name), task.status))
     return "\n".join(lines)
예제 #2
0
파일: analyse.py 프로젝트: FermiQ/yambopy
 def __str__(self):
     lines = []; app = lines.append
     app(marquee(self.__class__.__name__))
     for json_file in self.jsonfiles:
         app("%s"%json_file)
         for f in self.jsonfiles[json_file]['files']:
             app("\t%s"%f)
     return "\n".join(lines)
예제 #3
0
 def __str__(self):
     lines = []
     app = lines.append
     app(marquee(self.__class__.__name__))
     app("lattice:")
     lines += [("%12.8lf " * 3) % tuple(vec) for vec in self.lat]
     app("atom positions:")
     for an, pos in zip(self.atomic_numbers, self.red_atomic_positions):
         app("%3d " % an + ("%12.8lf " * 3) % tuple(pos))
     return "\n".join(lines)
예제 #4
0
 def __str__(self):
     lines = []
     app = lines.append
     app(marquee(self.__class__.__name__))
     app("nqps:     %d" % self.nqps)
     app("nkpoints: %d" % self.nkpoints)
     app("nbands:   %d" % self.nbands)
     app("min_band: %d" % self.min_band)
     app("max_band: %d" % self.max_band)
     return "\n".join(lines)
예제 #5
0
 def to_string(self, mark='='):
     lines = []
     app = lines.append
     app(marquee(self.name, mark=mark))
     app('initialized: {}'.format(self.initialized))
     app('status:      {}'.format(self.status))
     app('exitcode:    {}'.format(self.exitcode))
     if self.initialized:
         app('path: {}'.format(self.path))
     return "\n".join(lines)
예제 #6
0
 def __str__(self):
     lines = []; app = lines.append
     app(marquee(self.__class__.__name__))
     app("kpoints:")
     app("nk_ibz : %d"%self.nk_ibz)
     app("nk_bz  : %d"%self.nk_bz)
     app("bands:")
     app("nbands : %d" % self.nbands)
     app("nbandsv: %d" % self.nbandsv)
     app("nbandsc: %d" % self.nbandsc)
     app("indexv : %d" % (self.min_band-1))
     app("indexc : %d" % (self.indexc-1))
     app("field_dirx: %10.6lf %10.6lf %10.6lf"%tuple(self.field_dirx))
     app("field_diry: %10.6lf %10.6lf %10.6lf"%tuple(self.field_diry))
     app("field_dirz: %10.6lf %10.6lf %10.6lf"%tuple(self.field_dirz))
     return "\n".join(lines)
예제 #7
0
 def __str__(self):
     lines = []; app = lines.append
     app(marquee(self.__class__.__name__))
     app("reciprocal lattice:")
     app("\n".join([("%12.8lf "*3)%tuple(r) for r in self.rlat]))
     app("lattice:")
     app("\n".join([("%12.8lf "*3)%tuple(r) for r in self.lat]))
     app("alat:")
     app(("%12.8lf "*3)%tuple(self.alat))
     app("atom positions:")
     for an, pos in zip(self.atomic_numbers, self.red_atomic_positions):
         app( "%3d " % an + ("%12.8lf " * 3) % tuple(pos) )
     app("nkpoints: %d"%self.nkpoints)
     app("symmetry operations: %d\n"%len(self.sym_car))
     app("temperature : %lf"%self.temperature)
     app("electrons   : %lf"%self.electrons)
     return "\n".join(lines)
예제 #8
0
    def run(self, maxexecs=1, sleep=5, dry=False, verbose=0):
        """Run all the tasks"""
        if not self.initialized: self.create()

        print(marquee("YambopyFlow.run"))
        while not self.alldone:
            #exeute maxexecs ready tasks
            for it, task in self.readytasks[:maxexecs]:
                print("%5s %10s  %s" %
                      ("t%d" % it, str(task.name), task.status))
                self.initialize_task(it, verbose=False)
                task.run(dry=dry)

            #wait some seconds
            time.sleep(sleep)

            #transform into a pickle
            self.pickle()
예제 #9
0
 def __str__(self):
     lines = []; app = lines.append
     app(marquee(self.__class__.__name__))
     app('nbandstructures: %d'%self.nbandstructures)
     return "\n".join(lines)
예제 #10
0
 def __str__(self):
     lines = []; app = lines.append
     app(marquee(self.__class__.__name__))
     app(str(self.excitondb.get_string(mark='-')))
     return "\n".join(lines)