def test_load_trr_no_velocities():
    box_vect_dir = "reduce_box_vects"
    gro = data_filename(box_vect_dir + "/dna.gro")
    trr = data_filename(box_vect_dir + "/dna.trr")
    traj = load_trr(trr, top=gro, velocities=False)
    for snap in traj:
        check_reduced_box_vectors(snap.box_vectors.value_in_unit(nm))
        assert np.count_nonzero(snap.velocities.value_in_unit(nm / ps)) == 0
def test_load_trr_no_velocities():
    box_vect_dir = "reduce_box_vects"
    gro = data_filename(box_vect_dir + "/dna.gro")
    trr = data_filename(box_vect_dir + "/dna.trr")
    traj = load_trr(trr, top=gro, velocities=False)
    for snap in traj:
        check_reduced_box_vectors(snap.box_vectors.value_in_unit(nm))
        assert np.count_nonzero(snap.velocities.value_in_unit(nm / ps)) == 0
def test_load_trr_with_velocities():
    if not (HAS_MDTRAJ and HAS_OPENMM):
        pytest.skip()
    box_vect_dir = "reduce_box_vects"
    gro = data_filename(box_vect_dir + "/dna.gro")
    trr = data_filename(box_vect_dir + "/dna.trr")
    traj = load_trr(trr, top=gro, velocities=True)
    for snap in traj:
        check_reduced_box_vectors(snap.box_vectors.value_in_unit(nm))
        assert np.count_nonzero(snap.velocities.value_in_unit(nm / ps)) > 0