Icon representing a recipe

Recipe: Crush Sidechains To Point v0.1

created by Susume

Profile


Name
Crush Sidechains To Point v0.1
ID
101809
Shared with
Public
Parent
Crush To Point
Children
None
Created on
January 22, 2016 at 04:03 AM UTC
Updated on
January 22, 2016 at 04:03 AM UTC
Description

As requested, crushes sidechains (the first joint in each sidechain) to a single point. Disable Cut Bands before running.

Best for


Code


-- Before running script, in Behavior tab, uncheck "Enable Cut Bands" -- As requested, this script will attempt to crush the sidechains (first joint in each) to a single point: -- Insert cut points between all segments -- Band all sidechain beta carbons to a single point -- Set CI to 0 and wiggle EndSeg = structure.GetCount() BETA_CARBON = 5 TERMINAL_BETA = 6 CENTER_CARBON = 2 --this is the default atom for bands to attach to GLYCINE = "g" function GetBeta(seg) if structure.GetAminoAcid(seg)==GLYCINE then return CENTER_CARBON elseif seg==EndSeg then return TERMINAL_BETA else return BETA_CARBON end end for i = 1, EndSeg-1 do structure.InsertCut(i) end band.DeleteAll() band.AddBetweenSegments(1,EndSeg,GetBeta(1),GetBeta(EndSeg)) for i = 2, EndSeg-1 do band.AddToBandEndpoint(i,1,GetBeta(i)) end for b = 1, band.GetCount() do band.SetGoalLength(b,0) band.SetStrength(b,10) end behavior.SetClashImportance(0) structure.WiggleAll(25)

Comments