
On Nov 14, 2007, at 12:20 AM, Jean Didier Pie Marechal wrote:
I am trying to get deeper into chimera and to develop a "simple" algorithm for drug optimization. Something flying in my mind for a while...
First though, I need to understand how to manipulate atom coordinates, bond angle and the general building. I went to the index of the chimera modules. My first objective is to generate a molecule from scratch and I thought that the molEdit module would provide me with the right tools to do so.
However, when trying to call this module by a chimera.molEdit.XXXX type of command, it seems that molEdit is not a correct object. Are you getting ImportError? The chimera module only imports the submodules it needs at startup in order to try to reduce the startup time, and molEdit is one of the modules it does not import. So if you have code like this:
import chimera chimera.molEdit.blah() you will get an ImportError. You either need to do this: import chimera.molEdit chimera.molEdit.blah() or this: from chimera.molEdit import blah blah()
Could you give me some pointers on the correct way to generate small ligand or how to add groups to a given one? molEdit certainly has the very basic functions for working on a molecule:
addAtom: add an atom to a molecule at a specific Point, optionally bonded to a specified atom addDihedralAtom: as above except positioned at a specific dihedral, angle, and bond length from 3 given Atoms/Points addBond: bond two atoms However, the BuildStructure module also has some pertinent functions. In it's __init__.py: placeHelium: start a Molecule from scratch by placing a helium atom at the given Point changeAtom: change the element, number of bonds, and bond geometry of a given Atom. Hydrogens will be added as necessary to fill out the bonds. If the 'autoClose' keyword is true, then bonds will be made to existing Atoms if appropriate (e.g. closing a ring). setBondLength: pretty self-explanatory It's too bad we're in a code freeze right now (due to the pending production release) because I've added some helpful functionality to BuildStructure: placeFragment: start a Molecule with any of the rings systems seen here: http://en.wikipedia.org/wiki/Simple_aromatic_ring changeAtom: as above, but also returns a list of the Atoms that were changed/created In the near future I anticipate adding the ability to generate structures from PubChem IDs or SMARTS strings to BuildStructure. Anyway, I can send you a current version of BuildStructure if you would like to use that. Otherwise, it should be available in the first daily build we make after the production release. --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu

Hi Eric, Thanks for that. I have been able to get a bit further. To follow with my problem, I have one question more though. Basically, I would like to know how chimera "Recognizes" metal chelation and coordination bounds. What I see is that when you open a pdb with a metal ion, the program places correctly "semi bounds" corresponding to coordination interactions. Unfortunately, I work with a series of protein structures where metals do not adopt a typical geometries (ex: 1lwx). First, I would like to be able to improve the number of acceptable metal geometries, but my questions are: how does chimera recognize the right geometry of the metal ions? Is it implemented in a python module? It is a C++ code? All the best, JD On Wed, 2007-11-14 at 12:11 -0800, Eric Pettersen wrote:
On Nov 14, 2007, at 12:20 AM, Jean Didier Pie Marechal wrote:
I am trying to get deeper into chimera and to develop a "simple" algorithm for drug optimization. Something flying in my mind for a while...
First though, I need to understand how to manipulate atom coordinates, bond angle and the general building. I went to the index of the chimera modules. My first objective is to generate a molecule from scratch and I thought that the molEdit module would provide me with the right tools to do so.
However, when trying to call this module by a chimera.molEdit.XXXX type of command, it seems that molEdit is not a correct object.
Are you getting ImportError? The chimera module only imports the submodules it needs at startup in order to try to reduce the startup time, and molEdit is one of the modules it does not import. So if you have code like this:
import chimera chimera.molEdit.blah()
you will get an ImportError. You either need to do this:
import chimera.molEdit chimera.molEdit.blah()
or this:
from chimera.molEdit import blah blah()
Could you give me some pointers on the correct way to generate small ligand or how to add groups to a given one?
molEdit certainly has the very basic functions for working on a molecule:
addAtom: add an atom to a molecule at a specific Point, optionally bonded to a specified atom addDihedralAtom: as above except positioned at a specific dihedral, angle, and bond length from 3 given Atoms/Points addBond: bond two atoms
However, the BuildStructure module also has some pertinent functions. In it's __init__.py:
placeHelium: start a Molecule from scratch by placing a helium atom at the given Point changeAtom: change the element, number of bonds, and bond geometry of a given Atom. Hydrogens will be added as necessary to fill out the bonds. If the 'autoClose' keyword is true, then bonds will be made to existing Atoms if appropriate (e.g. closing a ring). setBondLength: pretty self-explanatory
It's too bad we're in a code freeze right now (due to the pending production release) because I've added some helpful functionality to BuildStructure:
placeFragment: start a Molecule with any of the rings systems seen here: http://en.wikipedia.org/wiki/Simple_aromatic_ring changeAtom: as above, but also returns a list of the Atoms that were changed/created
In the near future I anticipate adding the ability to generate structures from PubChem IDs or SMARTS strings to BuildStructure. Anyway, I can send you a current version of BuildStructure if you would like to use that. Otherwise, it should be available in the first daily build we make after the production release.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab

Hi JD, Unfortunately, Chimera isn't really being as smart here as you are giving it credit for. Many PDB files specify coordination bonds in CONECT records. Chimera identifies those bonds and converts them to pseudobonds (otherwise its atom-typing code, which depends on correct covalent bonding, would get the bonded atoms wrong). So PDB files that do not identify the coordination bonds with CONECT records (e.g. 1lwx) will not have any coordination bonds in Chimera. I'm wondering if what you are hoping to do is along the lines of this previous mail to chimera-users: http://www.cgl.ucsf.edu/pipermail/chimera-users/2007-May/001529.html --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu On Nov 23, 2007, at 9:30 AM, Jean-Didier Maréchal wrote:
Hi Eric,
Thanks for that. I have been able to get a bit further.
To follow with my problem, I have one question more though. Basically, I would like to know how chimera "Recognizes" metal chelation and coordination bounds.
What I see is that when you open a pdb with a metal ion, the program places correctly "semi bounds" corresponding to coordination interactions. Unfortunately, I work with a series of protein structures where metals do not adopt a typical geometries (ex: 1lwx). First, I would like to be able to improve the number of acceptable metal geometries, but my questions are: how does chimera recognize the right geometry of the metal ions? Is it implemented in a python module? It is a C++ code?
All the best, JD
participants (3)
-
Eric Pettersen
-
Jean Didier Pie Marechal
-
Jean-Didier Maréchal