Beispiel #1
0
def test_write_0():
    with XTCTrajectoryFile(fn_xtc) as f:
        xyz = f.read()[0]

    f = XTCTrajectoryFile(temp, 'w')
    f.write(xyz)
    f.close()

    with XTCTrajectoryFile(temp) as f:
        xyz2, time2, step2, box2 = f.read()
    eq(xyz, xyz2)
Beispiel #2
0
def test_write_0(tmpdir, fn_xtc):
    with XTCTrajectoryFile(fn_xtc) as f:
        xyz = f.read()[0]

    tmpfn = '{}/traj.xtc'.format(tmpdir)
    f = XTCTrajectoryFile(tmpfn, 'w')
    f.write(xyz)
    f.close()

    with XTCTrajectoryFile(tmpfn) as f:
        xyz2, time2, step2, box2 = f.read()
    eq(xyz, xyz2)
Beispiel #3
0
def test_write_0(tmpdir, fn_xtc):
    with XTCTrajectoryFile(fn_xtc) as f:
        xyz = f.read()[0]

    tmpfn = '{}/traj.xtc'.format(tmpdir)
    f = XTCTrajectoryFile(tmpfn, 'w')
    f.write(xyz)
    f.close()

    with XTCTrajectoryFile(tmpfn) as f:
        xyz2, time2, step2, box2 = f.read()
    eq(xyz, xyz2)