Changeset 2285


Ignore:
Timestamp:
May 21, 2016 1:19:32 PM (6 years ago)
Author:
vondreele
Message:

add importer for Shelx .ins files
also one for old GSAS Pnn powder histogram files.

Location:
trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r2278 r2285  
    7979    mainFrame.setSizePosLeft(Size)
    8080   
    81 #def FindBondsToo():                         #works but slow for large structures - keep as reference
    82 #    cx,ct,cs,ci = data['Drawing']['atomPtrs']
    83 #    atomData = data['Drawing']['Atoms']
    84 #    generalData = data['General']
    85 #    Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])
    86 #    radii = generalData['BondRadii']
    87 #    atomTypes = generalData['AtomTypes']
    88 #    try:
    89 #        indH = atomTypes.index('H')
    90 #        radii[indH] = 0.5
    91 #    except:
    92 #        pass           
    93 #    for atom in atomData:
    94 #        atom[-1] = []
    95 #    Atoms = []
    96 #    for i,atom in enumerate(atomData):
    97 #        Atoms.append([i,np.array(atom[cx:cx+3]),atom[cs],radii[atomTypes.index(atom[ct])]])
    98 #    for atomA in Atoms:
    99 #        if atomA[2] in ['lines','sticks','ellipsoids','balls & sticks','polyhedra']:
    100 #            for atomB in Atoms:                   
    101 #                Dx = atomB[1]-atomA[1]
    102 #                DX = np.inner(Amat,Dx)
    103 #                dist = np.sqrt(np.sum(DX**2))
    104 #                sumR = atomA[3]+atomB[3]
    105 #                if 0.5 < dist <= 0.85*sumR:
    106 #                    i = atomA[0]
    107 #                    if atomA[2] == 'polyhedra':
    108 #                        atomData[i][-1].append(DX)
    109 #                    elif atomB[1] != 'polyhedra':
    110 #                        j = atomB[0]
    111 #                        atomData[i][-1].append(Dx*atomA[3]/sumR)
    112 #                        atomData[j][-1].append(-Dx*atomB[3]/sumR)
    113                
    11481def FindBondsDraw(data):   
    11582    '''uses numpy & masks - very fast even for proteins!
     
    479446                    generalData['SuperSg'] = SetDefaultSSsymbol()
    480447                    generalData['SSGData'] = G2spc.SSpcGroup(generalData['SGData'],generalData['SuperSg'])[1]
     448                Atoms = data['Atoms']
     449                cx = generalData['AtomPtrs'][0]
     450                for atom in Atoms:
     451                    XYZ = atom[cx:cx+3]
     452                    Sytsym,Mult = G2spc.SytSym(XYZ,SGData)
     453                    atom[cx+4] = Sytsym
     454                    atom[cx+5] = Mult
    481455                wx.CallAfter(UpdateGeneral)
    482456               
Note: See TracChangeset for help on using the changeset viewer.