﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
4682	Bug writing mmCIF for glycosylated protein	Tristan Croll	Greg Couch	"{{{
(tried to submit via ChimeraX bug report tool, but server is down)

Something is going very wrong when saving a glycosylated structure to mmCIF (but not to PDB)... attached session (needs ISOLDE in ChimeraX 1.2) contains the model I was working on as model #2, and the result of saving it to mmCIF and reloading it as model #4. There are multiple problems, seemingly all to do with the glycans on chain A:


- all glycosylated asparagines on chain A end up bonded to the same NAG (N 1)

- the fucose on chain L also ends up bonded to NAG N 1 rather than NAG L 1

- NAG L 2 gets renamed to NAG K 2


A bit of further detail:

- the map is C3 symmetric. One of the things that led to this state is that after rebuilding chain A I re-imposed symmetry by deleting chains B and C (and their glycans) and (where `transforms` is a `Places` array and `m` is the working model):


from chimerax.isolde.atomic.building.ncs import create_all_ncs_copies

create_all_ncs_copies(m, transforms)


While this code isn't perfect (mainly because it doesn't preserve bonds between chains), it's worked for me without any major trouble many times until now. This time, saving to mmCIF led to all protein residues past the first chain break in each new chain being treated as ligands (which was seemingly resolved by using `chain.bulk_set()` to reassign them to match chain A).


The other thing I did (after reimposing the missing bonds) was to run `chimerax.isolde.atomic.ligand_utils.recluster_ligands()` to reassign the glycan chain IDs to correspond to their parent chains. That too is something I've used quite a few times now without apparent trouble... but after that is when I noticed the new bonding issues. Note that code assigns the glycans 4-character chain IDs (Agl0, Agl1, etc.) to match their parent protein chain - I reassigned them back to 1-character IDs in order to test whether saving to PDB would still be OK (it was).


}}}

[attachment:""cif_bug.cxs""]
"	defect	closed	normal		Input/Output		fixed						all	ChimeraX
