<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi David,<div class=""><br class=""></div><div class=""> Maybe your structure has ligands, ions, or solvent atoms -- no surface is computed for those and so they don't get an areaSES attribute. You could put in a check</div><div class=""><br class=""></div><div class="">if hasattr(r, 'areaSES'):</div><div class=""> r.relSESA = r.areaSES/ r.areaSESgxg<br class=""><div>else:</div><div> print 'Residue has no areaSES', r, 'type', r.type</div><div><br class=""></div><div>You might be interested instead using our newer program ChimeraX. Chimera often fails to compute molecular surfaces and SES areas for large structures. ChimeraX uses new code that always works.</div><div><br class=""></div><div> Tom</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 25, 2021, at 5:53 AM, David Leeming <<a href="mailto:david.leeming@student.manchester.ac.uk" class="">david.leeming@student.manchester.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Dear Chimera users, </span><br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div dir="ltr" class=""><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">I'm attempting to write a chimera script to automate the process of calculating the relative exposure of residues as per this tutorial: <a href="https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/surfnorm.html" id="LPlnk" class="">https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/surfnorm.html</a> </div><div class="x__EReadonly_1 x__Entity x__EType_OWALinkPreview x__EId_OWALinkPreview"></div><br class=""><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">The script I have is as follows: </div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-weight: normal; font-size: 14px; line-height: 19px;" class=""><span class=""><span class="">rc(</span><span style="color: rgb(206, 145, 120);" class="">'surface'</span><span class="">) </span><span style="color: rgb(106, 153, 85);" class=""># defines areaSES of residues </span></span><div class=""><span class="">rc(</span><span style="color: rgb(206, 145, 120);" class="">'defattr C:/Users/Admin/Downloads/areaSESgxg.txt log 0'</span><span class="">) </span><span style="color: rgb(106, 153, 85);" class=""># define attribute using areaSESgxg.txt</span></div><div class=""><span style="color: rgb(197, 134, 192);" class="">for</span><span class=""> m </span><span style="color: rgb(197, 134, 192);" class="">in</span><span class=""> chimera.openModels.list(</span><span style="color: rgb(156, 220, 254);" class="">modelTypes</span><span class="">=[chimera.Molecule]):</span></div><div class=""><span class=""> </span><span style="color: rgb(197, 134, 192);" class="">for</span><span class=""> r </span><span style="color: rgb(197, 134, 192);" class="">in</span><span class=""> m.residues:</span></div><div class=""><span class=""> r.relSESA = r.areaSES/ r.areaSESgxg</span></div></div><br class=""></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">However, when I run this script, I am receiving this error: </div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span id="cid:39cc50d4-a627-494c-b0f5-411a7785a9a2"><Outlook-1he3xhiv.png></span><br class=""></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">When I run the process using the UI I can successfully calculate relSESA</div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">By using the command: "surface" </div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Then using the assign attribute function to assign areaSESgxg.txt</div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Followed by using the calculate attribute function to calculate per residue: residue.areaSES/ residue.areaSESgxg</div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Could you advise on any methods I could use to fix this script to produce the output I am receiving from the UI. </span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Kind regards, </span></div><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">David</span></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Chimera-users mailing list:<span class="Apple-converted-space"> </span></span><a href="mailto:Chimera-users@cgl.ucsf.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Chimera-users@cgl.ucsf.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Manage subscription:<span class="Apple-converted-space"> </span></span><a href="https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></body></html>