Diffpy cmi - Problem for saving fit results through *cif format

51 views
Skip to first unread message

Tristan Barbier

unread,
Oct 11, 2022, 11:44:46 AM10/11/22
to diffpy-users
Hello Everyone, 

I succeed in refining PDF data through Diffpy cmi, 
unfortunately, I am not able to save them. 

I have tried the following codes: 

1) Code 1:

structureFile = "AA180_Tristan2.cif"
AA180_stru = loadStructure(structureFile)
...
AA180_stru.write("AA180_fitted.cif", format = ".cif")
Fit.AA180.profile.savetxt("AA180_fitted.fgr")

Whatever the format used I always got the same error message:
==> StructureFormatError: no parser for '.cif' format

*******************************
2) Code 2:

# Export refined parameters through *.cif file
def export_cifs(name=str()):
    name = name + ".cif"
    with open(name, "w") as fp:
        AA180_stru.CIFOutput(fp)
    return

# uncomment to really export
export_cifs(name)

Error message: 
==> AttributeError: 'Structure' object has no attribute 'CIFOutput'

*******************************

Does anyone already face up such problems? 
Any ideas or ways to save a *cif file will be highly appreciated, 

Thank you very much, 

Best Regards, 

Tristan 
Reply all
Reply to author
Forward
0 new messages