Changeset 3199


Ignore:
Timestamp:
Dec 21, 2017 9:54:27 AM (4 years ago)
Author:
vondreele
Message:

more revisions to the cif phase importer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2phase_CIF.py

    r3198 r3199  
    123123                sg = cf[blknm].get("_symmetry_space_group_name_H-M",'')
    124124                if not sg: sg = cf[blknm].get("_space_group_name_H-M_alt",'')
     125                if not sg: sg = cf[blknm].get("_space_group_ssg_name",'')
     126                if not sg: sg = cf[blknm].get("_space_group.magn_ssg_name_BNS",'')
     127                if not sg: sg = cf[blknm].get("_space_group.magn_ssg_name",'')
    125128                #how about checking for super/magnetic ones as well? - reject 'X'?
    126129                sg = sg.replace('_','')
     
    192195                        MSpGrp = blk.get("_space_group_magn.name_BNS",'')
    193196                        if not MSpGrp:
    194                             msg = 'No magnetic BNS space group name was found in the CIF.'
     197                            msg = 'No recognizable space group name was found in the CIF.'
    195198                            self.errors = msg
    196199                            self.warnings += '\n'+msg
     
    206209                    SpGrp = SpGrp.replace('_','')
    207210                    self.Phase['General']['Type'] = 'nuclear'
     211            if not SpGrp:
     212                print (sspgrp)
     213                self.warnings += 'No space group name was found in the CIF.'
     214                return False
    208215#process space group symbol
    209216            E,SGData = G2spc.SpcGroup(SpGrp)
     
    214221            # nope, try the space group "out of the Box"
    215222            if E:
    216                 if not SpGrp:
    217                     self.warnings += 'No space group name was found in the CIF.'
    218                     self.warnings += '\nThe space group has been set to "P 1". '
    219                     self.warnings += "Change this in phase's General tab."
    220                 else:
    221                     self.warnings += 'ERROR in space group symbol '+SpGrp
    222                     self.warnings += '\nThe space group has been set to "P 1". '
    223                     self.warnings += "Change this in phase's General tab."
    224                     self.warnings += '\nAre there spaces separating axial fields?\n\nError msg: '
    225                     self.warnings += G2spc.SGErrors(E)
     223                self.warnings += 'ERROR in space group symbol '+SpGrp
     224                self.warnings += '\nThe space group has been set to "P 1". '
     225                self.warnings += "Change this in phase's General tab."
     226                self.warnings += '\nAre there spaces separating axial fields?\n\nError msg: '
     227                self.warnings += G2spc.SGErrors(E)
    226228                SGData = G2obj.P1SGData # P 1
    227229            self.Phase['General']['SGData'] = SGData
Note: See TracChangeset for help on using the changeset viewer.