Exemple #1
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()
Exemple #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)
Exemple #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()
Exemple #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)