dara.cif2str module#
Convert CIF to Str format for BGMN.
- check_wyckoff(spacegroup_setting, structure)[source]#
Check if a given spacegroup setting is valid for a structure.
- Parameters:
spacegroup_setting (
dict[str,Any]) – the spacegroup settingstructure (
SymmetrizedStructure) – the symmetrized structure
- Return type:
tuple[list[dict[str,Any]],int]- Returns:
the settings of the elements and the number of errors
- cif2str(cif_path, phase_name_suffix='', working_dir=None, *, lattice_range=0.1, gewicht='0_0', rp=4, k1='0_0^0.01', k2='0_0^0.01', b1='0_0^0.01', lebail=False)[source]#
Convert CIF to Str format.
- Parameters:
cif_path (
Path) – the path to the CIF filephase_name_suffix (
str) – the suffix of the phase nameworking_dir (
Path|None) – the folder to hold the processed str filelattice_range (
float) – the range of the lattice parameters to be refinedgewicht (
str) – the weight fraction of the phase to be refined. Options: 0_0, SPHAR0, and SPHAR2. If 0_0, then no preferred orientation. Read more in the BGMN manual.rp (
int) – the peak function to be used in the refinement. Read more in the BGMN manual.k1 (
str) – the first peak parameter to be refined. Read more in the BGMN manual.k2 (
str) – the second peak parameter to be refined. Read more in the BGMN manual.b1 (
str) – the third peak parameter to be refined. Read more in the BGMN manual.lebail (
bool) – whether to use the Le Bail method
- Return type:
Path
An example of the output .str file:
PHASE=BariumzirconiumtinIVoxide105053 // ICSD_43137 Reference=ICSD_43137 // Formula=Ba1_O3_Sn0.5_Zr0.5 // SpacegroupNo=221 HermannMauguin=P4/m-32/m Setting=1 Lattice=Cubic // PARAM=A=0.416280_0.412117^0.420443 // RP=4 k1=0 k2=0 PARAM=B1=0_0^0.01 GEWICHT=SPHAR4 // GOAL:BariumzirconiumtinIVoxide105053=GEWICHT*ifthenelse(ifdef(d),exp(my*d*3/4),1) // E=BA+2 Wyckoff=b x=0.500000 y=0.500000 z=0.500000 TDS=0.010000 E=(ZR+4(0.5000),SN+4(0.5000)) Wyckoff=a x=0.000000 y=0.000000 z=0.000000 TDS=0.010000 E=O-2 Wyckoff=d x=0.500000 y=0.000000 z=0.000000 TDS=0.010000
- get_lattice_parameters_from_lattice(lattice, crystal_system)[source]#
Get lattice parameters from lattice based on the type of lattice. :rtype:
dict[str,float]Note
The lattice parameters are in nm
- get_std_position(spacegroup_setting, wyckoff_letter, positions)[source]#
Get the standard position of a site based on the hall number and wyckoff notation.
- Return type:
tuple[list[float],bool]
- make_lattice_parameters_str(spacegroup_setting, structure, lattice_range)[source]#
Make the lattice parameters string.
- Return type:
str
- make_peak_parameter_str(k1, k2, b1, gewicht, rp)[source]#
Make the peak parameter string.
- Return type:
str