Exemplo n.º 1
0
    def bulk(self):
        size = (40, 40, 30)
        atoms = \
            Hexagonal.HexagonalClosedPacked(latticeconstant={'a': self.lattice_a,
                                                             'c': self.lattice_c},
                                            size=size,
                                            symbol='Mg',
                                            pbc=(1, 1, 1))

        self.write_lmp_config_data(atoms)
Exemplo n.º 2
0
 def set_hcp_convention(self, size=(1, 1, 1)):
     atoms = Hexagonal.HexagonalClosedPacked(latticeconstant={
         'a': self.pot['ahcp'],
         'c': self.pot['chcp']
     },
                                             size=size,
                                             symbol=self.pot["element"],
                                             pbc=(1, 1, 1))
     print(atoms.get_cell())
     return atoms
Exemplo n.º 3
0
 def gn_hcp(self):
     alat0 = self.pot['ahcp']
     for i in range(-15, 15):
         delta = 0.01
         alat = alat0 + i * delta
         if i >= 0:
             mdir = "dir-p-{:03d}".format(i)
         else:
             mdir = "dir-n-{:03d}".format(abs(i))
         atoms = Hexagonal.HexagonalClosedPacked(latticeconstant={
             'a': alat,
             'c': self.pot["chcp"]
         },
                                                 size=(1, 1, 1),
                                                 symbol=self.pot["element"],
                                                 pbc=(1, 1, 1))
         self.mymkdir(mdir)
         ase.io.write(filename="POSCAR", images=atoms, format='vasp')
         self.prepare_vasp_inputs(mdir)
Exemplo n.º 4
0
 def gn_hcp_mesh(self):
     da = 0.02
     dc = 0.02
     shift = -da * 30
     shift = -dc * 15
     for i in range(60):
         for j in range(30):
             mdir = "dir-{:03d}-{:03d}".format(i, j)
             aa = self.pot["ahcp"] + shift + da * i
             cc = self.pot["chcp"] + shift + dc * j
             atoms = Hexagonal.HexagonalClosedPacked(
                 latticeconstant={
                     'a': aa,
                     'c': cc
                 },
                 size=(1, 1, 1),
                 symbol=self.pot["element"],
                 pbc=(1, 1, 1))
             self.mymkdir(mdir)
             ase.io.write(filename="POSCAR", images=atoms, format='vasp')
             self.prepare_vasp_inputs(mdir)
Exemplo n.º 5
0
 def gn_hcp(self):
     aa, cc = self.pot['ahcp'], self.pot['chcp']
     atoms = Hexagonal.HexagonalClosedPacked(
         latticeconstant={'a': aa, 'c': cc},
         size=(1, 1, 1), symbol=self.pot["element"], pbc=(1, 1, 1))
     return atoms