Changeset 4199
 Timestamp:
 Dec 10, 2019 9:45:16 AM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIpwd.py
r4196 r4199 2150 2150 newPhase['General']['Cell'][1:] = G2lat.TransformCell(Cell,Trans.T) 2151 2151 newPhase,Atcodes = G2lat.TransformPhase(Phase,newPhase,Trans,np.zeros(3),np.zeros(3),ifMag=False) 2152 Natm = np.core.defchararray.count(np.array(Atcodes),'+') #no. atoms in original unit cell 2153 Natm = np.count_nonzero(Natm1) 2152 2154 Atoms = newPhase['Atoms'] 2155 NAtype = np.zeros(len(Atseq)) 2156 for atom in Atoms: 2157 NAtype[Atseq.index(atom[1])] += 1 2158 NAstr = ['%d'%i for i in NAtype] 2153 2159 Cell = newPhase['General']['Cell'][1:7] 2154 2160 fname = Name+'.rmc6f' … … 2157 2163 for item in Meta: 2158 2164 fl.write('%20s%s\n'%('Metadata '+item+':',Meta[item])) 2165 fl.write('Atom types present: %s\n'%' '.join(Atseq)) 2166 fl.write('Number of each atom type: %s\n'%' '.join(NAstr)) 2167 fl.write('Number of atoms: %d\n'%len(Atoms)) 2159 2168 fl.write('%35s%3d%3d%3d\n'%('Supercell dimensions:',Supercell[0],Supercell[1],Supercell[2])) 2160 2169 fl.write('Cell (Ang/deg): %12.6f%12.6f%12.6f%12.6f%12.6f%12.6f\n'%( 2161 2170 Cell[0],Cell[1],Cell[2],Cell[3],Cell[4],Cell[5])) 2162 2171 A,B = G2lat. cell2AB(Cell) 2163 fl.write('Lattice vectors (Ang):\n') 2172 fl.write('Lattice vectors (Ang):\n') 2164 2173 for i in [0,1,2]: 2165 2174 fl.write('%12.6f%12.6f%12.6f\n'%(A[i,0],A[i,1],A[i,2])) 2166 2175 fl.write('Atoms (fractional coordinates):\n') 2167 Natm = np.core.defchararray.count(np.array(Atcodes),'+')2168 Natm = np.count_nonzero(Natm1)2169 2176 nat = 0 2170 2177 for atm in Atseq:
Note: See TracChangeset
for help on using the changeset viewer.