Changeset 2859 for trunk/GSASIImath.py
- Timestamp:
- Jun 6, 2017 7:49:22 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r2858 r2859 2609 2609 Boxes[box[0],box[1],box[2],0] += 1 2610 2610 Boxes[box[0],box[1],box[2],Boxes[box[0],box[1],box[2],0]] = ib 2611 pstat = 0.2612 stat = 0.2613 mtrxstat = 0.2614 for ia,atom in cartAtoms:2615 if not i: #skip 1st atom2611 indices = (-1,0,1) 2612 Units = np.array([[h,k,l] for h in indices for k in indices for l in indices]) 2613 dsmax = 3.75**2 2614 for ia,atom in enumerate(cartAtoms): 2615 if atom[3].strip() in ['C','N']: #skip main chain C & N atoms 2616 2616 continue 2617 if atom[0] != cartAtom[ia-1][0]: #new residue - start analysis 2618 c = np.zeros((3,3)) 2619 s = 1 2620 2617 ibox = iBox[ia] #box location of atom 2618 tgts = [] 2619 for unit in Units: 2620 jbox = ibox+unit 2621 if np.all(jbox>=0) and np.all((jbox-nbox[:3])<0): 2622 tgts += list(Boxes[jbox[0],jbox[1],jbox[2]]) 2623 tgts = list(set(tgts)) 2624 tgts = [tgt for tgt in tgts if atom[1:3] != cartAtoms[tgt][1:3]] #exclude same residue 2625 tgts = [tgt for tgt in tgts if cartAtoms[tgt][3].strip() not in ['C','N']] #exclude main chain 2626 tgts = [tgt for tgt in tgts if np.sum((XYZ[ia]-XYZ[tgt])**2) <= dsmax] 2627 2628 2621 2629 print 'Do VALIDPROTEIN analysis - TBD' 2622 2630
Note: See TracChangeset
for help on using the changeset viewer.