Beispiel #1
0
def test_hessian_full_water():
    ff = get_ff_water()
    hessian = estimate_cart_hessian(ff)
    assert hessian.shape == (9, 9)
    evals = np.linalg.eigvalsh(hessian)
    print(evals)
    assert sum(abs(evals) < 1e-10) == 3
Beispiel #2
0
def test_hessian_full_water():
    ff = get_ff_water()
    hessian = estimate_cart_hessian(ff)
    assert hessian.shape == (9, 9)
    evals = np.linalg.eigvalsh(hessian)
    print(evals)
    assert sum(abs(evals) < 1e-10) == 3
Beispiel #3
0
def test_CN_online_blind():
    # Setup a test FF and run simulation without any HDF5 file
    ff = get_ff_water()
    ff.update_rvecs(np.diag([20., 20., 20.]))
    select0 = ff.system.get_indexes('O')
    select1 = ff.system.get_indexes('H')
    rdf = RDF(4.5*angstrom, 0.1*angstrom, select0=select0, select1=select1)
    nve = VerletIntegrator(ff, 1.0*femtosecond, hooks=rdf)
    nve.run(5)
    assert nve.counter == 5
    assert rdf.nsample == 6
    assert (rdf.CN[:7] == 0).all()
    assert (np.round(rdf.CN[-7:], decimals=5) == 2).all()
Beispiel #4
0
def test_basic_water():
    nve = VerletIntegrator(get_ff_water(), 1.0 * femtosecond)
    nve.run(5)
    assert nve.counter == 5
Beispiel #5
0
def test_basic_water():
    nve = VerletIntegrator(get_ff_water(), 1.0*femtosecond)
    nve.run(5)
    assert nve.counter == 5