get_segment_status function

Case number:845813-988626
Topic:Game: Tools
Opened by:Crashguard303
Status:Closed
Type:Suggestion
Opened on:Wednesday, October 6, 2010 - 09:28
Last modified:Friday, April 20, 2012 - 21:03

It would be nice to have a function similar to the get_segment_score_part() function,
which can tell Lua if a backbone or sidechain is locked or frozen.

With get_segment_score_part("backbone", 1) for example
you can already get the backbone score of segment 1.

Having a similar function for the segment's properties could do this:
get_segment_status("backbone_frozen",1) could return if the backbone of segment 1 is frozen as boolean value.

get_segment_status("sidechain_frozen",index) could respond true if the sidchain of segment "index" is frozen,

get_segment_status("backbone_locked",index) and get_segment_status("sidechain_locked",index) could do this in a similar way, to show, if this segment's backbone's and sidechain's positions are not allowed to be changed (grey).

get_segment_status("sidechain_not_mutable",index) could respond true if the sidechain shape is not allowed to be changed.

Thanks in advance,
Alex

(Wed, 10/06/2010 - 09:28  |  7 comments)


Joined: 09/18/2009
Groups: SETI.Germany
Type: Question » Suggestion

Changing type.

Joined: 08/06/2010
Groups: Contenders

I like this method. I was thinking about using the segment notes as a scratchpad between scripts and humans. I didn't see any function to add a note to a segment or set a note on a segment. I was going to be tricky and use one of the segment's notes to store the mutable list so I only had to get it once. A nicer purpose would be to have a script give suggestions on segments to humans who could decided to act upon them or not.

Joined: 09/18/2009
Groups: SETI.Germany

Good idea.
As long as we have no file access, reading or writing notes by script could help storing some extra information.

But to extract/find only a part of a note and not the complete text, we need string manipulating functions again.

Joined: 08/06/2010
Groups: Contenders

OK, I know concatenate works.
a = b .. c
I'm still new at this and keep thinking the language is rational.
At a minimum a left and right function or substring function.
I guess I assume too much.
An sprintf-like function can serve in a pinch.
That probably isn't implemented either.

Joined: 09/18/2009
Groups: SETI.Germany

Yes, with concatenate, you could append text to the segment's note at the end or beginning, but if threre is more than one information, you can't extract what you want.
You will always get the whole text.

In addition to the Lua standard library, there is also a string library:
http://www.lua.org/manual/5.1/manual.html#5.4

It reads, that there is a substring function called
string.sub (s, i [, j]), which could also be used as left or right function.
I didn't get what will happen if you use negative values, but anyway.

Moreover, there is a search function called
string.find (s, pattern [, init [, plain]])

Joined: 06/17/2010
Status: Open » Open

We will have more informational tools in lua update.

Joined: 06/17/2010
Status: Open » Closed

IsFrozen
IsLocked
IsMutable

Implemented in v2 LUA

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