Profile


Name
GetCuts
ID
104236
Shared with
Public
Parent
None
Children
None
Created on
December 19, 2020 at 21:22 PM UTC
Updated on
December 19, 2020 at 21:22 PM UTC
Description

Demonstrate structure.GetCuts

Best for


Code


segs = structure.GetCuts () print ( #segs .. " open cutpoints found" ) for ii = 1, #segs do print ( "open cutpoint " .. ii .. " at segment " .. segs [ ii ] ) structure.DeleteCut ( segs [ ii ] ) end segs2 = structure.GetCuts () print ( #segs2 .. " open cutpoints found after attempting to close them" ) for ii = 1, #segs2 do print ( "remaining open cutpoint " .. ii .. " at segment " .. segs2 [ ii ] ) end

Comments


LociOiling Lv 1

This recipe demonstrates the new structure.GetCuts call, which lists open cutpoints.

The recipe prints each open cutpoint, then calls structure.DeleteCut to close it.

There's no indication of success or failure from structure.DeleteCut, so the recipe calls structure.GetCuts to see if any cuts remain open.

The structure.GetCuts call itself seems fine, but structure.DeleteCut will close any cutpoint, even where the ends are too far apart to close manually. You'll end up with a funny-looking protein and two segments with bad ideality subscores.