예제 #1
0
def test_read_gro_wrong_atom_number(gro_wrong_length):  # pylint: disable=redefined-outer-name
    """
    Test that the GRO reader raises an exception if the number of atoms is not
    consistent.
    """
    with pytest.raises(ValueError):
        gro.read_gro(gro_wrong_length)
예제 #2
0
def test_read_gro(gro_reference, exclude, ignh):  # pylint: disable=redefined-outer-name
    """
    Test the GRO reader.
    """
    filename, reference = gro_reference
    filter_molecule(reference, exclude=exclude, ignh=ignh)
    molecule = gro.read_gro(filename, exclude=exclude, ignh=ignh)
    pprint(list(molecule.nodes.items()))
    assert_molecule_equal(molecule, reference)