예제 #1
0
파일: addStapConv.py 프로젝트: jakesyl/cing
def copy_from_convention(from_convention, new_convention, protein_only=True):
    """Copy nomenclature convention from from_convention to new_convention.

    Only copy standard protein residues if protein_only (defaults to True).
    """
    residue_definitions = NTdb.residuesWithProperties("protein")
    if not protein_only:
        residue_definitions = NTdb.allResidueDefs()

    for res_def in residue_definitions:
        nTdebug("Copying %s nomenclature convention to %s for %s", from_convention, new_convention, res_def)
        res_def.nameDict[new_convention] = res_def.nameDict[from_convention]
        for atom_def in res_def:
            atom_def.nameDict[new_convention] = atom_def.nameDict[from_convention]
            atom_def.postProcess()
        res_def.postProcess()
예제 #2
0
def correct_xplor_stap(protein_only=True):
    """Correct atom definitions copied from XPLOR for STAP.

    Only correct standard protein residues if protein_only (defaults to True).
    """
    remove_non_stap_residues(NTdb)
    correct_his_stap(NTdb)
    correct_hg_stap(NTdb['CYS'])
    correct_hg_stap(NTdb['SER'])
    correct_ile_d_stap(NTdb['ILE'])

    residue_definitions = NTdb.residuesWithProperties('protein')
    if not protein_only:
        residue_definitions = NTdb.allResidueDefs()

    for res_def in residue_definitions:
        correct_termini_stap(res_def)
        remove_pseudo_atoms(res_def)
예제 #3
0
def copy_from_convention(from_convention, new_convention, protein_only=True):
    """Copy nomenclature convention from from_convention to new_convention.

    Only copy standard protein residues if protein_only (defaults to True).
    """
    residue_definitions = NTdb.residuesWithProperties('protein')
    if not protein_only:
        residue_definitions = NTdb.allResidueDefs()

    for res_def in residue_definitions:
        nTdebug("Copying %s nomenclature convention to %s for %s",
                from_convention, new_convention, res_def)
        res_def.nameDict[new_convention] = res_def.nameDict[from_convention]
        for atom_def in res_def:
            atom_def.nameDict[new_convention] = atom_def.nameDict[
                from_convention]
            atom_def.postProcess()
        res_def.postProcess()
예제 #4
0
def correct_xplor_stap(protein_only=True):
    """Correct atom definitions copied from XPLOR for STAP.

    Only correct standard protein residues if protein_only (defaults to True).
    """
    remove_non_stap_residues(NTdb)
    correct_his_stap(NTdb)
    correct_hg_stap(NTdb['CYS'])
    correct_hg_stap(NTdb['SER'])
    correct_ile_d_stap(NTdb['ILE'])

    residue_definitions = NTdb.residuesWithProperties('protein')
    if not protein_only:
        residue_definitions = NTdb.allResidueDefs()

    for res_def in residue_definitions:
        correct_termini_stap(res_def)
        remove_pseudo_atoms(res_def)