Exemplo n.º 1
0
def test__struct_check():
    """ test geom.is_atom
        test geom.is_linear
    """

    assert geom.is_atom(H_GEO)
    assert not geom.is_atom(C2H2CLF_GEO)

    assert not geom.is_linear(H_GEO)
    assert geom.is_linear(H2_GEO)
    assert not geom.is_linear(C2H2CLF_GEO)
    assert geom.is_linear(HCCH_GEO)
Exemplo n.º 2
0
def determine_struct_type(geo):
    """ determines the linear string
    """

    # Remove dummy atoms
    geo = [coords for coords in geo if coords[0] != 'X']

    if geom.is_atom(geo):
        struct_type = 'Monoatomic'
    else:
        if geom.is_linear(geo):
            struct_type = 'Linear'
        else:
            struct_type = 'Nonlinear'

    return struct_type