<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Another issue is that memorized settings only apply when running interactively, not when running with the —nogui flag (which I assume is the purpose of your script). So you are going to have to use the "prep(models, delSolvent=False)” approach, once you figure out the problem you’re having with the selection.<div class=""><br class=""></div><div class="">—Eric<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 18, 2018, at 12:33 PM, Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu" class="">pett@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><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=""><blockquote type="cite" class=""><div class="">On Dec 18, 2018, at 10:54 AM, Miro Moman <<a href="mailto:miromoman@gmail.com" class="">miromoman@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class=""><div class="">Thanks, however:</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">1) I checked the default preferences file and cannot find any line about water deletion, in spite of the fact that I deselected this iption on the GUI numerous times. Chimera remembers the choice until I close the session. Is there a transient preferences file?</div></div></div></blockquote><div class=""><br class=""></div>In your preferences file, look for the string “memorized settings”. Under that grouping there should be a ‘delSolvent’ entry whose value (for your case) should be 0. If your preference file is missing those strings then you haven’t followed Elaine’s instructions for memorizing settings correctly.</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=""><br class=""><blockquote type="cite" class=""><div dir="auto" class=""><div dir="auto" class="">2) Regarding "fragment true", it does not work for me. I am guessing that it could be because my selection is distance-dependent. Spec doesn't seem to be working either, only freeze does.</div></div></blockquote><div class=""><br class=""></div>Did you try the simple examples that Elaine provided? Did they work for you? If they did, how do they differ from what you’re doing?</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=""><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="">—Eric</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=""><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 class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"></div><blockquote type="cite" class=""><div dir="auto" class=""><div dir="auto" class=""><br class=""></div><div dir="auto" class="">So, I am able to accomplish what I want. Only that it takes longer.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Best,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Miro<br class=""><br class=""><div data-smartmail="gmail_signature" dir="auto" class="">--<br class="">Edelmiro Moman, PhD<br class="">South Ural State University - SUSU<br class="">Южно-Уральский государственный университет - ЮУрГУ<br class="">Phone: +7 902 614 73 77<br class="">E-mail: <a href="mailto:miromoman@gmail.com" class="">miromoman@gmail.com</a><br class=""><a href="https://www.linkedin.com/in/edelmiro-moman-3a9979a/" class="">https://www.linkedin.com/in/edelmiro-moman-3a9979a/</a><br class=""> <span class="Apple-converted-space"> </span></div><br class=""><div class="gmail_quote" dir="auto"><div dir="ltr" class="">On Tue, 18 Dec 2018, 23:21 Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" class="">meng@cgl.ucsf.edu</a><span class="Apple-converted-space"> </span>wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Hi Miro,<br class="">(1)Turn off option to remove waters. If you use the Minimize GUI and turn on "Memorize options chosen in subsequent dialogs” and then in the Dock Prep GUI turn off the option to remove waters, that should be remembered in your preferences.<br class=""><<a href="http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/minimize/minimize.html" rel="noreferrer noreferrer" target="_blank" class="">http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/minimize/minimize.html</a>><br class=""><br class="">(2) from “spec” description: "However, energy calculations will include the entire molecule models containing the specified atoms, unless fragment true is also used.”<br class=""><<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html" rel="noreferrer noreferrer" target="_blank" class="">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html</a>><br class=""><br class="">(3) I tried a simple test case with “fragment true” vs. omitting that option and I got different energies, so as far as I can tell it is working. The calculation was slower with the option omitted, since more atoms were involved.<br class=""><br class="">open 1zik<br class="">sel @ca & :.b<br class="">addh<br class="">addcharge<br class="">mini spec 'sel’ fragment true cache true prep false freeze '@CA | ~sel' nsteps 10<br class=""><br class="">….gave Potential energy: -1001.525464<br class=""><br class="">open 1zik<br class="">sel @ca & :.b<br class="">addh<br class="">addcharge<br class="">mini spec 'sel' cache true prep false freeze '@CA | ~sel' nsteps 10<br class=""><br class="">…gave Potential energy: -581.897083<br class=""><br class="">I hope this helps,<br class="">Elaine<br class="">-----<br class="">Elaine C. Meng, Ph.D. <br class="">UCSF Chimera(X) team<br class="">Department of Pharmaceutical Chemistry<br class="">University of California, San Francisco<br class=""><br class="">> On Dec 18, 2018, at 3:01 AM, Miro Moman <<a href="mailto:miromoman@gmail.com" target="_blank" rel="noreferrer" class="">miromoman@gmail.com</a>> wrote:<br class="">><span class="Apple-converted-space"> </span><br class="">> A quick update:<br class="">><span class="Apple-converted-space"> </span><br class="">> runCommand("sel #0 & ligand zr<6 | #0 & solvent zr<6")<br class="">> runCommand("minimize spec 'sel' fragment true cache true prep false freeze '@CA | ~sel' nsteps 100 cgsteps 10")<br class="">><span class="Apple-converted-space"> </span><br class="">> Freezing the unselected atoms works. However, my impression is that "spec" and "fragment" have no effect whatsoever and that the total energy is computed at each iteration.<br class="">><span class="Apple-converted-space"> </span><br class="">><span class="Apple-converted-space"> </span><br class="">> --<br class="">> Edelmiro Moman, PhD<br class="">> South Ural State University - SUSU<br class="">> Южно-Уральский государственный университет - ЮУрГУ<br class="">> Phone: +7 902 614 73 77<br class="">> E-mail:<span class="Apple-converted-space"> </span><a href="mailto:miromoman@gmail.com" target="_blank" rel="noreferrer" class="">miromoman@gmail.com</a><br class="">><span class="Apple-converted-space"> </span><a href="https://www.linkedin.com/in/edelmiro-moman-3a9979a/" rel="noreferrer noreferrer" target="_blank" class="">https://www.linkedin.com/in/edelmiro-moman-3a9979a/</a><br class="">><span class="Apple-converted-space"> </span><br class="">><span class="Apple-converted-space"> </span><br class="">> On Tue, 18 Dec 2018 at 12:47, Miro Moman <<a href="mailto:miromoman@gmail.com" target="_blank" rel="noreferrer" class="">miromoman@gmail.com</a>> wrote:<br class="">> Hello,<br class="">><span class="Apple-converted-space"> </span><br class="">> I would like to minimise the binding site including ligands, cofactors and water molecules.<br class="">><span class="Apple-converted-space"> </span><br class="">> I have the following script:<br class="">> ___<br class="">><span class="Apple-converted-space"> </span><br class="">> runCommand("open " + pdbpath + pdbid + "_chimera.pdb")<br class="">><span class="Apple-converted-space"> </span><br class="">> runCommand("findclash 'ligand | solvent' test '~ligand | ~solvent' overlapCutoff -1.0 hbondAllowance 0.0 intraMol false selectClashes true")<br class="">><span class="Apple-converted-space"> </span><br class="">> runCommand("sel up")<br class="">> runCommand("namesel tomin")<br class="">><span class="Apple-converted-space"> </span><br class="">> runCommand("minimize spec tomin fragment true cache true prep true freeze :@ca cgsteps 0")<br class="">><span class="Apple-converted-space"> </span><br class="">> runCommand("write format pdb #0 " + pdbpath + pdbid + "_min.pdb")<br class="">> runCommand("write format mol2 #0 " + pdbpath + pdbid + "_min.mol2")<br class="">> ___<br class="">><span class="Apple-converted-space"> </span><br class="">> I am facing two issues:<br class="">><span class="Apple-converted-space"> </span><br class="">> 1) Water molecules are deleted by prep. Is there as way of preventing this.<span class="Apple-converted-space"> </span><br class="">> I have tried creating a custom preferences file like:<br class="">><span class="Apple-converted-space"> </span><br class="">> echo "{'AddCharge': {'charge method': 'Gasteiger'}," > ${DIR}/chimera_preferences<br class="">> #echo " 'DockPrep': {'delete solvent': 'false'}," > ${DIR}/chimera_preferences<br class="">> echo " 'DockPrep': {'incomplete side chains': 'rotamers'}}" >> ${DIR}/chimera_preferences<br class="">><span class="Apple-converted-space"> </span><br class="">> However, the second option is not recognised. Does it exist and, if so, what would be the correct syntax?<br class="">><span class="Apple-converted-space"> </span><br class="">> 2) The second problem is that the selection is ignored and every atom except CAs is minimised.<span class="Apple-converted-space"> </span><br class="">><span class="Apple-converted-space"> </span><br class="">> Another option I have tried be setting prep to false and running it beforehand:<br class="">><span class="Apple-converted-space"> </span><br class="">> models = chimera.openModels.open(pdbpath + pdbid + "_chimera.pdb")<br class="">> prep(models, delSolvent=False)<br class="">><span class="Apple-converted-space"> </span><br class="">> But, again, if I do this, the selection is also ignored.<br class="">><span class="Apple-converted-space"> </span><br class="">> Best,<br class="">><span class="Apple-converted-space"> </span><br class="">> Miro<br class=""><br class=""></blockquote></div></div></div>_______________________________________________<br class="">Chimera-users mailing list:<span class="Apple-converted-space"> </span><a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription:<span class="Apple-converted-space"> </span><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></blockquote></div><br class="" 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;"><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="http://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="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></body></html>