Write CIF strings from a MOFdb-style DataFrame to .cif files in a folder. Creates the folder if it does not exist. Uses the name column for filenames (sanitized); duplicate names get _1, _2, … appended.
Parameters
Name
Type
Description
Default
mofdb_df
DataFrame with CIF data (e.g. from get_data_from_mofdb or sample_representative_mofdb). Must have columns for names and CIF strings.
required
folder
Path or str to the output directory (created if missing).
required
name_column
Column used for filenames (default “name”).
'name'
cif_column
Column containing CIF content as strings (default “cif”).
'cif'
skip_failed
If True, skip rows with missing or empty CIF (default True).