Cut functions

Case number:845818-996864
Topic:Game: Social
Opened by:Timo van der Laan
Status:Open
Type:Suggestion
Opened on:Friday, February 7, 2014 - 14:25
Last modified:Tuesday, August 19, 2014 - 02:42

structure.DeleteCut should return a boolean, true if it worked, false if not.
And a function structure.ListCut() would be helpful in writing recipes.
Or even structure.HasCut(i)

(Fri, 02/07/2014 - 14:25  |  2 comments)


jeff101's picture
User offline. Last seen 1 day 8 hours ago. Offline
Joined: 04/20/2012
Groups: Go Science

I would like to see a cut point counter, cutpts.GetCount(), like the already-existing band.GetCount() and structure.GetCount() LUA commands.

LociOiling's picture
User offline. Last seen 41 min 27 sec ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

As proposed for the 2014/8/19 devchat:

The ability to open and close cuts in a script has opened up a number of new possibilities. A few functions seem to be missing, however.

First, when deleting a cut, there's no way to tell whether the cut was closed. If the cut ends are too far apart, the cut won't close. As a remedy, structure.DeleteCut() could return true if the cut was deleted, and false otherwise. (Likewise, structure.InsertCut() could return false if a cut is already open....)

Second, there's no way for a script to determine the number of cuts and their location. A call structure.GetCutCount() could return the number of cuts, and structure.IsCut ( segment ) could indicate the presence of a cut. These additions would allow scripts to work with existing cuts.

Third, there should be a way to determine how far apart the cut ends are. A function structure.GetCutLength ( segment ) could return this information, or nil if there is no cut present.

Fourth, as the proposed calls above tend to show, a "cut" pseudo-class might be added, similar to "band". The calls cut.Insert() and cut.Delete() would be included, and structure.InsertCut() and structure.DeleteCut() could be deprecated, but still supported. The new functions could be added to "cut".

These four steps would lead to better solutions. Currently, some high scores get "stuck" with an open cut. The cuts could be easily closed by familiar scripting actions in most cases. At present, a script can't detect the open cut. Manually detecting and correcting this condition means lost hours and missed opportunities.

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons