<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">openModels.list doesn't necessarily return the currently open models in any particular order. The if/else part of the code is testing whether the first model in the model list has model ID 0. If it does then it assigns the first model to m0 and the second model to m1. Otherwise, it makes the reverse assignment -- so m0 will always contain model 0 (the code assumes there are only two models open).<div><br></div><div>As per the example in that mail, chain A of model 0 had been superimposed on chain B of model 1. That's why the "chains" were set to "[m0.sequence('A'), m1.sequence('B')]" for handing off to makeAlignment -- those were the chains desired in the alignment. Are you saying you don't know which chain from each PDB file to use? How do you know which to superimpose then?</div><div><br></div><div>--Eric</div><div><br><div><div>On Oct 27, 2014, at 4:05 PM, Sanjeev Sariya <<a href="mailto:s.sariya_work@ymail.com">s.sariya_work@ymail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px; ">Thank you Eric for the URL.<br><div id="yui_3_16_0_1_1414450966767_2627" dir="ltr"><span id="yui_3_16_0_1_1414450966767_2622"></span>Could you please help me understand what is going on here?<br></div><pre id="yui_3_16_0_1_1414450966767_2626" style="" class="">from chimera import openModels, Molecule # import
<br>models = openModels.list(modelTypes=[Molecule]) # array for model- different PDBs
<br>if models[0].id == 0: # what does this do?
m0, m1 = models
<br>else: #
m1, m0 = models # why interchanged the m1, mo?
chains = [m0.sequence('A'), m1.sequence('B')] # how do I know how many chains are present in PDB file?<br><br><br><br><br></pre><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Monday, October 27, 2014 6:35 PM, Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu">pett@cgl.ucsf.edu</a>> wrote:<br> </font> </div> <br><br> <div class="y_msg_container"><div id="yiv0173335957">Hi Sanjeev,<div><span class="yiv0173335957Apple-tab-span" style="white-space:pre;"> </span>Take a look at this chimera-users message: <a rel="nofollow" shape="rect" target="_blank" href="http://plato.cgl.ucsf.edu/pipermail/chimera-users/2014-May/009904.html">[Chimera-users] easy way to make alignments in chimera</a> . I think it answers most of your questions. The only change you would need to make is that where it uses "saveStockholm" you would instead use "saveFASTA".</div><div><br clear="none"></div><div>--Eric</div><div><div><br clear="none"> Eric Pettersen<br clear="none"> UCSF Computer Graphics Lab<br clear="none"> <a rel="nofollow" shape="rect" target="_blank" href="http://www.cgl.ucsf.edu/">http://www.cgl.ucsf.edu</a><br clear="none"><br clear="none"></div><div><div class="yiv0173335957yqt7007642041" id="yiv0173335957yqt28210"><div>On Oct 27, 2014, at 2:25 PM, Sanjeev Sariya <<a rel="nofollow" shape="rect" ymailto="mailto:s.sariya_work@ymail.com" target="_blank" href="mailto:s.sariya_work@ymail.com">s.sariya_work@ymail.com</a>> wrote:</div><br class="yiv0173335957Apple-interchange-newline" clear="none"><blockquote type="cite"><div><div style="background-color:rgb(255, 255, 255);font-family:HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-size:16px;"><div id="yiv0173335957"><div id="yiv0173335957yui_3_16_0_1_1414444909641_2572"><div id="yiv0173335957yui_3_16_0_1_1414444909641_2571" style="background-color:rgb(255, 255, 255);font-family:HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-size:16px;"><div id="yiv0173335957"><div id="yiv0173335957yui_3_16_0_1_1414437427591_23567"><div id="yiv0173335957yui_3_16_0_1_1414437427591_23566" style="background-color:rgb(255, 255, 255);font-family:HelveticaNeue-Light, 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-size:16px;">Hi Chimera Developers,<br clear="none"><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414437427591_7563"><span id="yiv0173335957yui_3_16_0_1_1414437427591_16595"><br clear="none"></span></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414437427591_16594"><span id="yiv0173335957yui_3_16_0_1_1414437427591_16593">I've used chimera mostly by GUI inerface [click]. <br clear="none"></span></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414437427591_23627"><div id="yiv0173335957yui_3_16_0_1_1414444909641_2639">How do I get the match-align work from command line in a python script?</div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2671">I read a good description at:<br clear="none"></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2643"><a rel="nofollow" shape="rect" id="yiv0173335957yui_3_16_0_1_1414444909641_2642" target="_blank" href="http://plato.cgl.ucsf.edu/pipermail/chimera-users/2012-September/007934.html">http://plato.cgl.ucsf.edu/pipermail/chimera-users/2012-September/007934.html</a></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2680"><br clear="none"></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2681">work flow of the script is:</div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2682">take in 2 pdb files and match->align them.</div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2690"><br clear="none"></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2687">I think, I will have to open them before running 'mols = openModels.list(modelTypes=[Molecule])' ?<br clear="none"></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2688"><br clear="none"></div><div dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2689">How do I get the output saved in a FASTA file without MAV interface?<br clear="none"></div><div class="yiv0173335957" dir="ltr" id="yiv0173335957yui_3_16_0_1_1414444909641_2670" style=""><br class="yiv0173335957" style="" clear="none"></div></div><span></span><div id="yiv0173335957yui_3_16_0_1_1414437427591_7564"> </div><br clear="none"></div></div></div></div></div></div></div></div>_______________________________________________<br clear="none">Chimera-users mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:Chimera-users@cgl.ucsf.edu" target="_blank" href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a><br clear="none"><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br clear="none"></blockquote></div></div><br clear="none"></div><br clear="none"><br clear="none"></div><br><br></div> </div> </div> </div> </div></blockquote></div><br></div></body></html>