Пример #1
0
 def test_boundary(self):
     cell = 2.2 * np.identity(3)
     NaCl = Atoms('NaCl',
                  scaled_positions=[(0, 0, 0), (0.5, 0.5, 0.5)],
                  cell=cell)
     NaCl.set_repeat([3, 3, 3])
     # NaCl.plot3d()
     NaCl_bound = NaCl.get_boundary_region(0.2)
Пример #2
0
 def test_get_neighbors(self):
     cell = 2.2 * np.identity(3)
     NaCl = Atoms('NaCl',
                  scaled_positions=[(0, 0, 0), (0.5, 0.5, 0.5)],
                  cell=cell)
     # NaCl.repeat([3, 3, 3])
     # NaCl.positions = [(1,1,1)]
     boundary = NaCl.get_boundary_region(3.5)
     extended_cell = NaCl + boundary
     # extended_cell.plot3d()
     nbr_dict = NaCl.get_neighbors(num_neighbors=12, t_vec=True)