Пример #1
0
    a1 = np.array([1, 0])
    a2 = np.array([0, 1])

    lat = pb.Lattice(
        a1=a1, a2=a2
    )

    lat.add_sublattices(
        ('A', [0, 0], onsite[0])
    )

    lat.add_hoppings(
        ([1, 0], 'A', 'A', - 1),
        ([0, 1], 'A', 'A', - 1)
    )

    return lat

lattice = square_lattice()
nx = ny = 2
lx = ly = 256
configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True],
                                   is_complex=True, precision=1, spectrum_range=[-4.1,4.1])
calculation = kite.Calculation(configuration)
mod = kite.Modification(magnetic_field = 40)

calculation.conductivity_dc(num_points=1000, num_moments=32, num_random=1,
                             direction='xy', temperature=0.01)

kite.config_system(lattice, configuration, calculation, modification=mod, filename='config.h5')
Пример #2
0
# make config object which caries info about
# - the number of decomposition parts [nx, ny],
# - lengths of structure [lx, ly]
# - boundary conditions, setting True as periodic boundary conditions, and False elsewise,
# - info if the exported hopping and onsite data should be complex,
# - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double.
# - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max]
configuration = kite.Configuration(divisions=[nx, ny],
                                   length=[lx, ly],
                                   boundaries=[True, True],
                                   is_complex=True,
                                   precision=1)
# define grid
num_points = 15
energy = [(1.0 / num_points * i) * 3.5 for i in range(num_points)]

calculation = kite.Calculation(configuration)
calculation.dos(num_points=40 * lx,
                num_moments=10 * lx,
                num_random=1,
                num_disorder=1)

modification = kite.Modification(magnetic_field=7)

# configure the *.h5 file
kite.config_system(lattice,
                   configuration,
                   calculation,
                   modification,
                   filename='phmag.h5')