<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 8, 2010, at 6:26 AM, Rajan Prabu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear Chimera users,<div><br></div><div>I am trying to make a morphing pdb with chimera without opening the interface using --nogui option. It works and calculates the interpolation and then it crashes. If i understood it correctly, it is trying to open the MD Movie GUI. By default morph movie command calls the MD Movie interface. Is it possible to make it work without opening the interface. </div> <meta charset="utf-8"><div><br></div><div>I am trying to run the script with chimera using the following command</div><div><br></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">chimera --nogui --script chi1.py</span></font></div> <div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div> <div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">and my script chi1.py is the following</span></font></div> <div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div> <div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><div>from chimera import runCommand</div> <div>runCommand('open starting.pdb')</div><div>runCommand('open end.pdb')</div><div>runCommand('morph start #0')</div><div>runCommand('morph interpolate #1')</div><div>runCommand('morph movie')</div> <div>runCommand('stop')</div></span></font></div></blockquote><br></div><div>Hi Rajan,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Yes, you are correct. The "morph movie" command tries to open the MD Movie interface and that doesn't work in nogui mode. There is no Chimera command for creating the morph trajectory without opening the MD Movie interface. I'll be adding a feature-request ticket to our Trac database to see that that gets implemented in the not-too-distant future.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Since you are using a Python script here, you can use the Python API to create and open the morph trajectory by changing your script to this:</div><div><br></div><div><div>from chimera import runCommand, openModels</div><div><div style="border-collapse: collapse; font-family: arial, sans-serif; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">runCommand('open starting.pdb')</div><div style="border-collapse: collapse; font-family: arial, sans-serif; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">runCommand('open end.pdb')</div></div><div>runCommand('morph start #0')</div><div>runCommand('morph interpolate #1')</div><div>#runCommand('morph movie')</div><div>from Morph.cmdline import _find</div><div>morph = _find("default")</div><div>traj, xform = morph.makeTrajectory(minimize=None, steps=None)</div><div>openModels.add([traj])</div><div>runCommand('stop')</div><div><br></div><div>Unfortunately it uses a "private" function of the Morph module (_find; functions/methods that start with an underscore are "private" and are supposed to be used only by other functions/methods in the same module). I hope the Morph module API can be improved so that scripts like yours don't need to "cheat" and access private functions/data.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>I note that your script doesn't really do anything with the morph after it's created. I assume you'll add some commands in there to save the morph or to run through it with the "coordset" command and save images or something. :-)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>I've attached the modified script for your convenience.</div><div><br></div><div>--Eric</div></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></p><br class="Apple-interchange-newline"></div></span> </div></body></html>