コード例 #1
0
def test_parsegetRecords():
    # Test the change made in the lambda function of getRecords method
    from MolKit.pdbParser import PdbParser
    parser = PdbParser("Data/1crn.pdb")
    parser.readFile()
    parser.getKeys()
    
    atmRec = parser.getRecords(parser.allLines,"ATOM")
    assert len(atmRec) == 327
コード例 #2
0
def test_parsegetRecords():
    # Test the change made in the lambda function of getRecords method
    from MolKit.pdbParser import PdbParser
    parser = PdbParser("Data/1crn.pdb")
    parser.readFile()
    parser.getKeys()

    atmRec = parser.getRecords(parser.allLines, "ATOM")
    assert len(atmRec) == 327
コード例 #3
0
def test_parseHYDBND_1():
    """
    """
    from MolKit.pdbParser import PdbParser
    parser = PdbParser("Data/smfx_badHYDBND.pdb")
    parser.PDBtags.remove("HYDBND")
    del parser.pdbRecordParser['HYDBND']
    parser.parse()
    failure = False
    hdbndLines = parser.getRecords(parser.allLines, "HYDBND")
    try:
        parser.parse_PDB_HYDBND(hbndLines)
    except:
        failure = True
    assert failure 
コード例 #4
0
def test_parseHYDBND_1():
    """
    """
    from MolKit.pdbParser import PdbParser
    parser = PdbParser("Data/smfx_badHYDBND.pdb")
    parser.PDBtags.remove("HYDBND")
    del parser.pdbRecordParser['HYDBND']
    parser.parse()
    failure = False
    hdbndLines = parser.getRecords(parser.allLines, "HYDBND")
    try:
        parser.parse_PDB_HYDBND(hbndLines)
    except:
        failure = True
    assert failure