Hi Dominik,
You should not have to explicitly create Chains, though it's hard to say what's going wrong without seeing the code.  Is there a GitHub repository?  Anyway here's a few ideas...
You don't say explicitly that you create bonds, though I suspect that was just an oversight.  Bonds are necessary for finding chain connectivity.
Does structure.bonded_groups() return the number of groups of connected atoms that you would expect given the structure you've built?
Does structure.polymers() return the number of polymers expected?
Residues have to be in chain order, so if you are not creating them in that order you will either have to use the insert/precedes keyword of new_residue() to get them into the correct position, or use structure.reorder_residues() to put them in the right order afterward.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jun 9, 2023, at 3:02 AM, Dominik Sordyl via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi,

I have created a python plugin that uses AtomicStructure() class to create a model based on the pdb file and custom trajectory file.
The problem is that after creating the structure (adding residues and atoms) it has no chains. Due to this issue, I cannot use some of the ChimeraX features (e.g. rainbow coloring) - at least I think this is the reason.
While adding new residues one has to specify the chain_id, but even if I do it those chains are not created automatically. Do I have to create chains separately or there is something that I am missing here.
Would be grateful for your help.

Best,
Dominik

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Manage subscription: