Skip to content

Cartoon representation disappear in extracted molecules when chain IDs are not set #463

@ErikPoppleton

Description

@ErikPoppleton

Thank you for keeping PyMol available open source! I have encountered an issue with the cartoon representations.

Describe the bug

When loading a file without chain identifiers (for example, a Gromacs .gro file) the cartoon representation is initially drawn well:

Image

You can change the cartoon representation and everything works as expected:

Image

However, if you extract the molecule, the cartoon representation breaks in a really strange way:

Image

This does not happen if you set chain identifiers with this script BEFORE you run extract (doing it after doesn't fix anything):

Image

I have tested this with both proteins and RNA. With proteins all strands except the first one disappear, with RNA, the behavior is inconsistent. Sometimes backbones disappear, sometimes parts of structures disappear.

Here's an RNA structure in .gro format to test with (extension changed to .txt so GitHub will accept it)
RNA_test.txt

Expected behavior

Cartoon representation shouldn't be different when atoms have been extracted to a new object. Also it was very challenging to create chain identifiers to fix the problem, but that's a feature request more than a bug.

Environment

  • PyMOL Version: 3.2.0a
  • PyMOL Source: Compiled from this repo
  • Operating System: MacOS 15.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions