Beispiel #1
0
def test_anisou():
    """Test writing ANISOU entries."""
    ppdb = PandasPDB()
    ppdb.read_pdb(TESTDATA_FILENAME2)
    ppdb.to_pdb(path=OUTFILE, records=None)
    with open(OUTFILE, "r") as f:
        f1 = f.read()
    # os.remove(OUTFILE)
    assert f1 == four_eiy
Beispiel #2
0
def test_records():
    """Test private _read_pdb."""
    ppdb = PandasPDB()
    ppdb.read_pdb(TESTDATA_FILENAME)
    ppdb.to_pdb(path=OUTFILE, records=["HETATM"])
    with open(OUTFILE, "r") as f:
        f1 = f.read()
    os.remove(OUTFILE)
    assert f1 == hetatm
Beispiel #3
0
def test_anisou():
    """Test writing ANISOU entries."""
    ppdb = PandasPDB()
    ppdb.read_pdb(TESTDATA_FILENAME2)
    ppdb.to_pdb(path=OUTFILE, records=None)
    with open(OUTFILE, 'r') as f:
        f1 = f.read()
    # os.remove(OUTFILE)
    assert f1 == four_eiy
Beispiel #4
0
def test_records():
    """Test private _read_pdb."""
    ppdb = PandasPDB()
    ppdb.read_pdb(TESTDATA_FILENAME)
    ppdb.to_pdb(path=OUTFILE, records=['HETATM'])
    with open(OUTFILE, 'r') as f:
        f1 = f.read()
    os.remove(OUTFILE)
    assert f1 == hetatm
Beispiel #5
0
def test_defaults():
    ppdb = PandasPDB()
    ppdb.read_pdb(TESTDATA_FILENAME)
    ppdb.to_pdb(path=OUTFILE, records=None)
    with open(TESTDATA_FILENAME, "r") as f:
        f1 = f.read()
    with open(OUTFILE, "r") as f:
        f2 = f.read()
    assert f1 == f2
    os.remove(OUTFILE)
Beispiel #6
0
def test_defaults():
    ppdb = PandasPDB()
    ppdb.read_pdb(TESTDATA_FILENAME)
    ppdb.to_pdb(path=OUTFILE, records=None)
    with open(TESTDATA_FILENAME, 'r') as f:
        f1 = f.read()
    with open(OUTFILE, 'r') as f:
        f2 = f.read()
    assert f1 == f2
    os.remove(OUTFILE)