create automatically all alternative protonation states of protein

Greetings, 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). Thanks in advance. Thomas -- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/

hi Thomas, 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: pdb_num = 1 from chimera import runCommand as rc rc(“sel ligands z<DIST”) from chimera.selection import currentResidues residues = currentResidues() def change_protonation(remaining_residues): if not remaining_residues: global pdb_num rc(“del H”) rc(“addh”) rc(“write %d.pdb” % pdb_num) pdb_num += 1 return r = remaining_residues[0] if r.type == “GLU”: states = [“GLU”, “GLH”] elif r.type == “ASP”: states = [“ASP”, “ASH”] elif r.type == “HIS”: etc…. else: states = [r.type] for state in states: r.type = state change_protonation(remaining_residues[1:]) change_protonation(residues) The script is incomplete and I haven’t tested it, but you get the idea. —Eric Eric Pettersen UCSF Computer Graphics Lab
On Mar 19, 2019, at 7:59 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Greetings,
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).
Thanks in advance. Thomas
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Eric, Thank you very much for the sample code. I am afraid though that recursion is not the proper solution. There are much more combinations of protonation states that must be created. I solved this problem by expanding Tree structures. However the python module for Tree structures named 'ete3' is not a standard one, hence Chimera's python interpreter cannot find it although I have installed in on my local Anaconda python distribution. Do you know how I can make Chimera find it? I can imagine that even if it finds it, there may be conflicts between my local python version and Chimera's python version. Traceback (most recent call last):
File "/home/thomas/Programs/Chimera/share/chimeraInit.py", line 698, in init midas_text.doRunScript("runscript", script) File "/home/thomas/Programs/Chimera/share/Midas/midas_text.py", line 2248, in doRunScript execfile(scriptPath, scriptGlobals) File "/usr/local/bin/protonate_receptor.py", line 12, in <module> from ete3 import Tree ImportError: No module named ete3
On Tue, 19 Mar 2019 at 19:04, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
hi Thomas, 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:
pdb_num = 1 from chimera import runCommand as rc rc(“sel ligands z<DIST”) from chimera.selection import currentResidues residues = currentResidues()
def change_protonation(remaining_residues): if not remaining_residues: global pdb_num rc(“del H”) rc(“addh”) rc(“write %d.pdb” % pdb_num) pdb_num += 1 return r = remaining_residues[0] if r.type == “GLU”: states = [“GLU”, “GLH”] elif r.type == “ASP”: states = [“ASP”, “ASH”] elif r.type == “HIS”: etc….
else: states = [r.type] for state in states: r.type = state change_protonation(remaining_residues[1:])
change_protonation(residues)
The script is incomplete and I haven’t tested it, but you get the idea.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Mar 19, 2019, at 7:59 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Greetings,
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).
Thanks in advance. Thomas
--
======================================================================
Dr Thomas Evangelidis
Research Scientist
IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/

