<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Mark,<div><span class="Apple-tab-span" style="white-space:pre"> </span>I don't know how you're opening these molecules but if you're using the "open" command then providing the "noprefs" keyword will prevent smart display. Also, if you are using openModels.open() or openModels.add() then there is a 'noprefs' keyword that you could specify as False. The 'noprefs' keyword for the open command has been around for awhile, but that keyword is new for the openModels functions, so if your plugin needs to work with a variety of Chimera versions either you will need to introspect the openModels function (using Python's <i>inspect</i> module, probably the <i>getargspec</i> function) or check chimera.version. I actually recommend the inspect approach since the format of chimera.version has changed over time, so inspect is more bulletproof.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Using that setAttr command for stickScale works for me. You are aware that stickScale defaults to 1, right?</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>There will be some minimal speed advantage to using direct Python calls to runCommand (elimination of some of the text parsing), but I would only expect the difference to be noticeable if we are talking about thousands of calls to the functions. I guess I'm referring to the type of code you sent, where the Midas-module equivalent function is called (so only the parsing is eliminated). There certainly could be more savings in some cases where the generic Midas-module code is replaced by special-purpose code.</div><div><br></div><div>--Eric</div><div><br><div><div>On Aug 24, 2009, at 11:42 AM, Mark Moll wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Eric,<br><br>I'm observing some odd behavior with a recent daily build (build 28565) that may be related to this. I am working on a plugin that creates new models. *After* the chimera models have been created, the plugin runs a number of Midas commands in the python code:<br><br><span class="Apple-tab-span" style="white-space:pre"> </span>Midas.undisplay('element.H')<br><span class="Apple-tab-span" style="white-space:pre"> </span>Midas.represent('stick','#')<br><span class="Apple-tab-span" style="white-space:pre"> </span>Midas.represent('bs','@ca')<br><span class="Apple-tab-span" style="white-space:pre"> </span>Midas.color('byhetero','#')<br><span class="Apple-tab-span" style="white-space:pre"> </span>Midas.setAttr('m','stickScale',1,'#')<br><span class="Apple-tab-span" style="white-space:pre"> </span>Midas.setAttr('m','ballScale',.35,'#')<br><br>This doesn't seem to have the desired effect. Turning off "smart initial display" works a little better, but the stickScale command still has no effect...<br><br>(BTW, is there any speed advantage to using python commands rather than runCommand statements?)<br>-- <br>Mark<br><br><br><br></div></blockquote></div><br></div></body></html>