# load point charges
fname = "pc.xyz"
if world.rank == 0:
    f = open("i" + fname, "w")
    print(
        """1

X 0 0 100 -0.5""",
        file=f,
    )
    f.close()
world.barrier()

ex = PointCharges()
ex.read("i" + fname)
ex.write("o" + fname)

convergence = {"eigenstates": 1.0e-4 * 40 * 1.5 ** 3, "density": 1.0e-2, "energy": 0.1}

# without potential
if True:
    if txt:
        print("\n################## no potential")
    c00 = GPAW(h=0.3, nbands=-1, convergence=convergence, txt=txt)
    c00.calculate(H2)
    eps00_n = c00.get_eigenvalues()

# 0 potential
if True:
    if txt:
txt = None
#txt = '-'

# load point charges
fname = 'pc.xyz'
if world.rank == 0:
    f = open('i' + fname, 'w')
    print("""1

X 0 0 100 -0.5""", file=f)
    f.close()
world.barrier()

ex = PointCharges()
ex.read('i' + fname)
ex.write('o' + fname)

convergence = {
    'eigenstates': 1.e-4 * 40 * 1.5**3,
    'density': 1.e-2,
    'energy': 0.1
}

# without potential
if True:
    if txt:
        print('\n################## no potential')
    c00 = GPAW(h=0.3, nbands=-1, convergence=convergence, txt=txt)
    c00.calculate(H2)
    eps00_n = c00.get_eigenvalues()
예제 #3
0
           cell=(a,a,c), pbc=False)
print at, 'dimer'
nelectrons = 2 * H2[0].number

txt = None
#txt = '-'

# load point charges
fname = 'pc.xyz'
f = open('i' + fname, 'w')
print >> f, """1

X 0 0 100 -0.5"""
f.close()
ex = PointCharges()
ex.read('i' + fname)
ex.write('o' + fname)

convergence = {'eigenstates':1.e-4, 'density':1.e-2, 'energy':0.1}

# without potential
if True:
    if txt:
        print '\n################## no potential'
    c00 = GPAW(h=0.3, nbands=-1,
               convergence=convergence,
               txt=txt)
    c00.calculate(H2)
    eps00_n = c00.get_eigenvalues()

# 0 potential