Beispiel #1
0
def test_proc_struct_e():
    '''
    Test that proc_structs(filename) counts structs/atoms
    '''
    filename = '../data/test_structs_e.txt'

    structs = tsp.read_structs(filename)

    struct_info = tsp.proc_structs(structs)

    num_structs = 3
    num_atoms = [2, 4, 6]

    assert struct_info[0] == num_structs
    assert struct_info[1] == num_atoms
Beispiel #2
0
def test_proc_struct_e2():
    '''
    Test that proc_structs(filename) identifies invalids
    '''
    filename = '../data/test_structs_e.txt'

    structs = tsp.read_structs(filename)

    struct_info = tsp.proc_structs(structs)

    num_inv = 1
    list_inv = [1]

    assert struct_info[2][0] == num_inv
    assert struct_info[2][1] == list_inv
Beispiel #3
0
def test_proc_ts_coords():
    '''
    Test that proc_structs(filename) counts structs/atoms
    '''
    filename = '../data/ts_coords.txt'

    structs = tsp.read_structs(filename)

    struct_info = tsp.proc_structs(structs)

    num_structs = 38
    num_atoms = [
        35, 44, 38, 44, 50, 38, 50, 32, 41, 35, 41, 38, 41, 47, 47, 41, 35, 41,
        41, 41, 41, 32, 50, 41, 47, 32, 47, 44, 38, 41, 47, 41, 44, 44, 38, 44,
        38, 44
    ]

    assert struct_info[0] == num_structs
    assert struct_info[1] == num_atoms