Changeset 3029
- Timestamp:
- Aug 28, 2017 10:44:37 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r3003 r3029 2599 2599 xyzmin = 999.*np.ones(3) 2600 2600 xyzmax = -999.*np.ones(3) 2601 #select residue atoms, skipping main chain C & N;make cartesian2601 #select residue atoms,S,Se --> O make cartesian 2602 2602 for atom in Atoms: 2603 2603 if atom[1] in resNames: 2604 2604 if atom[4].strip() in ['S','Se']: 2605 atom[3] = 'Os' 2605 2606 atom[4] = 'O' 2606 # if atom[3].strip() in ['C','N']: #skip main chain C & N atoms2607 # continue2608 2607 cartAtoms.append(atom[:cx+3]) 2609 2608 cartAtoms[-1][cx:cx+3] = np.inner(Amat,cartAtoms[-1][cx:cx+3]) 2609 if atom[3] in ['N','CA','C','O']: 2610 cartAtoms[-1].append('B') 2611 else: 2612 cartAtoms[-1].append('S') 2610 2613 XYZ = np.array([atom[cx:cx+3] for atom in cartAtoms]) 2611 2614 xyzmin = np.array([np.min(XYZ.T[i]) for i in [0,1,2]]) … … 2644 2647 newChain = True 2645 2648 if atom[0] not in res: #new residue, get residue no. 2646 if len(res): print res[-1],resname[-1],intact2647 2649 res.append(atom[0]) 2648 2650 resname.append('%s-%s%s'%(atom[2],atom[0],atom[1])) … … 2658 2660 tgts += list(Boxes[jbox[0],jbox[1],jbox[2]]) 2659 2661 tgts = list(set(tgts)) 2660 tgts = [tgt for tgt in tgts if atom[1:3] != cartAtoms[tgt][1:3]] #exclude same residue2661 if atom[3].strip() in ['C',]:2662 tgts = [tgt for tgt in tgts if cartAtoms[tgt][3].strip() not in ['N',]] #exclude main chain C-N2663 if atom[3].strip() in ['N',]:2664 tgts = [tgt for tgt in tgts if cartAtoms[tgt][3].strip() not in ['C',]] #exclude main chain N-C2665 2662 tgts = [tgt for tgt in tgts if np.sum((XYZ[ia]-XYZ[tgt])**2) <= dsmax] 2663 tgts = [tgt for tgt in tgts if atom[:3] != cartAtoms[tgt][:3]] #exclude same residue 2664 ires = int(atom[0]) 2665 if atom[3].strip() == 'C': 2666 tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'N' and int(cartAtoms[tgt][0]) in [ires-1,ires+1])] 2667 elif atom[3].strip() == 'N': 2668 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])] 2669 elif atom[3].strip() == 'CA': 2670 tgts = [tgt for tgt in tgts if not (cartAtoms[tgt][3].strip() == 'N' and int(cartAtoms[tgt][0]) in [ires-1,ires+1])] 2666 2671 for tgt in tgts: 2667 2672 dsqt = np.sqrt(np.sum((XYZ[ia]-XYZ[tgt])**2)) … … 2680 2685 Probs = [0.,0.,0.,0.] 2681 2686 for i in range(4,nRes-4): 2682 print i,IntAct[i]2683 2687 mtrx = np.zeros(5) 2684 2688 summ = 0. … … 2697 2701 mtrx[3] += IntAct[j]['NN'] 2698 2702 mtrx[4] += IntAct[j]['NO'] 2699 print mtrx,np.sum(mtrx)2700 print summ2701 2703 mtrx /= summ 2702 2704 if old: … … 2706 2708 mtrx -= avg 2707 2709 prob = np.inner(np.inner(mtrx,b1),mtrx) 2708 print i, mtrx2709 2710 Probs.append(prob) 2710 2711 Probs += 4*[0.,] -
trunk/GSASIIphsGUI.py
r3000 r3029 3293 3293 resNames,Probs = G2mth.validProtein(data) 3294 3294 G2plt.PlotAAProb(G2frame,resNames,Probs,Title='Error score for %s'%(data['General']['Name']), 3295 thresh=[17.190823041860433,11.526684477428809]) 3295 thresh=[8.0,6.0]) 3296 # thresh=[17.190823041860433,11.526684477428809]) 3296 3297 3297 3298 def OnSetAll(event):
Note: See TracChangeset
for help on using the changeset viewer.