Hi Thomas, I don’t understand your aversion to the recursion solution. Recursion will enumerate all the combinations. Well, regardless, if you wish to use another approach that’s okay. In order to install a Python package where Chimera will find it, you need to install it with Chimera’s Python interpreter. How you do so is covered in the Programmer’s FAQ: https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/faq.html <https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/faq.html> (actually tomorrow’s FAQ, since it needed a little tweak). So namely: 3b) Installing Python packages into Chimera. <> To use a package from Chimera, you would need to install it with Chimera's Python. Chimera's Python has the Python version number appended to it, so it will be named python2.x (python2.7 when this was written; also on Windows add ".exe"). On non-Mac, it will be found in <your Chimera installation>/bin. On Mac it's in Chimera.app/Contents/Resources/bin — don't use the one in Chimera.app/Contents/MacOS! The best way to install packages is with pip, using (Chimera's) python2.x -m pip install package. If the pip module is not found, you'll need to install it first with (Chimera's) python2.x -m ensurepip. Then -m pip install will work. For packages not supported by pip, you will have to follow the installation instructions that come with the package. —Eric Eric Pettersen UCSF Computer Graphics Lab
On Mar 20, 2019, at 4:17 PM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hi Eric,
Thank you very much for the sample code. I am afraid though that recursion is not the proper solution. There are much more combinations of protonation states that must be created. I solved this problem by expanding Tree structures. However the python module for Tree structures named 'ete3' is not a standard one, hence Chimera's python interpreter cannot find it although I have installed in on my local Anaconda python distribution. Do you know how I can make Chimera find it? I can imagine that even if it finds it, there may be conflicts between my local python version and Chimera's python version.
Traceback (most recent call last): File "/home/thomas/Programs/Chimera/share/chimeraInit.py", line 698, in init midas_text.doRunScript("runscript", script) File "/home/thomas/Programs/Chimera/share/Midas/midas_text.py", line 2248, in doRunScript execfile(scriptPath, scriptGlobals) File "/usr/local/bin/protonate_receptor.py", line 12, in <module> from ete3 import Tree ImportError: No module named ete3
On Tue, 19 Mar 2019 at 19:04, Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> wrote: hi Thomas, 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:
pdb_num = 1 from chimera import runCommand as rc rc(“sel ligands z<DIST”) from chimera.selection import currentResidues residues = currentResidues()
def change_protonation(remaining_residues): if not remaining_residues: global pdb_num rc(“del H”) rc(“addh”) rc(“write %d.pdb” % pdb_num) pdb_num += 1 return r = remaining_residues[0] if r.type == “GLU”: states = [“GLU”, “GLH”] elif r.type == “ASP”: states = [“ASP”, “ASH”] elif r.type == “HIS”: etc….
else: states = [r.type] for state in states: r.type = state change_protonation(remaining_residues[1:])
change_protonation(residues)
The script is incomplete and I haven’t tested it, but you get the idea.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Mar 19, 2019, at 7:59 AM, Thomas Evangelidis <tevang3@gmail.com <mailto:tevang3@gmail.com>> wrote:
Greetings,
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).
Thanks in advance. Thomas
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>

Hi Eric, I don’t understand your aversion to the recursion solution. Recursion will
enumerate all the combinations.
It will not. :) I will give you an example once I set up ete3 running in Chimera.
Well, regardless, if you wish to use another approach that’s okay. In order to install a Python package where Chimera will find it, you need to install it with Chimera’s Python interpreter. How you do so is covered in the Programmer’s FAQ: https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/faq.html (actually tomorrow’s FAQ, since it needed a little tweak). So namely:
3b) Installing Python packages into Chimera.
To use a package from Chimera, you would need to install it with Chimera's Python. Chimera's Python has the Python version number appended to it, so it will be named python2.x (python2.7 when this was written; also on Windows add ".exe"). On non-Mac, it will be found in <your Chimera installation>/bin. On Mac it's in Chimera.app/Contents/Resources/bin — don't use the one in Chimera.app/Contents/MacOS!
The best way to install packages is with pip, using (Chimera's) python2.x -m pip install *package*. If the pip module is not found, you'll need to install it first with (Chimera's) python2.x -m ensurepip. Then -m pip install will work. For packages not supported by pip, you will have to follow the installation instructions that come with the package.
Do you know how to fix this?
$ /home/thomas/Programs/Chimera/bin/python2.7 -m pip install ete3 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Requirement already satisfied: ete3 in /home/thomas/Programs/Chimera/lib/python2.7/site-packages/ete3-3.1.1-py2.7.egg (3.1.1) pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
Thanks, Thomas -- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/

Hi Thomas, I think there's a flag in pip so you can skip SSL validations. From pip's help: --trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS. So maybe you can just use "... -m pip --trusted-host pypi.org<http://pypi.org> install ete3". If it does not work, you can always download the package manually from PyPI and run "... -m pip install /path/to/package/in/disk". I faced the situation with lots of external dependencies I needed for my own projects, so in the end I wrote a wrapper to make it easier (Pychimera<https://pychimera.readthedocs.io/en/latest/>). It should help you use conda for package management and then inject the environment in Chimera. I admit that in some systems it might cause more trouble than it's worth it, but maybe you want to try. You would need to install Miniconda first, then `conda create -n ete3 -c insilichem pychimera`, followed by `conda activate ete3` and finally `pip install ete3`. To start Chimera with the injected dependencies, use `pychimera --gui` (bare `pychimera` will start the injected Python interpreter). Let me know if you need something else. Jaime. El vie., 22 mar. 2019 a las 12:22, Thomas Evangelidis (<tevang3@gmail.com<mailto:tevang3@gmail.com>>) escribió: Hi Eric, I don’t understand your aversion to the recursion solution. Recursion will enumerate all the combinations. It will not. :) I will give you an example once I set up ete3 running in Chimera. Well, regardless, if you wish to use another approach that’s okay. In order to install a Python package where Chimera will find it, you need to install it with Chimera’s Python interpreter. How you do so is covered in the Programmer’s FAQ: https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/faq.html (actually tomorrow’s FAQ, since it needed a little tweak). So namely: 3b) Installing Python packages into Chimera. To use a package from Chimera, you would need to install it with Chimera's Python. Chimera's Python has the Python version number appended to it, so it will be named python2.x (python2.7 when this was written; also on Windows add ".exe"). On non-Mac, it will be found in <your Chimera installation>/bin. On Mac it's in Chimera.app/Contents/Resources/bin — don't use the one in Chimera.app/Contents/MacOS! The best way to install packages is with pip, using (Chimera's) python2.x -m pip install package. If the pip module is not found, you'll need to install it first with (Chimera's) python2.x -m ensurepip. Then -m pip install will work. For packages not supported by pip, you will have to follow the installation instructions that come with the package. Do you know how to fix this? $ /home/thomas/Programs/Chimera/bin/python2.7 -m pip install ete3 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Requirement already satisfied: ete3 in /home/thomas/Programs/Chimera/lib/python2.7/site-packages/ete3-3.1.1-py2.7.egg (3.1.1) pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org<http://pypi.org>', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping Thanks, Thomas -- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences<https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology<https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com<mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hello again! @Jaime Thanks, PyChimera worked great! @Eric I wrote a script and posted it to a new thread to avoid confusion with this one. However, I just spotted a flaw. Is it possible to control to which oxygen of the carboxylate the proton is added? Ideally, I want to get both alternative protonations. If not then to flip the resulting carboxylic group by 180 degrees. Could you give me some hints, please? best, Thomas -- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/

Hi Thomas, The same atom name will always receive the proton (as noted on the addh help page). Your two options are to swap the atom names, or use the “rotate” command to rotate the appropriate bond by 180°. For example, to swap the names of OE1 and OE2 in GLU 102 of chain A: setattr a name XX :102.A@OE1 setattr a name OE1 :102.A@OE2 setattr a name OE2 :102.A@XX Similarly, to rotate the CG-CD bond of that residue: rotation 1 :102.A@CD,CG rotation 1 180 ~rotation 1 —Eric
On Mar 28, 2019, at 7:11 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hello again!
@Jaime Thanks, PyChimera worked great!
@Eric I wrote a script and posted it to a new thread to avoid confusion with this one. However, I just spotted a flaw. Is it possible to control to which oxygen of the carboxylate the proton is added? Ideally, I want to get both alternative protonations. If not then to flip the resulting carboxylic group by 180 degrees. Could you give me some hints, please?
best, Thomas
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>

Hi Eric, Thanks for the hints, i programmed it to consider also the atom that receives the proton. To make the code complete, namely to generate structures ready for docking or MD, is it possible to do the following in python? * if alternate locations keep only highest occupancy. * convert modified residues to standard residues. * replace incomplete sidechains. Basically what DockPred does but in python. Best, Thomas Dne čt 28. 3. 2019 6:10 PM uživatel Eric Pettersen <pett@cgl.ucsf.edu> napsal:
Hi Thomas, The same atom name will always receive the proton (as noted on the addh help page). Your two options are to swap the atom names, or use the “rotate” command to rotate the appropriate bond by 180°. For example, to swap the names of OE1 and OE2 in GLU 102 of chain A:
setattr a name XX :102.A@OE1 setattr a name OE1 :102.A@OE2 setattr a name OE2 :102.A@XX
Similarly, to rotate the CG-CD bond of that residue:
rotation 1 :102.A@CD,CG rotation 1 180 ~rotation 1
—Eric
On Mar 28, 2019, at 7:11 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hello again!
@Jaime Thanks, PyChimera worked great!
@Eric I wrote a script and posted it to a new thread to avoid confusion with this one. However, I just spotted a flaw. Is it possible to control to which oxygen of the carboxylate the proton is added? Ideally, I want to get both alternative protonations. If not then to flip the resulting carboxylic group by 180 degrees. Could you give me some hints, please?
best, Thomas
--
======================================================================
Dr Thomas Evangelidis
Research Scientist
IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

OK, i found an older post about how to run DockPred from a script. But i cannot find how to add ions in Python. Is there any way to neutralize the system in Python without adding waters? Dne pá 29. 3. 2019 5:28 PM uživatel Thomas Evangelidis <tevang3@gmail.com> napsal:
Hi Eric,
Thanks for the hints, i programmed it to consider also the atom that receives the proton. To make the code complete, namely to generate structures ready for docking or MD, is it possible to do the following in python?
* if alternate locations keep only highest occupancy. * convert modified residues to standard residues. * replace incomplete sidechains.
Basically what DockPred does but in python.
Best, Thomas
Dne čt 28. 3. 2019 6:10 PM uživatel Eric Pettersen <pett@cgl.ucsf.edu> napsal:
Hi Thomas, The same atom name will always receive the proton (as noted on the addh help page). Your two options are to swap the atom names, or use the “rotate” command to rotate the appropriate bond by 180°. For example, to swap the names of OE1 and OE2 in GLU 102 of chain A:
setattr a name XX :102.A@OE1 setattr a name OE1 :102.A@OE2 setattr a name OE2 :102.A@XX
Similarly, to rotate the CG-CD bond of that residue:
rotation 1 :102.A@CD,CG rotation 1 180 ~rotation 1
—Eric
On Mar 28, 2019, at 7:11 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hello again!
@Jaime Thanks, PyChimera worked great!
@Eric I wrote a script and posted it to a new thread to avoid confusion with this one. However, I just spotted a flaw. Is it possible to control to which oxygen of the carboxylate the proton is added? Ideally, I want to get both alternative protonations. If not then to flip the resulting carboxylic group by 180 degrees. Could you give me some hints, please?
best, Thomas
--
======================================================================
Dr Thomas Evangelidis
Research Scientist
IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Thomas, Adding ions is in the “Addions” module. Here’s some example code: from Addions import initiateAddions from chimera import openModels, replyobj initiateAddions(openModels.list(), “Cl-“, “neutralize”, replyobj.status) Now, obviously the above code will only neutralize a positive system since it is adding “Cl-“ ions. Your script would probably need to sum up the total charge of your system in order to know what kind of ion to add… —Eric
On Mar 31, 2019, at 8:10 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
OK, i found an older post about how to run DockPred from a script. But i cannot find how to add ions in Python. Is there any way to neutralize the system in Python without adding waters?
Dne pá 29. 3. 2019 5:28 PM uživatel Thomas Evangelidis <tevang3@gmail.com <mailto:tevang3@gmail.com>> napsal: Hi Eric,
Thanks for the hints, i programmed it to consider also the atom that receives the proton. To make the code complete, namely to generate structures ready for docking or MD, is it possible to do the following in python?
* if alternate locations keep only highest occupancy. * convert modified residues to standard residues. * replace incomplete sidechains.
Basically what DockPred does but in python.
Best, Thomas
Dne čt 28. 3. 2019 6:10 PM uživatel Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> napsal: Hi Thomas, The same atom name will always receive the proton (as noted on the addh help page). Your two options are to swap the atom names, or use the “rotate” command to rotate the appropriate bond by 180°. For example, to swap the names of OE1 and OE2 in GLU 102 of chain A:
setattr a name XX :102.A@OE1 setattr a name OE1 :102.A@OE2 setattr a name OE2 :102.A@XX
Similarly, to rotate the CG-CD bond of that residue:
rotation 1 :102.A@CD,CG rotation 1 180 ~rotation 1
—Eric
On Mar 28, 2019, at 7:11 AM, Thomas Evangelidis <tevang3@gmail.com <mailto:tevang3@gmail.com>> wrote:
Hello again!
@Jaime Thanks, PyChimera worked great!
@Eric I wrote a script and posted it to a new thread to avoid confusion with this one. However, I just spotted a flaw. Is it possible to control to which oxygen of the carboxylate the proton is added? Ideally, I want to get both alternative protonations. If not then to flip the resulting carboxylic group by 180 degrees. Could you give me some hints, please?
best, Thomas
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Eric, Thanks, but it seems that it doesn't recognize one of ligand's hydrogens, which is strange because I calculate AM1 charges before adding ions. This is the whole error message. I also attach the input files. Do you have any idea about what might be wrong? Traceback (most recent call last): File "/home/thomas/Programs/Anaconda2/envs/ete3/bin/pychimera", line 12, in <module> update_dict = pychimera.__main__.run() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/__main__.py", line 6, in run pychimera.main() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 347, in main run_cli_options(args) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 309, in run_cli_options globals().update(runpy.run_path(choice, run_name="__main__")) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 252, in run_path return _run_module_code(code, init_globals, run_name, path_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/protonate_receptor.py", line 300, in <module> write_protonated_structure(protonations) File "/usr/local/bin/protonate_receptor.py", line 129, in write_protonated_structure initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status) File "/home/thomas/Programs/Chimera/share/Addions/__init__.py", line 72, in initiateAddions noGaffComplain(noGaff, "Add Ions") File "/home/thomas/Programs/Chimera/share/WritePrmtop/__init__.py", line 10, in noGaffComplain raise ValueError("Cannot determine GAFF type for %s (etc.)" % noGaff[0]) ValueError: Cannot determine GAFF type for #1:1@H1 (etc.) -- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/

Hi Thomas, Addcharge is what adds GAFF types. What exact addcharge command or function call are you using? —Eric
On Apr 1, 2019, at 2:25 PM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hi Eric,
Thanks, but it seems that it doesn't recognize one of ligand's hydrogens, which is strange because I calculate AM1 charges before adding ions. This is the whole error message. I also attach the input files. Do you have any idea about what might be wrong?
Traceback (most recent call last): File "/home/thomas/Programs/Anaconda2/envs/ete3/bin/pychimera", line 12, in <module> update_dict = pychimera.__main__.run() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/__main__.py", line 6, in run pychimera.main() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 347, in main run_cli_options(args) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 309, in run_cli_options globals().update(runpy.run_path(choice, run_name="__main__")) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 252, in run_path return _run_module_code(code, init_globals, run_name, path_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/protonate_receptor.py", line 300, in <module> write_protonated_structure(protonations) File "/usr/local/bin/protonate_receptor.py", line 129, in write_protonated_structure initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status) File "/home/thomas/Programs/Chimera/share/Addions/__init__.py", line 72, in initiateAddions noGaffComplain(noGaff, "Add Ions") File "/home/thomas/Programs/Chimera/share/WritePrmtop/__init__.py", line 10, in noGaffComplain raise ValueError("Cannot determine GAFF type for %s (etc.)" % noGaff[0]) ValueError: Cannot determine GAFF type for #1:1@H1 (etc.)
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
<1a30_protein.pdb><1a30_ligand.sdf>_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

import chimera from Addions import initiateAddions from DockPrep import prep models = chimera.openModels.list(modelTypes=[chimera.Molecule]) print "Preparing receptor for docking and calculating ligand AM1 charges (may be slow)." prep(models, nogui=True, method='am1') # and after I change the protonations rc("addcharge std spec #0") # re-add ff14SB charges to the protonated receptor only (the ligand protonation did not change) initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status) On Tue, 2 Apr 2019 at 00:23, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Thomas, Addcharge is what adds GAFF types. What exact addcharge command or function call are you using?
—Eric
On Apr 1, 2019, at 2:25 PM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hi Eric,
Thanks, but it seems that it doesn't recognize one of ligand's hydrogens, which is strange because I calculate AM1 charges before adding ions. This is the whole error message. I also attach the input files. Do you have any idea about what might be wrong?
Traceback (most recent call last): File "/home/thomas/Programs/Anaconda2/envs/ete3/bin/pychimera", line 12, in <module> update_dict = pychimera.__main__.run() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/__main__.py", line 6, in run pychimera.main() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 347, in main run_cli_options(args) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 309, in run_cli_options globals().update(runpy.run_path(choice, run_name="__main__")) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 252, in run_path return _run_module_code(code, init_globals, run_name, path_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/protonate_receptor.py", line 300, in <module> write_protonated_structure(protonations) File "/usr/local/bin/protonate_receptor.py", line 129, in write_protonated_structure initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status) File "/home/thomas/Programs/Chimera/share/Addions/__init__.py", line 72, in initiateAddions noGaffComplain(noGaff, "Add Ions") File "/home/thomas/Programs/Chimera/share/WritePrmtop/__init__.py", line 10, in noGaffComplain raise ValueError("Cannot determine GAFF type for %s (etc.)" % noGaff[0]) ValueError: Cannot determine GAFF type for #1:1@H1 (etc.)
--
======================================================================
Dr Thomas Evangelidis
Research Scientist
IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
<1a30_protein.pdb><1a30_ligand.sdf> _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/

