Changeset 4505


Ignore:
Timestamp:
Jun 21, 2020 8:49:20 AM (3 years ago)
Author:
toby
Message:

more fixes to Res RB edit; tweak RB atom assignment displays

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r4503 r4505  
    31703170            def ChangeCell(event):
    31713171                r,c =  event.GetRow(),event.GetCol()
    3172                 if r >= 0 and (0 <= c < 3):
     3172                if c == 0:
     3173                    rbData['atNames'][r] = resGrid.GetCellValue(r,c)
     3174                if r >= 0 and (2 <= c <= 4):
    31733175                    try:
    31743176                        val = float(resGrid.GetCellValue(r,c))
    3175                         rbData['rbXYZ'][r][c] = val
     3177                        rbData['rbXYZ'][r][c-2] = val
    31763178                    except ValueError:
    31773179                        pass
  • trunk/GSASIIphsGUI.py

    r4504 r4505  
    1006010060            atoms that should be matched.
    1006110061            '''
    10062             UsedIds = []
    10063             for i in data['RBModels']:
    10064                 for j in data['RBModels'][i]:
    10065                     UsedIds += j['Ids']
    1006610062            rbType = data['testRBObj']['rbType']
    1006710063            rbObj = data['testRBObj']['rbObj']
     
    1007710073            # categorize atoms by type, omitting any that are already assigned
    1007810074            # in a rigid body
    10079             atmTypes = [None if atomData[i][-1] in UsedIds
     10075            atmTypes = [None if atomData[i][-1] in rbUsedIds
    1008010076                            else atomData[i][ct]
    1008110077                            for i in range(len(atomData))]
     
    1021710213                for i,l in enumerate(RigidBodies.atomsTable.data):
    1021810214                    if l[4] == 'Create new':
     10215                        l[1:4] = -1,'?',-1
    1021910216                        rbAssignments[i] = None
    1022010217                        selDict[i] = None
     
    1046810465            RigidBodies.atomsGrid = G2G.GSGrid(RigidBodies)
    1046910466
    10470             labelsChoices = ['         '] + [a[0] for a in data['Atoms']]
     10467            labelsChoices = ['         '] + [a[0] for a in data['Atoms']
     10468                                                 if a[-1] not in rbUsedIds]
    1047110469            choiceeditor = wg.GridCellChoiceEditor(
    1047210470                labelsChoices+['Create new'], False)
     
    1052310521        # start of OnRBAssign(event)
    1052410522        rbAssignments = {}
     10523        rbUsedIds = []   # Ids of atoms in current phase used inside RBs
     10524        for i in data['RBModels']:
     10525            for j in data['RBModels'][i]:
     10526                rbUsedIds += j['Ids']
    1052510527        G2frame.GetStatusBar().SetStatusText('',1)
    1052610528        RBData = G2frame.GPXtree.GetItemPyData(   
Note: See TracChangeset for help on using the changeset viewer.