Changeset 1683 for trunk/GSASIImath.py


Ignore:
Timestamp:
Feb 28, 2015 6:24:48 PM (7 years ago)
Author:
vondreele
Message:

further fixes to FindMolecule? - remove SymOp? stuff; not needed & caused memory errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r1674 r1683  
    209209    def getNeighbors(atom,radius):
    210210        neighList = [] 
    211         Dx = IARS[1]-np.array(atom[cx:cx+3])
     211        Dx = UAtoms-np.array(atom[cx:cx+3])
    212212        dist = ma.masked_less(np.sqrt(np.sum(np.inner(Amat,Dx)**2,axis=0)),0.5) #gets rid of disorder "bonds" < 0.5A
    213         sumR = IARS[2]+radius
     213        sumR = Radii+radius
    214214        return set(ma.nonzero(ma.masked_greater(dist-factor*sumR,0.))[0])                #get indices of bonded atoms
    215215
     
    233233    Indx = range(nAtom)
    234234    UAtoms = []
    235     SymOp = []
    236235    Radii = []
    237236    for atom in atomData:
    238237        UAtoms.append(np.array(atom[cx:cx+3]))
    239238        Radii.append(radii[atomTypes.index(atom[ct])])
    240         SymOp += [[1,0,unit],]
    241239    UAtoms = np.array(UAtoms)
    242240    Radii = np.array(Radii)
     
    244242        UAtoms = np.concatenate((UAtoms,(np.inner(Op[0],UAtoms[:nAtom]).T+Op[1])))
    245243        Radii = np.concatenate((Radii,Radii[:nAtom]))
    246         SymOp += [[nOp,0,unit] for symop in SymOp]
    247244        Indx += Indx[:nAtom]
    248245    for icen,cen in enumerate(SGData['SGCen'][1:]):
    249246        UAtoms = np.concatenate((UAtoms,(UAtoms+cen)))
    250247        Radii = np.concatenate((Radii,Radii))
    251         SymOp += [[symop[0],icen+1,unit] for symop in SymOp]
    252248        Indx += Indx[:nAtom]
    253249    if SGData['SGInv']:
    254250        UAtoms = np.concatenate((UAtoms,-UAtoms))
    255251        Radii = np.concatenate((Radii,Radii))
    256         SymOp += [[-symop[0],symop[1],unit] for symop in SymOp]
    257252        Indx += Indx
    258253    UAtoms %= 1.
     
    262257            UAtoms = np.concatenate((UAtoms,UAtoms[:mAtoms]+unit))
    263258            Radii = np.concatenate((Radii,Radii[:mAtoms]))
    264             SymOp += [[symop[0],symop[1],unit] for symop in SymOp[:mAtoms]]                       
    265259            Indx += Indx[:mAtoms]
    266260    UAtoms = np.array(UAtoms)
    267261    Radii = np.array(Radii)
    268     IARS = [Indx,UAtoms,Radii,SymOp]
    269262    newAtoms = [atomData[ind],]
    270263    atomData[ind] = None
Note: See TracChangeset for help on using the changeset viewer.