On Dec 28, 2014, at 2:09 AM, Enrico Ronca <enrico@thch.unipg.it> wrote:
Dear Sir.
I'm Enrico Ronca a post-doc researcher at the National Research Council of Italy in Perugia.
I'm contacting you because I often work with metal atoms and not always chimera show me bonds. I solved the problem removing all bonds and pseudo bonds and adding "reasonable bond between selected atoms" in the adjust bonds menu of chimera.
Is there a way to run the same procedure from the command line so that I could automate it by a script?
Hi Enrico, There is no command line equivalent for the "all reasonable bonds" function, nor is there a command for deleting pseudobonds. So you have to resort to Python. Basically collating the "reasonable bond" code (from the _addBonds method in <your Chimera installation>/share/BuildStructure/gui.py) with custom code to close metal pseudobond groups and then additional calls to regular Chimera commands to select atoms and delete bonds. I've attached a file (rebond.py) that contains all that code. If you put the file in your home directory, then the command "open ~/rebond.py" will execute the code and do what you want. Normally I would not recommend adding "normal" (covalent) bonds rather than pseudobonds to metal ions since that will screw up many chemistry related functions in Chimera (e.g. adding hydrogens; finding H-bonds; minimization) but I suppose you know what you're doing! Maybe these are actual metal compounds instead of coordination complexes? --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu