Beispiel #1
0
def test_assign_histidine():
    fn = get_fn('4lzt/4lzt_h.pdb')
    parm = pmd.load_file(fn)
    his_residues = [
        res.name for res in parm.residues
        if res.name in {'HIS', 'HIE', 'HID', 'HIP'}
    ]
    assert his_residues == ['HIS']

    pdbfixer = AmberPDBFixer(parm)
    pdbfixer.assign_histidine()
    his_residues = [
        res.name for res in pdbfixer.parm.residues
        if res.name in {'HIS', 'HIE', 'HID', 'HIP'}
    ]
    assert his_residues == ['HID']

    # Do not rename to HIS if this residue does not
    # have hydrogen.
    parm2 = pmd.Structure()
    for resnum, resname in enumerate(['HIE', 'HID', 'HIS']):
        atom = pmd.Atom(name='C', atomic_number=6)
        parm2.add_atom(atom, resname, resnum=resnum, chain='A')
    fixer2 = AmberPDBFixer(parm2)
    fixer2.assign_histidine()
    assert ['HIE', 'HID', 'HIS'] == [res.name for res in fixer2.parm.residues]
Beispiel #2
0
def test_assign_histidine():
    fn = get_fn('4lzt/4lzt_h.pdb')
    parm = pmd.load_file(fn)
    his_residues = [
        res.name for res in parm.residues
        if res.name in {'HIS', 'HIE', 'HID', 'HIP'}
    ]
    assert his_residues == ['HIS']

    pdbfixer = AmberPDBFixer(parm)
    pdbfixer.assign_histidine()
    his_residues = [
        res.name for res in pdbfixer.parm.residues
        if res.name in {'HIS', 'HIE', 'HID', 'HIP'}
    ]
    assert his_residues == ['HID']