예제 #1
0
파일: addAqua.py 프로젝트: jakesyl/cing
            'RGUA', 'RCYT', 'RADE', 'RTHY', 'RURA',
            )
mapCing2Aqua = {
                  'GUA': 'G',
                  'CYT': 'C',
                  'ADE': 'A',
                  'THY': 'T',
                  'URA': 'U',

                  'RGUA': 'G',
                  'RCYT': 'C',
                  'RADE': 'A',
                  'RTHY': 'T',
                  'RURA': 'U',
                  }


for res in NTdb:
    res.nameDict[AQUA] = res.nameDict[IUPAC]

    if res.name in nuclList:
        res.nameDict[AQUA] = mapCing2Aqua[res.name]

    for atm in res:
        atm.nameDict[AQUA] = atm.nameDict[IUPAC]

stream = open('dbTable-new', 'w')
NTdb.exportDef(stream=stream)
stream.close()

예제 #2
0
    'GUA',
    'CYT',
    'ADE',
    'THY',
    'URA',
    'RGUA',
    'RCYT',
    'RADE',
    'RTHY',
    'RURA',
)
mapCyana2Xplor = {
    'OP1': 'O1P',
    'OP2': 'O2P',
    'H2"': "H2''",
    'H5"': "H5''",
}
mapCyana2XplorKeys = mapCyana2Xplor.keys()

for res in NTdb:
    if not res.name in nuclList:
        continue
    for atm in res:
        atm.nameDict[XPLOR] = atm.nameDict[CYANA]
        if atm.nameDict[CYANA] in mapCyana2XplorKeys:
            atm.nameDict[XPLOR] = mapCyana2Xplor[atm.nameDict[CYANA]]

stream = open('dbTable-new', 'w')
NTdb.exportDef(stream=stream)
stream.close()
예제 #3
0
    HIS=['HIS', 'HIS+', 'HIST'],
    LYS=['LYS', 'LYS+'],
)

for line in AwkLikeS(shifts):
    if (not line.isComment() and line.NF == 8):
        if (line.dollar[1] in resEquiv):
            resNames = resEquiv[line.dollar[1]]
        else:
            resNames = line.dollar[1:2]
        #end if

        for resName in resNames:
            res = NTdb[resName]

            atm = NTdb.getAtomDefByName(resName, line.dollar[2], IUPAC)
            if atm != None:
                atm.shift = NTdict(average=line.float(7), sd=line.float(8))
            else:
                nTmessage('>>> line %d: %s', line.NR, line.dollar[0])

#also get the pseudo shifts
for res in NTdb:
    for atm in res:
        ave = 0.0
        sd = 0.0
        n = 0
        for aN in atm.real:
            a = res[aN]
            if a.shift != None:
                ave += a.shift.average
예제 #4
0
    if rdef.name != rdef.translate('BMRB'):
        printf(' ****\n')
    else:
        printf('\n')

    for adef in rdef:
        bname = adef.translate('BMRB')
        cname = adef.translate('CYANA2')
        if bname != cname:
            printf('IUPAC: %-8s  CYANA2: %-8s\n', bname, cname)
    #end for

    print('\n')
#end for

for adef in NTdb.atomsWithProperties('HN'):
    adef.aliases = ['HN','H']
for adef in NTdb.atomsWithProperties('C'): # This generated erros with the cys residues
    adef.aliases = ['C','CO']

printf('''
===================================================================================
- Changing existing BMRB->IUPAC
- Changing existing INTERNAL->INTERNAL_0
- Adding INTERNAL_1 ResidueDefs:
  keep original residue names (manual check required)
- Adding INTERNAL_1 atomDefs:
  Use BMRB/IUPAC or CYANA2 if BMRB/IUPAC undefined
  Add CYANA2 names as alias if different from BMRB/IUPAC
===================================================================================
예제 #5
0
HIS = ['HIS', 'HIS+', 'HIST'],
LYS = ['LYS', 'LYS+'],
)

for line in AwkLikeS( shifts ):
    if (not line.isComment() and line.NF == 8):
        if (line.dollar[1] in resEquiv):
            resNames = resEquiv[line.dollar[1]]
        else:
            resNames = line.dollar[1:2]
        #end if

        for resName in resNames:
            res = NTdb[resName]

            atm = NTdb.getAtomDefByName( resName, line.dollar[2], IUPAC )
            if atm != None:
                atm.shift = NTdict( average=line.float(7), sd=line.float(8) )
            else:
                nTmessage( '>>> line %d: %s', line.NR, line.dollar[0] )

#also get the pseudo shifts
for res in NTdb:
    for atm in res:
        ave = 0.0
        sd = 0.0
        n = 0
        for aN in atm.real:
            a = res[aN]
            if a.shift != None:
                ave += a.shift.average
예제 #6
0
    if rdef.name != rdef.translate('BMRB'):
        printf(' ****\n')
    else:
        printf('\n')

    for adef in rdef:
        bname = adef.translate('BMRB')
        cname = adef.translate('CYANA2')
        if bname != cname:
            printf('IUPAC: %-8s  CYANA2: %-8s\n', bname, cname)
    #end for

    print('\n')
#end for

for adef in NTdb.atomsWithProperties('HN'):
    adef.aliases = ['HN', 'H']
for adef in NTdb.atomsWithProperties(
        'C'):  # This generated erros with the cys residues
    adef.aliases = ['C', 'CO']

printf('''
===================================================================================
- Changing existing BMRB->IUPAC
- Changing existing INTERNAL->INTERNAL_0
- Adding INTERNAL_1 ResidueDefs:
  keep original residue names (manual check required)
- Adding INTERNAL_1 atomDefs:
  Use BMRB/IUPAC or CYANA2 if BMRB/IUPAC undefined
  Add CYANA2 names as alias if different from BMRB/IUPAC
===================================================================================
예제 #7
0
#@PydevCodeAnalysisIgnore # pylint: disable-all
from cing.Libs.NTutils import *
from cing.core.database import ResidueDef
from cing import NTdb
import cing

stream = open('dbTable.new', 'w')
NTdb.exportDef(stream=stream, convention='INTERNAL_1')
stream.close()