
Hi Matas, I don't know if you need pychimera to do it. Seems like you could just do it with Chimera commands "addcharge" (with "addh" first if the structures didn't have hydrogens) and "write" with the "format mol2" option. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/addcharge.html> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/write.html> Figure out which commands and their options work the way you want, and then see here for how to use python to loop through input files and apply Chimera commands to each: <http://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Oct 15, 2020, at 3:39 AM, Matas Tiskus <tiskusm@gmail.com> wrote:
Hello, I was looking for ways to add charges to protein structures in a python script and write a .mol2 file. I believe it is possible to do with importing pychimera into the script, but i can't seem to make it work. How would the code for this purpose look like? Matas