Changeset 1147 for trunk/GSASIIIO.py


Ignore:
Timestamp:
Nov 22, 2013 4:24:29 PM (8 years ago)
Author:
toby
Message:

Complete initial ISODISPLACE implementation; mod. phase initialization; change atom pointer init.; rework parameter display window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1138 r1147  
    985985   
    986986def SetNewPhase(Name='New Phase',SGData=None,cell=None):
    987     '''Create a new phase with default values for various parameters
     987    '''Create a new phase dict with default values for various parameters
    988988
    989989    :param str Name: Name for new Phase
     
    10031003            'Name':Name,
    10041004            'Type':'nuclear',
     1005            'AtomPtrs':[3,1,7,9],
    10051006            'SGData':SGData,
    10061007            'Cell':[False,]+cell,
     
    11491150    general = Phase['General']
    11501151    general['Type'] = Ptype
     1152    if general['Type'] =='macromolecular':
     1153        general['AtomPtrs'] = [6,4,10,12]
     1154    else:
     1155        general['AtomPtrs'] = [3,1,7,9]   
    11511156    general['SH Texture'] = textureData
    11521157    Phase['Atoms'] = Atoms
     
    12381243    Phase = SetNewPhase(Name=PhaseName,SGData=SGData,cell=cell+[Volume,])
    12391244    Phase['General']['Type'] = 'macromolecular'
     1245    Phase['General']['AtomPtrs'] = [6,4,10,12]
    12401246    Phase['Atoms'] = Atoms
    1241    
    12421247    return Phase
    12431248
     
    14311436######################################################################
    14321437E,SGData = G2spc.SpcGroup('P 1') # data structure for default space group
     1438P1SGData = SGData
    14331439class ImportBaseclass(object):
    14341440    '''Defines a base class for the reading of input files (diffraction
     
    15681574class ImportPhase(ImportBaseclass):
    15691575    '''Defines a base class for the reading of files with coordinates
     1576
     1577    Objects constructed that subclass this (in import/G2phase_*.py) will be used
     1578    in :meth:`GSASII.GSASII.OnImportPhase`
    15701579    '''
    15711580    def __init__(self,formatName,longFormatName=None,extensionlist=[],
     
    15741583        ImportBaseclass.__init__(self,formatName,longFormatName,
    15751584            extensionlist,strictExtension)
    1576         # define a default Phase structure
    1577         self.Phase = SetNewPhase(Name='new phase',SGData=SGData)
     1585        self.Phase = None # a phase must be created with G2IO.SetNewPhase in the Reader
     1586        self.Constraints = None
    15781587
    15791588    def PhaseSelector(self, ChoiceList, ParentFrame=None,
Note: See TracChangeset for help on using the changeset viewer.