[chimera-dev] AIMAll extension update 1
Eric Pettersen
pett at cgl.ucsf.edu
Wed Jan 7 11:45:08 PST 2015
On Jan 6, 2015, at 4:38 PM, ros <rodrigogalindo at gmail.com> wrote:
> I couple of questions:
>
> 1- Do I have to include something in the connectMolecule function to
> enable the display of bonds?
No, you don't have to do that. What units are your coordinates in? Looking back at your original email, the C1-H4 distance is ~2.04 and the C2-C3 distance is ~3.53. Both these pairs are depicted as bonded in your accompanying picture yet a carbon-hydrogen bond is typically ~1 angstrom and carbon-carbon about 1.5. Therefore the connectMolecule() function doesn't bond them. So I guess the question is: what is up with the AIMAll coordinates?
> 2- At the end, what would be your recommendation, based on your
> experience, to display the critical points and bonds between atoms?
> We were considering: Fake atoms, Markers, Sphere shapes and bond
> colors. What we are trying to achieve is to be able to turn off
> certain critical points and leave some on to show how molecules
> interact.
I guess I would either use fake atoms or markers, which would allow your to put arbitrary attributes in them to help you select them later in commands. For example, let's say you've created fake atom cp in your code which is between real atoms a1 and a2. You might put "maxElem" and "minElem" attributes in cp corresponding to the largest and smallest atomic numbers respectively of a1 and a2, like so:
cp.maxElem = max(a1.element.number, a2.element.number)
cp.minElem = min(a1.element.number, a2.element.number)
then later, when using the extension, you could refer to carbon-hydrogen critical points with the following atom specifier:
@/maxElem=6 and minElem=1
so you could color all such critical points red with:
color red @/maxElem=6 and minElem=1
You could certainly also put in attributes from the AIMAll file itself, such as Rho, Bond Ellipticity, etc.
One small unrelated suggestion for your code is that you use the atomic charge for determining the element, instead of part of the atom name. This avoids any problem with possible two-character atom names where you would need to downcase the second character.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
http://www.cgl.ucsf.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20150107/1768fb3b/attachment.html>
More information about the Chimera-dev
mailing list