If I do just the commands you provided below on the models you attached earlier 1a30_protein/ligand, I do not get the no-GAFF error you got. I get a different (and later) error that is going to be problematic. Add Ions does not work on multiple models in aggregate — if given multiple models it will add ions to each separately, which is an issue since you’ve separated your receptor and ligand into different models. If you add ions to just the receptor, it could very well place one in the ligand binding pocket. If you combine your ligand and receptor into a single model, that could work but would be more complicated and will probably be a headache. :-( Anyway, I’ve attached the script I used that did not get the GAFF error so you can try it yourself on the 1a30 system. You could let me know what additional factors are needed to get the no-GAFF error, assuming that the other Add Ions issue isn’t a showstopper. —Eric
On Apr 1, 2019, at 3:33 PM, Thomas Evangelidis <tevang3@gmail.com> wrote:
import chimera from Addions import initiateAddions from DockPrep import prep models = chimera.openModels.list(modelTypes=[chimera.Molecule]) print "Preparing receptor for docking and calculating ligand AM1 charges (may be slow)." prep(models, nogui=True, method='am1') # and after I change the protonations rc("addcharge std spec #0") # re-add ff14SB charges to the protonated receptor only (the ligand protonation did not change) initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status)
On Tue, 2 Apr 2019 at 00:23, Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> wrote: Hi Thomas, Addcharge is what adds GAFF types. What exact addcharge command or function call are you using?
—Eric
On Apr 1, 2019, at 2:25 PM, Thomas Evangelidis <tevang3@gmail.com <mailto:tevang3@gmail.com>> wrote:
Hi Eric,
Thanks, but it seems that it doesn't recognize one of ligand's hydrogens, which is strange because I calculate AM1 charges before adding ions. This is the whole error message. I also attach the input files. Do you have any idea about what might be wrong?
Traceback (most recent call last): File "/home/thomas/Programs/Anaconda2/envs/ete3/bin/pychimera", line 12, in <module> update_dict = pychimera.__main__.run() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/__main__.py", line 6, in run pychimera.main() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 347, in main run_cli_options(args) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 309, in run_cli_options globals().update(runpy.run_path(choice, run_name="__main__")) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 252, in run_path return _run_module_code(code, init_globals, run_name, path_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/protonate_receptor.py", line 300, in <module> write_protonated_structure(protonations) File "/usr/local/bin/protonate_receptor.py", line 129, in write_protonated_structure initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status) File "/home/thomas/Programs/Chimera/share/Addions/__init__.py", line 72, in initiateAddions noGaffComplain(noGaff, "Add Ions") File "/home/thomas/Programs/Chimera/share/WritePrmtop/__init__.py", line 10, in noGaffComplain raise ValueError("Cannot determine GAFF type for %s (etc.)" % noGaff[0]) ValueError: Cannot determine GAFF type for #1:1@H1 (etc.)
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
<1a30_protein.pdb><1a30_ligand.sdf>_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Eric, I think I found what is wrong. When I do prep() and then split and combine models from the original, the new modes loss their atom types (?). Is this correct? I was led to this conclusion because if I do another prep() to the combined model then I do not get no-GAFF error during initiateAddions(). best, Thomas On Tue, 2 Apr 2019 at 01:15, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
If I do just the commands you provided below on the models you attached earlier 1a30_protein/ligand, I do not get the no-GAFF error you got. I get a different (and later) error that is going to be problematic. Add Ions does not work on multiple models in aggregate — if given multiple models it will add ions to each separately, which is an issue since you’ve separated your receptor and ligand into different models. If you add ions to just the receptor, it could very well place one in the ligand binding pocket. If you combine your ligand and receptor into a single model, that could work but would be more complicated and will probably be a headache. :-(
Anyway, I’ve attached the script I used that did not get the GAFF error so you can try it yourself on the 1a30 system. You could let me know what additional factors are needed to get the no-GAFF error, assuming that the other Add Ions issue isn’t a showstopper.
—Eric
On Apr 1, 2019, at 3:33 PM, Thomas Evangelidis <tevang3@gmail.com> wrote:
import chimera from Addions import initiateAddions from DockPrep import prep
models = chimera.openModels.list(modelTypes=[chimera.Molecule]) print "Preparing receptor for docking and calculating ligand AM1 charges (may be slow)." prep(models, nogui=True, method='am1')
# and after I change the protonations
rc("addcharge std spec #0") # re-add ff14SB charges to the protonated receptor only (the ligand protonation did not change)
initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status)
On Tue, 2 Apr 2019 at 00:23, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Thomas, Addcharge is what adds GAFF types. What exact addcharge command or function call are you using?
—Eric
On Apr 1, 2019, at 2:25 PM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hi Eric,
Thanks, but it seems that it doesn't recognize one of ligand's hydrogens, which is strange because I calculate AM1 charges before adding ions. This is the whole error message. I also attach the input files. Do you have any idea about what might be wrong?
Traceback (most recent call last): File "/home/thomas/Programs/Anaconda2/envs/ete3/bin/pychimera", line 12, in <module> update_dict = pychimera.__main__.run() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/__main__.py", line 6, in run pychimera.main() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 347, in main run_cli_options(args) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 309, in run_cli_options globals().update(runpy.run_path(choice, run_name="__main__")) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 252, in run_path return _run_module_code(code, init_globals, run_name, path_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/protonate_receptor.py", line 300, in <module> write_protonated_structure(protonations) File "/usr/local/bin/protonate_receptor.py", line 129, in write_protonated_structure initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status) File "/home/thomas/Programs/Chimera/share/Addions/__init__.py", line 72, in initiateAddions noGaffComplain(noGaff, "Add Ions") File "/home/thomas/Programs/Chimera/share/WritePrmtop/__init__.py", line 10, in noGaffComplain raise ValueError("Cannot determine GAFF type for %s (etc.)" % noGaff[0]) ValueError: Cannot determine GAFF type for #1:1@H1 (etc.)
--
======================================================================
Dr Thomas Evangelidis
Research Scientist
IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
<1a30_protein.pdb><1a30_ligand.sdf> _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
--
======================================================================
Dr Thomas Evangelidis
Research Scientist
IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic email: tevang3@gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/

