Menu

#169 cmd.fab() with existing object name produces unexpected results and downstream segfault

v1.7.1.0
closed-fixed
None
5
2015-06-10
2015-05-20
No

In the process of investigating Ben Bobay's question about keyboard shortcuts for adding a methyl group, I may have found a bug, or at least unexpected behavior, in cmd.fab().

When first creating a peptide, it works fine:

fab AAAA, pep

However, if I call it again with a different (or the same) sequence,

fab DDDD, pep

The new residues are overlaid right on top of the initial ones, and interspersed in the sequence order (overlapping sticks, Screenshot1). This breaks cartoon representation, as Ala1 and Ala2 are no longer contiguous in the sequence (as cartoon leaves nothing drawn, Screenshot2).

Also, something happens when switching representations (e.g. from cartoon to sticks) that segfaults with certain sequences. I can semi-reproducibly produce a segfault (perhaps 2/3 of the time) with the following commands in Open Source PyMOL (1.7.4.0), PyMOLX11Hybrid (1.7.6.0), and MacPyMOL (1.7.6.0).

reinitialize
fab AAAA, pep
fab ADAA, pep
as cartoon
as sticks
# sometimes it takes an extra line or two
#fab AADA, pep
#as sticks

I believe this happens specifically when some residues are the same and some are different: I haven't been able to produce a segfault using "DDDD" as the second sequence, but adding the third sequence (second to last line) reintroduces the segfault.

I would expect calling fab with an existing object name to perform one of the following actions (from most to least preferable):

  1. Append the residues to the C-terminus of the existing object with sensible geometry, similar to editor.attach_fragment().
  2. Add a new state to the object with the new sequence, as with cmd.load(state=0).
  3. Overwrite the existing object (probably not a good idea).

It may also be helpful to have additional arguments to fab, such as append=1 or state=0, depending on which of the above options might be implemented.

2 Attachments

Discussion

  • Thomas Holder

    Thomas Holder - 2015-06-10
    • status: open --> closed-fixed
    • assigned_to: Thomas Holder
     
  • Thomas Holder

    Thomas Holder - 2015-06-10

    fixed in svn rev 4127.

    Implemented the least spectacular option 3.: Delete existing object

     

Log in to post a comment.