コード例 #1
0
ファイル: graphite_ABS.py プロジェクト: yihsuanliu/gpaw
                basis='dzp',
                usesymm=None,
                nbands=nband+10,
                convergence={'bands':nband},
                eigensolver = 'cg',
                mixer=Mixer(0.05, 3, weight=100.0),
                width=0.05, txt = 'out2.txt')
    
    atoms.set_calculator(calc)
    atoms.get_potential_energy()
    calc.write('graphite2.gpw','all')    

    
if OpticalLimit:
    
    calc1 = GPAW('graphite1.gpw',communicator=serial_comm)
    calc2 = GPAW('graphite2.gpw',communicator=serial_comm)
                
    dw = 0.1  
    wmax = 40.

    q = np.array([0.00001, 0., 0.])
    chi = CHI()
    chi.nband = nband
    chi.initialize((calc1,calc2), q, wmax, dw, eta=0.2, Ecut = 40)
    chi.periodic()
    
    chi.get_absorption_spectrum('graphite_absorption')
    chi.check_sum_rule()

コード例 #2
0
ファイル: graphene.py プロジェクト: eojons/gpaw-scme
    atoms.set_calculator(calc)
    atoms.get_potential_energy()
    calc.write('graphene2.gpw','all')   

if EELS:

    calc = GPAW('graphene1.gpw',communicator=serial_comm)
                
    dw = 0.1  
    wmax = 35.
    f = paropen('graphene_q_list', 'w')

    for i in range(1, 10):
        q = np.array([i/30., 0., 0.]) # Gamma - M
#        q = np.array([i/30., -i/30., 0.]) # Gamma - K 
        chi = CHI()
        chi.nband = nband
        chi.initialize((calc,), q, wmax, dw, eta=0.2, Ecut = 50 + (i-1)*10)
        chi.periodic()

        chi.get_EELS_spectrum('graphene_EELS_' + str(i))
        chi.check_sum_rule()

        print >> f, sqrt(np.inner(chi.qq / Bohr, chi.qq / Bohr))
    
if OpticalLimit:
    
    calc1 = GPAW('graphene1.gpw',communicator=serial_comm)
    calc2 = GPAW('graphene2.gpw',communicator=serial_comm)
                
    dw = 0.1  
コード例 #3
0
    atoms.set_calculator(calc)
    atoms.get_potential_energy()
    calc.write('graphene2.gpw', 'all')

if EELS:

    calc = GPAW('graphene1.gpw', communicator=serial_comm)

    dw = 0.1
    wmax = 35.
    f = paropen('graphene_q_list', 'w')

    for i in range(1, 10):
        q = np.array([i / 30., 0., 0.])  # Gamma - M
        #        q = np.array([i/30., -i/30., 0.]) # Gamma - K
        chi = CHI()
        chi.nband = nband
        chi.initialize((calc, ), q, wmax, dw, eta=0.2, Ecut=50 + (i - 1) * 10)
        chi.periodic()

        chi.get_EELS_spectrum('graphene_EELS_' + str(i))
        chi.check_sum_rule()

        print >> f, sqrt(np.inner(chi.qq / Bohr, chi.qq / Bohr))

if OpticalLimit:

    calc1 = GPAW('graphene1.gpw', communicator=serial_comm)
    calc2 = GPAW('graphene2.gpw', communicator=serial_comm)

    dw = 0.1