Changeset 3033


Ignore:
Timestamp:
Aug 30, 2017 3:09:56 PM (5 years ago)
Author:
vondreele
Message:

fixes to protein validate, "old" works; not "old" close but not perfect

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:global-ignores set to
      binwin2.7
  • trunk/GSASIImath.py

    r3030 r3033  
    26022602        if atom[1] in resNames:
    26032603            if atom[4].strip() in ['S','Se']:
     2604                if not old:
     2605                    continue        #S,Se skipped for erratv2?
    26042606                atom[3] = 'Os'
    26052607                atom[4] = 'O'
    26062608            cartAtoms.append(atom[:cx+3])
    26072609            cartAtoms[-1][cx:cx+3] = np.inner(Amat,cartAtoms[-1][cx:cx+3])
    2608             if atom[3] in ['N','CA','C','O']:
    2609                 cartAtoms[-1].append('B')
    2610             else:
    2611                 cartAtoms[-1].append('S')
    26122610    XYZ = np.array([atom[cx:cx+3] for atom in cartAtoms])
    26132611    xyzmin = np.array([np.min(XYZ.T[i]) for i in [0,1,2]])
     
    26622660        tgts = [tgt for tgt in tgts if atom[:3] != cartAtoms[tgt][:3]]    #exclude same residue
    26632661        ires = int(atom[0])
    2664         if atom[3].strip() == 'C':
    2665             tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'N' and int(cartAtoms[tgt][0]) in [ires-1,ires+1])]
    2666         elif atom[3].strip() == 'N':
    2667             tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() in ['C','CA'] and int(cartAtoms[tgt][0]) in [ires-1,ires+1])]
    2668         elif atom[3].strip() == 'CA':
    2669             tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'N' and int(cartAtoms[tgt][0]) in [ires-1,ires+1])]
     2662        if old:
     2663            if atom[3].strip() == 'C':
     2664                tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'N' and int(cartAtoms[tgt][0]) in [ires-1,ires+1])]
     2665            elif atom[3].strip() == 'N':
     2666                tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() in ['C','CA'] and int(cartAtoms[tgt][0]) in [ires-1,ires+1])]
     2667            elif atom[3].strip() == 'CA':
     2668                tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'N' and int(cartAtoms[tgt][0]) in [ires-1,ires+1])]
     2669        else:
     2670            if atom[3].strip() == 'C':
     2671                tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'N' and int(cartAtoms[tgt][0]) == ires+1)]
     2672            elif atom[3].strip() == 'N':
     2673                tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'C' and int(cartAtoms[tgt][0]) == ires-1)]
    26702674        for tgt in tgts:
    26712675            dsqt = np.sqrt(np.sum((XYZ[ia]-XYZ[tgt])**2))
  • trunk/GSASIIphsGUI.py

    r3030 r3033  
    32913291       
    32923292    def OnValidProtein(event):
    3293         old = GSASIIpath.GetConfigValue('Old protein validator',True)
     3293        old = GSASIIpath.GetConfigValue('Old_protein_validator',True)
    32943294        resNames,Probs = G2mth.validProtein(data,old)
    32953295        if old:             #duplicate errat.f 
  • trunk/config_example.py

    r3000 r3033  
    159159computations are performed in-line.
    160160'''
     161
     162Old_protein_validator = True
     163''' When True (default) select the old protein validator of Colovos & Yeates (errat) or
     164if False use that (erratv2) of Obukhov & Yeates.
     165'''
Note: See TracChangeset for help on using the changeset viewer.