Skip to content

Cannot draw spaghettis after double cyclisation #17

@BTheDragonMaster

Description

@BTheDragonMaster

RAIChu cannot produce a spaghetti for a the following cluster, which contains two NON_ELONGATION_PYR trans-AT KS domains:

cluster.txt

Drawing up to failing spaghetti:

cluster

The problem arises from the fact that the second cyclisation happens on top of an already existing cyclisation.

Before cyclisation:
Screenshot 2024-02-15 at 16 34 50

After cyclisation:
Screenshot 2024-02-15 at 16 24 20

RAIChU cannot currently linearise the resulting type of structure:

(raichu) barbara@Barbaras-MBP raichu % python validation/rerun_cluster.py cluster_863
Traceback (most recent call last):
  File "/Users/barbara/Documents/PhD/tools/raichu/validation/rerun_cluster.py", line 10, in <module>
    draw_cluster(cluster, out_file)
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/raichu/run_raichu.py", line 126, in draw_cluster
    return cluster.draw_cluster(as_string=False, out_file=out_file, colour_by_module=colour_by_module)
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/raichu/cluster/modular_cluster.py", line 218, in draw_cluster
    drawings, widths = self.get_spaghettis()
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/raichu/cluster/modular_cluster.py", line 184, in get_spaghettis
    drawing = RaichuDrawer(structure, dont_show=True)
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/raichu/drawing/drawer.py", line 53, in __init__
    super().__init__(structure, options=None, coords_only=coords_only)
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/pikachu/drawing/drawing.py", line 371, in __init__
    self.draw(coords_only=coords_only)
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/raichu/drawing/drawer.py", line 299, in draw
    self.linearise()
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/raichu/drawing/drawer.py", line 995, in linearise
    self.fix_rings(rings, backbone, backbone_to_placement)
  File "/opt/anaconda3/envs/raichu/lib/python3.9/site-packages/raichu/drawing/drawer.py", line 813, in fix_rings
    assert first_atom_cycle
AssertionError

Suggested fix is to not allow these type of double cyclisations to happen, as they have not yet been observed in nature. Should we find an example in nature, revisit this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions