There are problems with HEM. See #2 (closed) HEM (heme): initial reaction I think the CCD definition is wrong and pubchem defines it correctly https://pubchem.ncbi.nlm.nih.gov/compound/444098 with Fe2+ and the two nitrogen atoms as N-
RDKit produces a warning line when parsing HEM:
[10:52:01] Explicit valence for atom # 39 N, 4, is greater than permitted [10:52:01] Explicit valence for atom # 39 N, 4, is greater than permitted [10:52:01] WARNING: Accepted unusual valence(s): N(4); Metal was disconnected; Proton(s) added/removed ccd_utils.test_write_pdb.test_inchikey_match_for_all_sample_cifs('FEDYMSUPMFCVOD-UJJXFSCMSA-N', 'KABFMIBPWCXCRK-RGGAHWMASA-L', 'check inchikeys match for HEM') ... FAIL
The initial image created by Qi's test is:
The pubchem inchikey is KABFMIBPWCXCRK-UHFFFAOYSA-L so the initial part of the from RDKit one agrees but the last part does not.