You are correct. The idatmType attribute of atoms was not copied. Explicitly setting idatmTypes isn’t something that happens a lot, so it got overlooked in the copy/combine code. I have fixed that oversight. In tomorrow’s build, idatmTypes that were explicitly set will be copied. —Eric
On Apr 5, 2019, at 4:08 AM, Thomas Evangelidis <tevang3@gmail.com> wrote:
Hi Eric,
I think I found what is wrong. When I do prep() and then split and combine models from the original, the new modes loss their atom types (?). Is this correct? I was led to this conclusion because if I do another prep() to the combined model then I do not get no-GAFF error during initiateAddions().
best, Thomas
On Tue, 2 Apr 2019 at 01:15, Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> wrote: If I do just the commands you provided below on the models you attached earlier 1a30_protein/ligand, I do not get the no-GAFF error you got. I get a different (and later) error that is going to be problematic. Add Ions does not work on multiple models in aggregate — if given multiple models it will add ions to each separately, which is an issue since you’ve separated your receptor and ligand into different models. If you add ions to just the receptor, it could very well place one in the ligand binding pocket. If you combine your ligand and receptor into a single model, that could work but would be more complicated and will probably be a headache. :-(
Anyway, I’ve attached the script I used that did not get the GAFF error so you can try it yourself on the 1a30 system. You could let me know what additional factors are needed to get the no-GAFF error, assuming that the other Add Ions issue isn’t a showstopper.
—Eric
On Apr 1, 2019, at 3:33 PM, Thomas Evangelidis <tevang3@gmail.com <mailto:tevang3@gmail.com>> wrote:
import chimera from Addions import initiateAddions from DockPrep import prep models = chimera.openModels.list(modelTypes=[chimera.Molecule]) print "Preparing receptor for docking and calculating ligand AM1 charges (may be slow)." prep(models, nogui=True, method='am1') # and after I change the protonations rc("addcharge std spec #0") # re-add ff14SB charges to the protonated receptor only (the ligand protonation did not change) initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status)
On Tue, 2 Apr 2019 at 00:23, Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> wrote: Hi Thomas, Addcharge is what adds GAFF types. What exact addcharge command or function call are you using?
—Eric
On Apr 1, 2019, at 2:25 PM, Thomas Evangelidis <tevang3@gmail.com <mailto:tevang3@gmail.com>> wrote:
Hi Eric,
Thanks, but it seems that it doesn't recognize one of ligand's hydrogens, which is strange because I calculate AM1 charges before adding ions. This is the whole error message. I also attach the input files. Do you have any idea about what might be wrong?
Traceback (most recent call last): File "/home/thomas/Programs/Anaconda2/envs/ete3/bin/pychimera", line 12, in <module> update_dict = pychimera.__main__.run() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/__main__.py", line 6, in run pychimera.main() File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 347, in main run_cli_options(args) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/site-packages/pychimera/core.py", line 309, in run_cli_options globals().update(runpy.run_path(choice, run_name="__main__")) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 252, in run_path return _run_module_code(code, init_globals, run_name, path_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/home/thomas/Programs/Anaconda2/envs/ete3/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/protonate_receptor.py", line 300, in <module> write_protonated_structure(protonations) File "/usr/local/bin/protonate_receptor.py", line 129, in write_protonated_structure initiateAddions(models, "Cl-", "neutralize", chimera.replyobj.status) File "/home/thomas/Programs/Chimera/share/Addions/__init__.py", line 72, in initiateAddions noGaffComplain(noGaff, "Add Ions") File "/home/thomas/Programs/Chimera/share/WritePrmtop/__init__.py", line 10, in noGaffComplain raise ValueError("Cannot determine GAFF type for %s (etc.)" % noGaff[0]) ValueError: Cannot determine GAFF type for #1:1@H1 (etc.)
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
<1a30_protein.pdb><1a30_ligand.sdf>_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
-- ====================================================================== Dr Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en> Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/> Brno, Czech Republic
email: tevang3@gmail.com <mailto:tevang3@gmail.com> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
participants (3)
-
Eric Pettersen
-
Jaime Rodríguez-Guerra Pedregal
-
Thomas Evangelidis