Changeset 3491


Ignore:
Timestamp:
Jul 20, 2018 3:53:53 PM (3 years ago)
Author:
vondreele
Message:

fix export/import of magnetic cifs

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_CIF.py

    r3487 r3491  
    12511251                spacegroup = spacegroup[0].upper() + spacegroup[1:].lower().rstrip('rh ')
    12521252                WriteCIFitem(self.fp, '_space_group_magn.name_BNS',spacegroup)
     1253                WriteCIFitem(self.fp, '_space_group.magn_point_group',phasedict['General']['SGData']['MagPtGp'])
     1254
    12531255                # generate symmetry operations including centering and center of symmetry
    12541256                SymOpList,offsetList,symOpList,G2oprList,G2opcodes = G2spc.AllOps(
     
    20652067            self.Write(' ')
    20662068            self.Write(70*'#')
    2067             WriteCIFitem(self.fp, 'data_'+phaseOnly)
     2069            WriteCIFitem(self.fp, 'data_'+phaseOnly.replace(' ','_'))
    20682070            #phaseblk = self.Phases[phaseOnly] # pointer to current phase info
    20692071            # report the phase info
  • trunk/imports/G2phase_CIF.py

    r3465 r3491  
    2424import numpy as np
    2525import re
     26import copy
    2627import GSASIIIO as G2IO
    2728import GSASIIobj as G2obj
     
    107108                        continue
    108109                    else:
    109                         choice[-1] += name.strip()[:20] + ', '
     110                        choice[-1] += name.strip() + ', '
    110111                        break
    111112                na = len(cf[blknm].get("_atom_site_fract_x"))
     
    581582            else: # no name found, use block name for lack of a better choice
    582583                name = blknm
    583             self.Phase['General']['Name'] = name.strip()[:20]
     584            self.Phase['General']['Name'] = name.strip()
    584585            self.Phase['General']['Super'] = Super
    585586            if magnetic:
    586587                self.MPhase['General']['Type'] = 'magnetic'               
    587                 self.MPhase['General']['Name'] = name.strip()[:20]+' mag'
     588                self.MPhase['General']['Name'] = name.strip()+' mag'
    588589                self.MPhase['General']['Super'] = Super
    589590                if Super:
     
    593594                    self.MPhase['General']['SuperVec'] = SuperVec
    594595                    self.MPhase['General']['SuperSg'] = SuperSg
     596                if 'mcif' not in filename:
     597                    self.Phase = copy.deepcopy(self.MPhase)
     598                    del self.MPhase
    595599            else:
    596600                self.MPhase = None
Note: See TracChangeset for help on using the changeset viewer.