Child entity atoms error - Claude
Problem 1: Massive row explosion. Every antibody in df_who that shares a pdb_id is getting matched against every other antibody row for that same PDB. For 7UOT with 5 antibody entries, you're getting 5×8 = 40 rows instead of 5. The inner for x loop iterates over all WHO rows matching a PDB, but insert_df already has one row per antibody — so you're double-iterating. Problem 2: The len(Achain) > 1 branch. A chain like "C" has length 1, but "c" also has length 1 — that's fine. But "A" vs "C | A | B" — the > 1 check is catching any 2+ character chain name like "AB" or "a" (length 1, passes to else). This is accidentally correct but fragile. The real issue is the | splitting logic — it works, but every split antigen generates a new row with no corresponding new row in df_new_rows when pymol_list isn't a string. The fix is to stop using insert_df as the outer loop and df_who as the inner — they contain the same information and you're cross-joining them. Just iterate df_who once: Three key c
Explore this link on the map →