<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="">hi Thomas,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>I’m pretty sure this would have to be a Python script. The general idea would be to select residues within a certain distance of the ligand, systematically change their names to indicate alternative protonation states, delete all protons and then run AddH and write out PDBs. Since you have an indeterminate number of loops needed, I would use recursion, so something like:</div><div class=""><br class=""></div><div class="">pdb_num = 1</div><div class="">from chimera import runCommand as rc</div><div class="">rc(“sel ligands z<DIST”)</div>from chimera.selection import currentResidues<br class=""><div class="">residues = currentResidues()</div><div class=""><br class=""></div><div class="">def change_protonation(remaining_residues):</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if not remaining_residues:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>global pdb_num</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>rc(“del H”)</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>rc(“addh”)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>rc(“write %d.pdb” % pdb_num)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>pdb_num += 1</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>return</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>r = remaining_residues[0]</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if r.type == “GLU”:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>states = [“GLU”, “GLH”]</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>elif r.type == “ASP”:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>states = [“ASP”, “ASH”]</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>elif r.type == “HIS”:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>etc….</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>else:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>states = [r.type]</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for state in states:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>r.type = state</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>change_protonation(remaining_residues[1:])</div><div class=""><br class=""></div><div class="">change_protonation(residues)</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>The script is incomplete and I haven’t tested it, but you get the idea.</div><div class=""><br class=""></div><div class="">—Eric</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><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"><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Mar 19, 2019, at 7:59 AM, Thomas Evangelidis <<a href="mailto:tevang3@gmail.com" class="">tevang3@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size: large;">Greetings,</div><div class="gmail_default" style="font-size: large;"><br class=""></div><div class="gmail_default" style="font-size: large;">I want to write a script that will read a protein-ligand complex, will find all residues with alternative protonation states within a radius from the ligand, and will write to separate pdb files all combinations of alternative protonations or the protein's binding site. Is this possible in Chimera? I saw at the documentation of addh command that there is not a way to specify explicitly which residues to protonate and how (e.g. I can protonate all ASP to ASH but not ASP34 to ASH34 and keep ASP52 as it is).</div><div class="gmail_default" style="font-size: large;"><br class=""></div><div class="gmail_default" style="font-size: large;">Thanks in advance.</div><div class="gmail_default" style="font-size: large;">Thomas </div><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">======================================================================</font></span></span></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">Dr Thomas Evangelidis</font></span></span></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="font-family: arial, helvetica, sans-serif; font-size: small;" class="">Research Scientist</span></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="font-family: arial, helvetica, sans-serif; font-size: small;" class=""><a href="https://www.uochb.cz/web/structure/31.html?lang=en" target="_blank" class="">IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences</a></span></p><font size="2" class=""><div class=""><font face="arial, helvetica, sans-serif" class=""><div class="">Prague, Czech Republic</div><div class=""> & </div></font></div><font face="arial, helvetica, sans-serif" class=""><a href="https://www.ceitec.eu/" target="_blank" class="">CEITEC - Central European Institute of Technology</a></font><br class=""><font face="arial, helvetica, sans-serif" class="">Brno, Czech Republic </font></font></div><div class=""><font size="2" class=""><font face="arial, helvetica, sans-serif" class=""><br class=""></font></font></div><div dir="ltr" class=""><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">email: </font></span></span><a href="mailto:tevang3@gmail.com" style="font-size:small;font-family:arial,helvetica,sans-serif" target="_blank" class="">tevang3@gmail.com</a></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">website:
<a href="https://sites.google.com/site/thomasevangelidishomepage/" target="_blank" class="">https://sites.google.com/site/thomasevangelidishomepage/</a></font></span></span></p><span style="" class=""><br class=""><br class=""></span><div style="margin-bottom: 0cm;" class="">
<br class="webkit-block-placeholder"></div>
</div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></div></blockquote></div><br class=""></div></body></html>