cifkit.utils.cif_editor module

cifkit.utils.cif_editor.add_hashtag_in_first_line(file_path: str)[source]

ICSD files start with (C) which causes parsing issues with gemmi.

If that is the case, add a # before (C) to fix the parsing issue.

cifkit.utils.cif_editor.edit_cif_file_based_on_db(file_path: str)[source]

Edit a CIF file based on the database it is from.

PCD: Remove author loop and preprocess label element loop values ICSD: Add a hashtag in the first line

cifkit.utils.cif_editor.remove_author_loop(file_path: str) None[source]

Remove the author section from a .cif file to prevent parsing problems caused by a wrongly formatted author block.

This is a common issue in PCD files.