code: def read_results(self):
          
          
          if self.submited:
              # The job has been submitted. Check the state.
              if not self.job_ready() :
                  if self.block :
                      while not self.job_ready() :
                          time.sleep(self.job_check_time)
                  else :
                      raise CalcNotReadyError
                      
  
              # Assume the calc finished. Copy the files back.
              subprocess.call(self.copy_in_cmd % {
                  'ldir': self.wdir,
                  'rdir': os.path.join(self.parameters['rdir'],os.path.split(self.directory)[-1]),
                  'user': self.parameters['user'],
                  'host': self.parameters['host']
              }, shell=True)
                  
          
          fn=os.path.join(self.directory,'pw.out')
          # Read the pan-ultimate line of the output file
          try: 
              ln=open(fn).readlines()[-2]
              if ln.find('JOB DONE.')>-1 :
                  # Job is done we can read the output
                  r=read_quantumespresso_textoutput(fn)
                  self.submited=False
                  self.jobid=None
              else :
                  # Job not ready.
                  raise CalcNotReadyError
          except (IOError, IndexError) :
              # Job not ready.
              raise CalcNotReadyError
          
          # All is fine - really read the results
          self.calc.read_results(self)
docs: Read energy, forces, ... from output file(s).