@@ -0,0 +1,1558 @@
+# BioPandas%0A# Author: Arian Jamasb %3Carian@jamasb.io%3E, Sebastian Raschka %3Cmail@sebastianraschka.com%3E%0A# License: BSD 3 clause%0A# Project Website: http://rasbt.github.io/biopandas/%0A# Code Repository: https://github.com/rasbt/biopandas%0A%0Aimport os%0A%0Aimport pandas as pd%0Afrom biopandas.mmcif import PandasMMCIF%0A%0A%0Adef test_equal():%0A    TESTDATA_1t48 = os.path.join(os.path.dirname(__file__), %22data%22, %221t48.cif%22)%0A%0A    p1t48 = PandasMMCIF()%0A    p1t48.read_mmcif(TESTDATA_1t48)%0A    dist = p1t48.distance(xyz=(70.785, 15.477, 23.359), records=(%22ATOM%22,))%0A%0A    expect = pd.Series(%0A        %5B2.533259, 1.520502, 0.000000, 1.257597, 1.252510%5D, index=%5B12, 13, 14, 15, 16%5D%0A    )%0A    assert dist%5Bdist %3C 3%5D.all() == expect.all()%0A%0A%0Adef test_deprecated_str_arg():%0A    TESTDATA_1t48 = os.path.join(os.path.dirname(__file__), %22data%22, %221t48.cif%22)%0A%0A    p1t48 = PandasMMCIF()%0A    p1t48.read_mmcif(TESTDATA_1t48)%0A    dist = p1t48.distance(xyz=(70.785, 15.477, 23.359), records=%22ATOM%22)%0A%0A    expect = pd.Series(%0A        %5B2.533259, 1.520502, 0.000000, 1.257597, 1.252510%5D, index=%5B12, 13, 14, 15, 16%5D%0A    )%0A    assert dist%5Bdist %3C 3%5D.all() == expect.all()%0A%0A%0Adef test_use_external_df():%0A    TESTDATA_1t48 = os.path.join(os.path.dirname(__file__), %22data%22, %221t48.cif%22)%0A%0A    p1t48 = PandasMMCIF()%0A    p1t48.read_mmcif(TESTDATA_1t48)%0A    new_df = p1t48.df%5B%22ATOM%22%5D.iloc%5B:-1, :%5D.copy()%0A    dist = PandasMMCIF.distance_df(df=new_df, xyz=(70.785, 15.477, 23.359))%0A%0A    expect = pd.Series(%5B2.533259, 1.520502, 0.000000, 1.257597%5D, index=%5B12, 13, 14, 15%5D)%0A    assert dist%5Bdist %3C 3%5D.all() == expect.all()%0A

add distance test