예제 #1
0
 def run(self,job_record):
   job_record['qmc']['kpoint_weights'] = \
       convert_crystal(
           base="qw",
           kfmt='int',
           kset=job_record['qmc']['kpoints']).tolist()
   return 'ok'
예제 #2
0
 def run(self,job_record):
   job_record['qmc']['kpoint_weights'] = \
       convert_crystal(
           base="qw",
           kfmt='int',
           kset=job_record['qmc']['kpoints']).tolist()
   return 'ok'
예제 #3
0
    def export_qwalk(self):
        ''' Export QWalk input files into current directory.
    Returns:
      bool: whether it was successful.'''
        self.recover(pkl.load(open(self.path + self.pickle, 'rb')))

        ready = False
        if len(self.qwfiles['slater']) == 0:
            self.nextstep()

            if not self.completed:
                return False

            cwd = os.getcwd()
            os.chdir(self.path)

            print(self.logname,
                  ": %s attempting to generate QWalk files." % self.name)

            # Check on the properties run
            status = resolve_status(self.prunner, self.preader, self.propoutfn)
            print(self.logname, ": properties status= %s" % (status))
            if status == 'not_started':
                ready = False
                self.prunner.add_command("cp %s INPUT" % self.propinpfn)
                self.prunner.add_task("%s &> %s" %
                                      (paths['Pproperties'], self.propoutfn))

                if self.bundle:
                    self.scriptfile = "%s.run" % self.name
                    self.bundle_ready = self.prunner.script(
                        self.scriptfile, self.driverfn)
                else:
                    qsubfile = self.runner.submit(
                        self.path.replace('/', '-') + self.name)
            elif status == 'ready_for_analysis':
                self.preader.collect(self.propoutfn)

            if self.preader.completed:
                ready = True
                print(self.logname, ": converting crystal to QWalk input now.")
                self.qwfiles = crystal2qmc.convert_crystal(
                    base=self.name, propoutfn=self.propoutfn)
            else:
                ready = False
                print(
                    self.logname,
                    ": conversion postponed because properties is not finished."
                )

            os.chdir(cwd)
        else:
            ready = True

        with open(self.path + self.pickle, 'wb') as outf:
            pkl.dump(self, outf)

        return ready
예제 #4
0
 def run(self,job_record):
   _,_,_,_,_,eigsys =\
       convert_crystal(
           base="qw",
           kfmt='int',
           kset=job_record['qmc']['kpoints'])
   job_record['kpt_weights'] = eigsys['kpt_weights'].tolist()
   job_record['dft']['eigvals'] = eigsys['eigvals'].tolist()
   return 'ok'
예제 #5
0
 def run(self):
   self.kweights=list(crystal2qmc.convert_crystal(self.qwbase,self.propoutfn,
                               self.kfmt,self.kset))
   print(self.kweights)
예제 #6
0
 def run(self, job_record):
     job_record["qmc"]["kpoint_weights"] = convert_crystal(
         base="qw", kfmt="int", kset=job_record["qmc"]["kpoints"]
     ).tolist()
     return "ok"