예제 #1
0
def test_th():
    with open("data/testfiles/MgH2O_6.xyz") as f:
        molecule = f.readlines()
    molecule.pop(0)
    molecule.pop(0)
    for i in range(len(molecule)):
        molecule[i] = molecule[i].split()
    A = dalsym.DALSYM(molecule)
    A.symmetry_threshold = 10**-3
    A.find_symmetry()
    assert A.point_group == "Th"
    A.symmetrize()
    assert A.point_group == "Th"
    lines = len(A.get_dalton_generator_file().split("\n"))
    assert A.point_group == "Th"
    assert lines == 15
예제 #2
0
def test_d5d_II():
    """Bug where C2p was identified wrong.
       But where sigma_h was identified wrong, if principle_axis[0] == 0."""
    with open("data/testfiles/ferrocene2.xyz") as f:
        molecule = f.readlines()
    molecule.pop(0)
    molecule.pop(0)
    for i in range(len(molecule)):
        molecule[i] = molecule[i].split()
    A = dalsym.DALSYM(molecule)
    A.symmetry_threshold = 10**-3
    A.find_symmetry()
    assert A.point_group == "D5d"
    A.symmetrize()
    assert A.point_group == "D5d"
    lines = len(A.get_dalton_generator_file().split("\n"))
    assert A.point_group == "D5d"
    assert lines == 15