Ejemplo n.º 1
0
def test_point_charge():
    os.chdir(os.path.join(here, 'data', 'xtb'))
    XTB.available = True

    test_mol = Molecule(name='test_mol', smiles='C')

    # Methane with a point charge fairly far away
    calc = Calculation(name='opt_point_charge',
                       molecule=test_mol,
                       method=method,
                       keywords=Config.XTB.keywords.opt,
                       point_charges=[PointCharge(charge=1.0, x=10, y=1, z=1)])
    calc.run()

    assert -4.178 < calc.get_energy() < -4.175
    os.chdir(here)