示例#1
0
    def __init__(self, molecule, **kwargs):
        GenericQMInput.__init__(self, molecule, **kwargs)

        self.setting.update(kwargs)

        if 'basis_set' not in kwargs:
            self.setting['basis_set'] = 'def2-tzvp'
示例#2
0
  def __init__(self, molecule, **kwargs):
    GenericQMInput.__init__(self, molecule, **kwargs)

    self.setting.update(kwargs)

    if 'basis_set' not in kwargs:
      self.setting['basis_set'] = 'def2-tzvp'
示例#3
0
    def __init__(self, molecule, **kwargs):
        GenericQMInput.__init__(self, molecule, **kwargs)

        self.setting.update(kwargs)

        if self.setting['periodic']:
            univ.getCelldm(self)
            box = copy.deepcopy(self.setting['celldm'][:3])
            self.setting['box'] = box
        else:
            self.setting['box'] = False
            self.setting['celldm'] = False
示例#4
0
  def __init__(self, molecule, **kwargs):
    GenericQMInput.__init__(self, molecule, **kwargs)

    self.setting.update(kwargs)

    if self.setting['periodic']:
      univ.getCelldm(self)
      box = copy.deepcopy(self.setting['celldm'][:3])
      self.setting['box'] = box
    else:
      self.setting['box'] = False
      self.setting['celldm'] = False
示例#5
0
    def write(self, name=None, **kwargs):
        #if self.setting['periodic']:
        self.celldm2lattice()
        inp, molecule = \
          GenericQMInput.write(self, name, **self.setting)

        if 'isolated' in self.setting and self.setting['isolated']\
        or 'periodic' in self.setting and not self.setting['periodic']:
            if 'center_molecule' in self.setting and self.setting[
                    'center_molecule']:
                cm = molecule.getCenterOfMass()
                molecule.center(cm)
                molecule.shift(self.setting['lattice'].sum(0) / 2)

        if 'pp_list' in self.setting:
            pp_list = self.setting['pp_list']
            itr = 1
            for pp_data in pp_list:
                pp_inds = pp_data[0]
                if type(pp_inds) is not list:
                    pp_inds = [pp_inds]
                pp_name = pp_data[1]
                pp = pp_data[2]
                pp.setting['program'] = self.setting['program']
                pp.write(pp_name, inplace=False)
                molecule.setAtoms(pp_inds, string=pp_name)
                Zn = molecule.type_list[pp_inds[0]]
                molecule.setAtoms(pp_inds, element=Zn + str(itr))
                itr += 1

        return inp, molecule
示例#6
0
  def __init__(self, molecule, **kwargs):
    GenericQMInput.__init__(self, molecule, **kwargs)

    self.setting.update(kwargs)

    if 'cutoff' not in kwargs:
      self.setting['cutoff'] = 100
    if not self.setting['periodic'] and 'isolation' not in kwargs:
      self.setting['isolation'] = 'mt'
    self.pp_files = []
    if 'periodic' in self.setting and self.setting['periodic']:
      self.celldm2lattice()
    if 'pp_type' not in kwargs:
      self.setting['pp_type'] = 'geodecker'
    if 'full_kmesh' not in self.setting:
      self.setting['full_kmesh'] = False
    if 'theory' in self.setting and self.setting['theory'] == 'hse06':
      if 'pp_theory' not in self.setting:
        self.setting['pp_theory'] = 'pbe'
    if 'fractional_coordinate' not in kwargs:
      self.setting['fractional_coordinate'] = False

    univ.getCelldm(self) 
示例#7
0
    def __init__(self, molecule, **kwargs):
        GenericQMInput.__init__(self, molecule, **kwargs)

        self.setting.update(kwargs)

        if 'cutoff' not in kwargs:
            self.setting['cutoff'] = 100
        if not self.setting['periodic'] and 'isolation' not in kwargs:
            self.setting['isolation'] = 'mt'
        self.pp_files = []
        if 'periodic' in self.setting and self.setting['periodic']:
            self.celldm2lattice()
        if 'pp_type' not in kwargs:
            self.setting['pp_type'] = 'geodecker'
        if 'full_kmesh' not in self.setting:
            self.setting['full_kmesh'] = False
        if 'theory' in self.setting and self.setting['theory'] == 'hse06':
            if 'pp_theory' not in self.setting:
                self.setting['pp_theory'] = 'pbe'
        if 'fractional_coordinate' not in kwargs:
            self.setting['fractional_coordinate'] = False

        univ.getCelldm(self)
示例#8
0
  def write(self, name=None, **kwargs):
    if self.setting['periodic']:
      self.celldm2lattice()
    inp, molecule = \
      GenericQMInput.write(self, name, **self.setting)

    if 'pp_list' in self.setting:
      pp_list = self.setting['pp_list']
      itr = 1
      for pp_data in pp_list:
        pp_inds = pp_data[0]
        if type(pp_inds) is not list:
          pp_inds = [pp_inds]
        pp_name = pp_data[1]
        pp = pp_data[2]
        pp.setting['program'] = self.setting['program']
        pp.write(pp_name, inplace=False)
        molecule.setAtoms(pp_inds, string=pp_name)
        Zn = molecule.type_list[pp_inds[0]]
        molecule.setAtoms(pp_inds, element=Zn + str(itr))
        itr += 1

    return inp, molecule