ofile = open(ofname + "-rhom.xyz", 'w') rhom.write_xyz(ofile, "Converted to hex base from standard cubic spinel def") ofile.close() ofile = open(ofname + "-rhom.emp", 'w') rhom.write_emaps(ofile) ofile.close() rhom2 = rhom.extend(1.01, 1.01, 1.01) ofile = open(ofname + "-rhom.pov", 'w') rhom2.write_povray(ofile, "Converted to hex base from standard cubic spinel def") ofile.close() print "splitting into plane stack" plane_stack = rhom2.cluster(array([0, 0, 1]), 2. / 49) i = 0 print "writing stack output" for plane in plane_stack: ofile = open(ofname + "-rhom-plane-%02d.dat" % (i), 'w') plane.write(ofile) ofile.close() ofile = open(ofname + "-rhom-plane-%02d.xyz" % (i), 'w') plane.write_xyz(ofile) ofile.close() ofile = open(ofname + "-rhom-plane-%02d.pov" % (i), 'w') plane.write_povray(ofile) ofile.close() i += 1
ofile.close() ofile= open(ofname +"-rhom.xyz",'w') rhom.write_xyz(ofile,"Converted to hex base from standard cubic spinel def") ofile.close() ofile = open(ofname+"-rhom.emp",'w') rhom.write_emaps(ofile) ofile.close() rhom2 = rhom.extend(1.01, 1.01, 1.01) ofile= open(ofname +"-rhom.pov",'w') rhom2.write_povray(ofile, "Converted to hex base from standard cubic spinel def") ofile.close() print "splitting into plane stack" plane_stack = rhom2.cluster(array([0,0,1]), 1./15) i=0 print "writing stack output" for plane in plane_stack: ofile = open(ofname + "-rhom-plane-%02d.dat" %(i),'w') plane.write(ofile) ofile.close() ofile = open(ofname + "-rhom-plane-%02d.xyz" %(i),'w') plane.write_xyz(ofile) ofile.close() ofile = open(ofname + "-rhom-plane-%02d.pov" %(i),'w') plane.write_povray(ofile) ofile.close() i+=1