<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">Hello all!</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">I'm looking to the scripts (<a href="http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/">http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/</a>) and can not see a simple example of how to open a PDB.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">What I need to my extension is to save a PDB relative to a map and then open it to the model panel.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">Copying it to the model panel does not make sense to me because I need to fix the positions of the moved PDB relative to the map.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)">Could it be something like this?</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;color:rgb(68,68,68)"><br></div><div class="gmail_default"><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> # Get opened molecule (the one selected in the menu)</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> m = self.object_menu.getvalue()</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> </i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> # Make copy using the copy_molecule native functionality from Chimera</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> from Molecule import copy_molecule</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> mc = copy_molecule(m)</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> </i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> # Set copy name</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> <a href="http://mc.name">mc.name</a> = m.name.split('.')[0] + '_' + self.chosen_solution + '.pdb'</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i><span style="white-space:pre"> </span>copy_path = self.cwd + <a href="http://mc.name">mc.name</a></i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i><br></i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> from Midas import open, write</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i> write(mc, self.map_menu.volume(), self.cwd)</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i><span style="white-space:pre"> </span>open(self.cwd)</i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace"><i><br></i></font></div><div class="gmail_default"><font color="#444444" face="monospace, monospace">Thank you in advance!</font></div></div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div></div></div></div></div></div>
</div>