|
From: Sampson, J. <Jar...@ny...> - 2015-05-20 18:22:50
|
In the process of investigating Ben Bobay's question<https://sourceforge.net/p/pymol/mailman/message/34128680/> 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<https://www.dropbox.com/s/e6hmr0vb8jlfq6q/Screenshot%202015-05-20%2013.00.36.png?dl=0>). This breaks cartoon representation, as Ala1 and Ala2 are no longer contiguous in the sequence (`as cartoon` leaves nothing drawn, Screenshot2<https://www.dropbox.com/s/p85bsftrgi54pq3/Screenshot%202015-05-20%2013.00.49.png?dl=0>). 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. I'm adding this as a bug report on SourceForge as well. Cheers, Jared |