Example #1
0
def test_read_xyz(mock_open):

    output_line = "@ << A; B, C, D >>  =         -30.99202444"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('XDIPLEN', 'YDIPLEN', 'ZDIPLEN', 'WDIPLEN')
    assert calc.get_output() ==  -30.99202444
Example #2
0
def test_read_yz(mock_open):

    output_line = "@ -<< XXQUADRU ; YDIPLEN  >> =  4.395689062431D-01"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('XXQUADRU', 'YDIPLEN')
    assert calc.get_output() == -4.395689062431e-01
Example #3
0
def test_read_xyz(mock_open):

    output_line = "@ omega B, omega C, QR value :     0.00000000     0.00000000 3.68627919"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('XDIPLEN', 'YDIPLEN', 'ZDIPLEN')
    assert calc.get_output() ==  3.68627919
Example #4
0
def test_read_energy(mock_open):

    output_line = "Final energy: 3.14"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc()
    assert calc.get_output() ==  3.14
Example #5
0
def test_read_z(mock_open):

    output_line = "YDIPLEN  total        :    -1.03702475"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('YDIPLEN')
    assert calc.get_output() ==  -1.03702475
Example #6
0
def test_read_xyz(mock_open):

    output_line = "@ << A; B, C, D >>  =         -30.99202444"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('XDIPLEN', 'YDIPLEN', 'ZDIPLEN', 'WDIPLEN')
    assert calc.get_output() == -30.99202444
Example #7
0
def test_read_xyz(mock_open):

    output_line = "@ omega B, omega C, QR value :     0.00000000     0.00000000 3.68627919"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('XDIPLEN', 'YDIPLEN', 'ZDIPLEN')
    assert calc.get_output() == 3.68627919
Example #8
0
def test_read_yz(mock_open):

    output_line = "@ -<< XXQUADRU ; YDIPLEN  >> =  4.395689062431D-01"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('XXQUADRU', 'YDIPLEN')
    assert calc.get_output() == -4.395689062431e-01
Example #9
0
def test_read_z(mock_open):

    output_line = "YDIPLEN  total        :    -1.03702475"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc('YDIPLEN')
    assert calc.get_output() == -1.03702475
Example #10
0
def test_read_energy(mock_open):

    output_line = "Final energy: 3.14"
    mock_open.return_value = mock_loop(output_line)

    calc = RspCalc()
    assert calc.get_output() == 3.14