Changeset 1471


Ignore:
Timestamp:
Aug 19, 2014 4:07:58 PM (7 years ago)
Author:
vondreele
Message:

fix the Move=True stuff in G2spc.GenAtom? & force molecule centers to be in unit cell for MC/SA results keeping molecules intact. Also makes numbering consistent over molecule.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1470 r1471  
    38493849        mcsaXYZ = []
    38503850        mcsaTypes = []
     3851        neqv = 0
    38513852        for xyz,atyp in zip(XYZs,Types):
    3852             for item in G2spc.GenAtom(xyz,SGData):
     3853            equiv = G2spc.GenAtom(xyz,SGData,All=True,Move=False)
     3854            neqv = max(neqv,len(equiv))
     3855            for item in equiv:
    38533856                mcsaXYZ.append(item[0])
    38543857                mcsaTypes.append(atyp)
     3858        mcsaXYZ = np.array(mcsaXYZ)
     3859        mcsaTypes = np.array(mcsaTypes)
     3860        nuniq = mcsaXYZ.shape[0]/neqv
     3861        mcsaXYZ = np.reshape(mcsaXYZ,(nuniq,neqv,3))
     3862        mcsaTypes = np.reshape(mcsaTypes,(nuniq,neqv))
     3863        cent = np.fix(np.sum(mcsaXYZ+2.,axis=0)/nuniq)-2
     3864        cent[0] = [0,0,0]   #make sure 1st one isn't moved
     3865        mcsaXYZ = np.swapaxes(mcsaXYZ,0,1)-cent[:,np.newaxis,:]
     3866        mcsaTypes = np.swapaxes(mcsaTypes,0,1)
     3867        mcsaXYZ = np.reshape(mcsaXYZ,(nuniq*neqv,3))
     3868        mcsaTypes = np.reshape(mcsaTypes,(nuniq*neqv))                       
    38553869        mcsaBonds = FindPeaksBonds(mcsaXYZ)       
    38563870    drawAtoms = drawingData.get('Atoms',[])
  • trunk/GSASIIspc.py

    r1169 r1471  
    362362                    XT = -XT
    363363                XT += C
    364                 newX = MoveToUnitCell(XT)
     364                if Move:
     365                    newX = MoveToUnitCell(XT)
     366                else:
     367                    newX = XT
    365368                cell = np.asarray(np.rint(newX-XT),dtype=np.int32)
    366369                if All:
Note: See TracChangeset for help on using the changeset viewer.