本文整理匯總了Python中diffpy.srreal.pdfcalculator.PDFCalculator.delta2方法的典型用法代碼示例。如果您正苦於以下問題:Python PDFCalculator.delta2方法的具體用法?Python PDFCalculator.delta2怎麽用?Python PDFCalculator.delta2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類diffpy.srreal.pdfcalculator.PDFCalculator
的用法示例。
在下文中一共展示了PDFCalculator.delta2方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: PDFCalculator
# 需要導入模塊: from diffpy.srreal.pdfcalculator import PDFCalculator [as 別名]
# 或者: from diffpy.srreal.pdfcalculator.PDFCalculator import delta2 [as 別名]
import numpy as np
import pandas as pd
from time import strftime
from pprint import pprint
import matplotlib.pyplot as plt
from diffpy.Structure import loadStructure
from diffpy.Structure import StructureFormatError
from diffpy.srreal.structureadapter import nosymmetry
from diffpy.srreal.pdfcalculator import DebyePDFCalculator
from diffpy.srreal.pdfcalculator import PDFCalculator
from pdf_lib.glbl import pdfCal_cfg, Uiso, delta2
cal = PDFCalculator()
cal.delta2 = delta2
ni = loadStructure('ni.cif')
ni.Uisoequiv = Uiso
nacl = loadStructure('1000041.cif')
nacl.Uisoequiv = Uiso
print("Uiso = {}".format(Uiso))
def qdamp_test(struc, rmax_val, qdamp_array=None):
pdfCal_cfg['rmax'] = rmax_val
N = qdamp_array.size
fig, ax = plt.subplots(N, figsize=(20, 6),
sharex=True, sharey=True)
for _ax, qdamp_val in zip(ax, qdamp_array):
pdfCal_cfg['qdamp'] = qdamp_val
r, g = cal(struc, **pdfCal_cfg)