def test_turbomole_h2o():
    from ase.calculators.turbomole import Turbomole
    from ase.build import molecule

    mol = molecule('H2O')

    params = {
        'title': 'water',
        'task': 'geometry optimization',
        'use redundant internals': True,
        'basis set name': 'def2-SV(P)',
        'total charge': 0,
        'multiplicity': 1,
        'use dft': True,
        'density functional': 'b3-lyp',
        'use resolution of identity': True,
        'ri memory': 1000,
        'force convergence': 0.001,
        'geometry optimization iterations': 50,
        'scf iterations': 100
    }

    calc = Turbomole(**params)
    mol.calc = calc
    calc.calculate(mol)
    assert calc.converged

    # use the get_property() method
    print(calc.get_property('energy', mol, False))
    print(calc.get_property('forces', mol, False))
    print(calc.get_property('dipole', mol, False))

    # use the get_results() method
    results = calc.get_results()
    print(results['molecular orbitals'])

    # use the __getitem__() method
    print(calc['results']['molecular orbitals'])
    print(calc['results']['geometry optimization history'])

    # perform a normal mode calculation with the optimized structure

    params.update({
        'task': 'normal mode analysis',
        'density convergence': 1.0e-7
    })

    calc = Turbomole(**params)
    mol.calc = calc
    calc.calculate(mol)

    print(calc['results']['vibrational spectrum'])
    print(calc.todict(skip_default=False))
Beispiel #2
0
def test_turbomole_au13():
    from ase.cluster.cubic import FaceCenteredCubic
    from ase.calculators.turbomole import Turbomole

    surfaces = [(1, 0, 0), (1, 1, 0), (1, 1, 1)]
    layers = [1, 2, 1]
    atoms = FaceCenteredCubic('Au', surfaces, layers, latticeconstant=4.08)

    params = {
        'title': 'Au13-',
        'task': 'energy',
        'basis set name': 'def2-SV(P)',
        'total charge': -1,
        'multiplicity': 1,
        'use dft': True,
        'density functional': 'pbe',
        'use resolution of identity': True,
        'ri memory': 1000,
        'use fermi smearing': True,
        'fermi initial temperature': 500,
        'fermi final temperature': 100,
        'fermi annealing factor': 0.9,
        'fermi h**o-lumo gap criterion': 0.09,
        'fermi stopping criterion': 0.002,
        'scf energy convergence': 1.e-4,
        'scf iterations': 250
    }

    calc = Turbomole(**params)
    atoms.calc = calc
    calc.calculate(atoms)

    # use the get_property() method
    print(calc.get_property('energy'))
    print(calc.get_property('dipole'))

    # test restart

    params = {'task': 'gradient', 'scf energy convergence': 1.e-6}

    calc = Turbomole(restart=True, **params)
    assert calc.converged
    calc.calculate()

    print(calc.get_property('energy'))
    print(calc.get_property('forces'))
    print(calc.get_property('dipole'))
Beispiel #3
0
    'density functional': 'pbe',
    'use resolution of identity': True,
    'ri memory': 1000,
    'use fermi smearing': True,
    'fermi initial temperature': 500,
    'fermi final temperature': 100,
    'fermi annealing factor': 0.9,
    'fermi h**o-lumo gap criterion': 0.09,
    'fermi stopping criterion': 0.002,
    'scf energy convergence': 1.e-4,
    'scf iterations': 250
}

calc = Turbomole(**params)
atoms.set_calculator(calc)
calc.calculate(atoms)

# use the get_property() method
print(calc.get_property('energy'))
print(calc.get_property('dipole'))

# test restart

params = {'task': 'gradient', 'scf energy convergence': 1.e-6}

calc = Turbomole(restart=True, **params)
assert calc.converged
calc.calculate()

print(calc.get_property('energy'))
print(calc.get_property('forces'))
Beispiel #4
0
    'use redundant internals': True,
    'basis set name': 'def2-SV(P)',
    'total charge': 0,
    'multiplicity': 1,
    'use dft': True,
    'density functional': 'b3-lyp',
    'use resolution of identity': True,
    'ri memory': 1000,
    'force convergence': 0.001,
    'geometry optimization iterations': 50,
    'scf iterations': 100
}

calc = Turbomole(**params)
mol.set_calculator(calc)
calc.calculate(mol)
assert calc.converged

# use the get_property() method
print(calc.get_property('energy', mol, False))
print(calc.get_property('forces', mol, False))
print(calc.get_property('dipole', mol, False))

# use the get_results() method
results = calc.get_results()
print(results['molecular orbitals'])

# use the __getitem__() method
print(calc['results']['molecular orbitals'])
print(calc['results']['geometry optimization history'])