Icon representing a recipe

Recipe: FindMonomers1

created by jeff101

Profile


Name
FindMonomers1
ID
104054
Shared with
Public
Parent
None
Children
None
Created on
October 14, 2020 at 14:56 PM UTC
Updated on
October 14, 2020 at 14:56 PM UTC
Description

10/10/2020 706am code

Best for


Code


-- FindMonomers by jeff101 begun 10/10/2020. -- Made to help find monomers on symmetry puzzles. -- Last updated 10/10/2020 706am. function main() local obands,nbands,ncopies local mssg,ii,bnum -- obands=band.GetCount() -- get starting # of bands ncopies=structure.GetSymCount() -- gives 0 if there are no copies of main monomer -- mssg=structure.GetNote(1) if mssg == '' then -- mssg is blank mssg=('Main Monomer') else -- mssg is not blank mssg=('Main Monomer: '..mssg) end -- if mssg structure.SetNote(1,mssg) -- for ii=1,ncopies do nbands=band.GetCount() -- get latest # of bands bnum=band.AddBetweenSegments(1,1,0,0,ii) -- Above bands main monomer to each of its copies. -- It bands from each monomer's 1st segment's -- default backbone atom (often an alpha-carbon). if bnum > nbands then -- band bnum was added correctly band.Disable(bnum) -- disable band bnum band.SetGoalLength(bnum,0) -- want 0.0 to 10000.0 band.SetStrength(bnum,0) -- want 0.0 to 10.0 end -- if bnum end -- for ii -- end -- main() main()

Comments


jeff101 Lv 1

FindMonomers1 is for Symmetry Puzzles to help 
find the monomers when they are all off the 
screen. It changes the label on the first 
amino acid to say "Main Monomer". This helps
you find the original monomer using Note Mode.
It also adds disabled bands between the first
alpha-carbon on the original monomer and each 
copied monomer's first alpha-carbon. If you 
rotate enough to see any of these bands, you 
can follow them to the monomers.