
Hi JD, I can't answer in terms of programming, but thought I would mention that in recent daily builds (version 1.5), "Axes/Planes" (under Tools... Structure Analysis) has been extended to "Axes/Planes/ Centroids." With this tool, or with the command "define," you can create a sphere at the optionally mass-weighted centroid of any set of atoms. <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/structuremeas/struc...
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/define.html> These centroid objects, although not atoms, can be used in distance measurements via the "Axes/Planes/Centroids" GUI or with the command "distance." Perhaps these centroid objects will meet your needs, so you don't need to write this code to create atoms. Best, Elaine ----- Elaine C. Meng, Ph.D. meng@cgl.ucsf.edu UCSF Computer Graphics Lab and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco http://www.cgl.ucsf.edu/home/meng/index.html On Feb 13, 2010, at 6:25 AM, Jean Didier Pie Marechal wrote:
Dear all, I'd like to add an atom at the mass center of each aromatic fragment of my ligand (I always want to add an atom don't I?).
I know how to calculate cm, put an atom or point, select aromatic ring BUT I am banging my head against the wall to define one entity of each ring separately.
Would it be a lot more complicate to do so for any cyclic moeity. Thanks for any help! best, JD