Changeset 2482


Ignore:
Timestamp:
Sep 30, 2016 1:44:10 PM (5 years ago)
Author:
vondreele
Message:

allow atom constraints between phases

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r2481 r2482  
    840840            else:
    841841                constr = [[1.0,G2obj.G2VarObj(name)]]
    842             pref = name.rsplit(':',1)[0]
     842            pref = ':'+name.rsplit(':',1)[0].split(':',1)[1]    #get stuff between phase id & atom id
    843843            for sel in Selections:
    844                 id = Atoms[AtNames[sel]][0].rsplit(':',1)[-1]
     844                name2 = Atoms[AtNames[sel]][0]
     845                pid = name2.split(':',1)[0]                     #get phase id for 2nd atom
     846                id = name2.rsplit(':',1)[-1]                    #get atom no. for 2nd atom
    845847                if 'riding' in constType:
     848                    pref = pid+pref
    846849                    if 'AUiso' in pref:
    847850                        parts = pref.split('AUiso')
     
    850853                        constr += [[1.0,G2obj.G2VarObj('%s:%s'%(pref,id))]]
    851854                else:
    852                     constr += [[1.0,G2obj.G2VarObj('%s:%s'%(pref,id))]]
     855                    constr += [[1.0,G2obj.G2VarObj('%s:%s'%(pid+pref,id))]]
    853856            if not constr:
    854857                continue
  • trunk/GSASIIgrid.py

    r2480 r2482  
    678678        mainSizer.Add(sgSizer,0,WACV)
    679679        if 'magnetic' not in self.Phase['General']['Type']:
    680             mag = wx.CheckBox(self.panel,label=' Make magnetic phase?')
     680            mag = wx.CheckBox(self.panel,label=' Make new phase magnetic?')
    681681            mag.Bind(wx.EVT_CHECKBOX,OnMag)
    682682            mainSizer.Add(mag,0,WACV)
     683            mainSizer.Add(wx.StaticText(self.panel, \
     684                label=' NB: Nonmagnetic atoms will be deleted from new phase'),0,WACV)
    683685
    684686        TestBtn = wx.Button(self.panel,-1,"Test")
  • trunk/GSASIIlattice.py

    r2481 r2482  
    241241    :param ifMag: bool True if convert to magnetic phase;
    242242        if True all nonmagnetic atoms will be removed
     243       
     244    This needs to properly transform magnetic moments for mag - mag transforms
    243245    '''
    244246   
  • trunk/GSASIIphsGUI.py

    r2481 r2482  
    13901390            G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Phases'),text=phaseName)
    13911391        G2frame.PatternTree.SetItemPyData(sub,newPhase)
     1392        # if nuc - mag transformtion: make constraints here? Needed for Type 4 magnetics
    13921393       
    13931394################################################################################
Note: See TracChangeset for help on using the changeset viewer.